VAR-SOM-MX6 Yocto Krogoth Build Linux out of tree: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|VAR-SOM-MX6 - Yocto Jethro Linux out of tree}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__ = Toolchain installation for out of Yocto builds = As a...")
 
No edit summary
Line 1: Line 1:
{{PageHeader|VAR-SOM-MX6 - Yocto Jethro Linux out of tree}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__
{{PageHeader|VAR-SOM-MX6 - Yocto Krogoth Linux out of tree}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__
= Toolchain installation for out of Yocto builds =
= Toolchain installation for out of Yocto builds =



Revision as of 13:43, 29 November 2016

VAR-SOM-MX6 - Yocto Krogoth Linux out of tree

Toolchain installation for out of Yocto builds

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

$ cd ~/var-imx-yocto-krogoth
$ MACHINE=var-som-mx6 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-neon-toolchain-4.1.15-2.0.1.sh

Install the tools by running:

$ tmp/deploy/sdk/fsl-imx-x11-glibc-x86_64-meta-toolchain-cortexa9hf-neon-toolchain-4.1.15-2.0.1.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-imx-yocto-jethro
$ git clone https://github.com/varigit/linux-2.6-imx.git -b imx-rel_imx_4.1.15_2.0.0_ga-var01

Build the Linux kernel:

$ source /opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
$ cd ~/var-imx-yocto-jethro/linux-2.6-imx/
$ make mrproper
$ make imx_v7_var_defconfig

Build uImage and modules:
$ make -j4 LOADADDR=0x10008000 uImage
$ make -j4 LOADADDR=0x10008000 modules

Build all device trees:
$ make -j4 dtbs

or
Build device tree for a specific device:

Build the device tree for Dualite/Solo on VAR-MX6CustomBoard with capacitive touchscreen:
$ make -j4 imx6dl-var-som-cap.dtb

Build the device tree for Dualite/Solo on VAR-MX6CustomBoard with resistive touchscreen:
$ make -j4 imx6dl-var-som-res.dtb

Build the device tree for Dualite/Solo on VAR-SOLOCustomBoard:
$ make -j4 imx6dl-var-som-vsc.dtb

Build the device tree for Quad/Dual on VAR-MX6CustomBoard with capacitive touchscreen:
$ make -j4 imx6q-var-som-cap.dtb

Build the device tree for Quad/Dual on VAR-MX6CustomBoard with resistive touchscreen:
$ make -j4 imx6q-var-som-res.dtb

Build the device tree for Quad/Dual on VAR-SOLOCustomBoard:
$ make -j4 imx6q-var-som-vsc.dtb

Build the device tree for VAR-SOM-SOLO on VAR-MX6CustomBoard with capacitive touchscreen:
$ make -j4 imx6dl-var-som-solo-cap.dtb

Build the device tree for VAR-SOM-SOLO on VAR-MX6CustomBoard with resistive touchscreen:
$ make -j4 imx6dl-var-som-solo-res.dtb

Build the device tree for VAR-SOM-SOLO on VAR-SOLOCustomBoard:
$ make -j4 imx6dl-var-som-solo-vsc.dtb

Build the device tree for DART-MX6:
$ make -j4 imx6q-var-dart.dtb

Notes:
- If you replace the kernel image (uImage) 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 uImage 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-VARSOM and the rootfs partition is mounted on /media/rootfs/:

Install the kernel image and modules:
$ cp arch/arm/boot/uImage /media/BOOT-VARSOM
$ sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/media/rootfs/

Install the device trees:
$ cp arch/arm/boot/dts/*var*.dtb /media/BOOT-VARSOM

Note:
If you are using our 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.