Yocto Build Linux: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<!-- Set release according to "release" parameter in URL and use MORTY_BETA_DART-6UL as default | <!-- Set release according to "release" parameter in URL and use MORTY_BETA_DART-6UL as default | ||
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!-- | --> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!-- | ||
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_MORTY_BETA_DART-6UL}}}} | --> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_MORTY_BETA_DART-6UL}}}} <!-- | ||
{{PageHeader|Yocto Build Linux from source code}} {{DocImage|category1={{#var:HARDWARE_NAME}}|category2=Yocto}} __toc__ | --> {{PageHeader|Yocto Build Linux from source code}} {{DocImage|category1={{#var:HARDWARE_NAME}}|category2=Yocto}} __toc__ | ||
= Toolchain installation for out of Yocto builds = | = Toolchain installation for out of Yocto builds = | ||
Revision as of 10:53, 8 May 2017
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
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.