Yocto Build Linux

From Variscite Wiki
Revision as of 10:52, 8 May 2017 by Admin (talk | contribs)
Yocto Build Linux from source code

Toolchain installation for out of Yocto builds

To install the toolchain, follow Yocto Toolchain installation.

Build Linux out of Yocto tree

Get the Linux source code:

$ cd 
$ git clone 
$ git checkout -b  origin/

Build the Linux kernel:

$ source 
$ cd 
$ make mrproper
$ make 
Build everything:
$ make -j4
Build zImage only:
$ make -j4 
Build modules only:
$ make -j4 modules
Build device trees only:
$ make -j4 dtbs




Yocto Platform Customization2

Notes:
- If you replace the kernel image () on your system, you also need to reinstall the kernel modules, and vice versa.
- If you just want to make a change in the device tree, you can compile and replace it without replacing the kernel image and modules.

Install the built kernel on an SD card

Copy the 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- and the rootfs partition is mounted on /media/rootfs:

Install the kernel image and modules:
$ cp arch/arm/boot/ /media/BOOT-
$ sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/media/rootfs
Install the device trees:
$ cp arch/arm/boot/dts/*var*.dtb /media/BOOT-

Note:
If you are using our Yocto Recovery SD card, and you want the NAND flash/eMMC installation to update as well as the SD card boot itself, you need to also update the /opt/images/Yocto directory.