DART-6UL Yocto Fido R1 Build u-boot out of tree

From Variscite Wiki
DART-6UL - Yocto fsl-3.14.38_6a Fido R1 Build U-Boot from source code

Toolchain installation for out of Yocto builds

Build the toolchain by:

$ cd ~/var-dart-6ul-yocto-fido
$ source var-setup-release.sh -b build_x11 -e x11
$ bitbake meta-ide-support
$ bitbake meta-toolchain

The output will be located at tmp/deploy/sdk/. On a 64 bit Ubuntu you will get:

tmp/deploy/sdk/fsl-imx-x11-glibc-x86_64-meta-toolchain-cortexa7hf-vfp-neon-toolchain-3.14.52-1.1.0.sh

Install the tools by running:

$ tmp/deploy/sdk/fsl-imx-x11-glibc-x86_64-meta-toolchain-cortexa7hf-vfp-neon-toolchain-3.14.52-1.1.0.sh

Reply to all defaults 'y'

The toolchain name depend on your build machine and may change.

Build U-Boot out of Yocto tree

Obtain sources:

$ cd ~/var-dart-6ul-yocto-fido
$ git clone https://github.com/varigit/uboot-imx
$ cd uboot-imx/
$ git checkout -b imx_v2015.10_dart_6ul_var1 remotes/origin/imx_v2015.10_dart_6ul_var1
  • follow above procedure for installing the toolchain

Build u-boot:

$ . /opt/fsl-imx-x11/3.14.52-1.1.0/environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi
clean tree:
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper
Choose build for SD-Card or NAND Flash:
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6ul_var_dart_mmc_defconfig
or
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  mx6ul_var_dart_nand_defconfig

Build U-BOOT:
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-

Flash u-boot to the sd-card:

$ sudo dd if=SPL of=/dev/sdxxx bs=1K seek=1; sync
$ sudo dd if=u-boot.img of=/dev/sdxxx bs=1K seek=69; sync

In case of UBI copy it to the sd-card:

$ sudo cp SPL /media/rootfs/opt/images/Yocto/SPL-nand
$ sudo cp u-boot.img /media/rootfs/opt/images/Yocto/u-boot-nand-2015.04-r0.img
or (depend on your build):
$ sudo cp SPL /media/rootfs/opt/images/Yocto/SPL-sd
$ sudo cp u-boot.img /media/rootfs/opt/images/Yocto/u-boot-sd-2015.04-r0.img

refer to "fsl-image-gui-imx6ul-var-dart.ubi" section above for flashing images from SD-Card into NAND-flash
Eject SD-Card gracefully from host machine

Update your U-Boot out of Yocto tree

$ git fetch origin
$ git pull