VAR-SOM-MX7 Yocto Jethro Build U-Boot out of tree

From Variscite Wiki
VAR-SOM-MX7 - Yocto Jethro U-Boot out of tree

Toolchain installation for out of Yocto builds

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

$ cd ~/var-mx6ul-mx7-yocto-jethro
$ MACHINE=imx7-var-som DISTRO=fsl-imx-x11 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-cortexa7hf-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-cortexa7hf-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

$ cd ~/var-mx6ul-mx7-yocto-jethro
$ git clone https://github.com/varigit/uboot-imx.git -b imx_v2017.03_4.9.11_1.0.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-cortexa7hf-vfp-neon-poky-linux-gnueabi
$ cd ~/var-mx6ul-mx7-yocto-jethro/uboot-imx/

Clean tree:
$ make mrproper

For building U-Boot for SD card/eMMC:
$ make mx7dvar_som_defconfig

For building U-Boot for NAND flash:
$ make mx7dvar_som_nand_defconfig

Build U-Boot:
$ make -j4

Flashing U-Boot to an SD card:

$ 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
(replace /dev/sdX with your correct device node)


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.