VAR-SOM-MX7 Yocto Jethro Build Linux out of tree
From Variscite Wiki
VAR-SOM-MX7 - Yocto Jethro Build Linux from source code
Toolchain installation for out of Yocto builds
Build the toolchain by:
$ 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-cortexa9hf-vfp-neon-toolchain-4.1.15-1.1.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.1.0.sh
Reply to all defaults 'y'
The toolchain name depend on your build machine and may change.
Build Linux out of Yocto tree
Get the Linux source code:
$ cd ~/var-mx6ul-mx7-yocto-jethro $ git clone https://github.com/varigit/linux-2.6-imx.git -b imx-rel_imx_4.1.15_1.2.0_ga-var01
Build the Linux kernel:
$ source /opt/fsl-imx-x11/4.1.15-1.1.0/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
$ cd ~/var-mx6ul-mx7-yocto-jethro/linux-2.6-imx/ $ make mrproper $ make imx7-var-som_defconfig Build everything: $ make -j4 Build zImage only: $ make -j4 zImage Build modules only: $ make -j4 modules Build device trees only: $ make -j4 dtbs Build only the device tree for VAR-SOM-MX7 with eMMC: $ make -j4 imx7d-var-som-emmc.dtb Build only the device tree for VAR-SOM-MX7 with NAND flash: $ make -j4 imx7d-var-som-nand.dtb
Install the built kernel on an SD card
Copy the zImage and device trees to the SD card boot partition, and install the modules in the SD card rootfs partition.
Assuming the boot partition is mounted on /media/BOOT-VARMX7 and the rootfs partition is mounted on /media/rootfs:
$ sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/media/rootfs $ cp arch/arm/boot/zImage /media/BOOT-VARMX7 $ cp arch/arm/boot/dts/imx7*var*.dtb /media/BOOT-VARMX7