Yocto Build Linux
This is because some of the Yocto packages may depend on the kernel, like the WiFi module that is built from outside of the kernel source tree on some of the Yocto releases.
1 Toolchain installation for out of Yocto builds
To install the toolchain, follow.
2 Build Linux out of Yocto tree
Get the Linux source code:
$ git clone https://github.com/varigit/linux-imx.git $ cd linux-imx $ git checkout imx_4.9.88_2.0.0_ga-var01
Build the Linux kernel:
$ source /opt/fslc-x11/2.5/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi
$ make mrproper $ make imx_v7_var_defconfig
Customize the kernel configuration (optional step): $ make menuconfig
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 Build only the device tree for VAR-SOM-MX7 with eMMC and M4 support: $ make -j4 imx7d-var-som-emmc-m4.dtb Build only the device tree for VAR-SOM-MX7 with NAND flash and M4 support: $ make -j4 imx7d-var-som-nand-m4.dtb
3 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/user/BOOT-VARMX7 and the rootfs partition is mounted on /media/user/rootfs:
Install the kernel image and modules: $ cp arch/arm/boot/zImage /media/user/BOOT-VARMX7 $ sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/media/user/rootfs Install the device trees: $ cp arch/arm/boot/dts/imx7*var*.dtb /media/user/BOOT-VARMX7
- If you are using our , and you want the NAND flash/eMMC installation process to be updated as well as the SD card boot itself, you need to also update the /opt/images/Yocto directory.
- You should always properly unmount your SD card before physically removing it.