VAR-SOM-MX6 Yocto Jethro R4 Build u-boot out of tree

From Variscite Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
VAR-SOM-MX6 - Yocto fsl-4.1.15_ga Jethro R4 U-Boot out of tree

Toolchain installation for out of Yocto builds

As an example of X11 build, Build the toolchain by:

$ cd ~/var-som-mx6-yocto-jethro
$ DISTRO=fsl-imx-x11 MACHINE=var-som-mx6 source var-setup-release.sh -b build_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-cortexa9hf-vfp-neon-toolchain-4.1.15-1.2.0.sh

Install the tools by running:

$ tmp/deploy/sdk/fsl-imx-x11-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-4.1.15-1.2.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

Note:
This is a single U-Boot image that supports all VAR-SOM-MX6 SOMs.

Obtain sources:

$ cd ~/var-som-mx6-yocto-jethro
$ git clone https://github.com/varigit/uboot-imx -b imx_v2015.04_4.1.15_1.1.0_ga_var01
  • Follow above procedure for installing the toolchain

Build U-Boot:

$ source /opt/fsl-imx-x11/4.1.15-1.2.0/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
$ cd ~/var-som-mx6-yocto-jethro/uboot-imx/

clean tree:
$ make mrproper

Choose build for SD card or NAND flash:
$ make mx6var_som_sd_defconfig
or
$ make mx6var_som_nand_defconfig

Build U-Boot:
$ make -j4

Install the built U-Boot on an SD card

Flash U-Boot to the SD card (replace /dev/sdX with your correct device):

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


If you want to use the SD card to flash the built U-Boot to NAND flash, then copy it to the appropriate location in the SD card:

$ sudo cp SPL /media/rootfs/opt/images/...
$ sudo cp u-boot.img /media/rootfs/opt/images/...

And eject the SD card gracefully from the host machine.

Note:
Refer to NAND Flash Burning for a complete description.