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

From Variscite Wiki
No edit summary
Line 14: Line 14:
Reply to all defaults 'y'<br>
Reply to all defaults 'y'<br>
The toolchain name depend on your build machine and may change.
The toolchain name depend on your build machine and may change.
= Build U-Boot out of Yocto tree =
{{note|Note:<br/>This is a single u-boot image that supports all VAR-SOM-MX6 SOM's.|info}}
Obtain sources:
<pre>$ cd ~/var-som-mx6-yocto-fido
$ git clone https://github.com/varigit/uboot-imx
$ cd uboot-imx/
</pre>
* follow above procedure for installing the toolchain
Build u-boot:
<pre>
$ export PATH=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:$PATH
$ export USE_PRIVATE_LIBGCC=yes
</pre>
<pre>
clean tree:
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper
Choose build for SD-Card or NAND Flash:
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  mx6var_som_sd_config
or
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  mx6var_som_nand_config
Build U-BOOT:
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-
</pre>
Flash u-boot to the sd-card:
<pre>$ sudo dd if=SPL of=/dev/sdxxx bs=1K seek=1; sync
$ sudo dd if=u-boot.img of=/dev/sdxxx bs=1K seek=69; sync
</pre>
To flash to NAND copy it to the sd-card:
<pre>$ sudo cp SPL /media/rootfs/opt/images
$ sudo cp u-boot.img /media/rootfs/opt/images
</pre>
refer to "fsl-image-qt5-var-som-mx6.ubi" section above for flashing images from SD-Card into NAND-flash
<br>
Eject SD-Card gracefully from host machine


= Build Linux out of Yocto tree =
= Build Linux out of Yocto tree =

Revision as of 09:16, 13 December 2015

VAR-SOM-MX6 - Yocto fsl-3.14.38_6qp Fido R2 Linux out of tree

Toolchain installation for out of Yocto builds

Build the toolchain by:

$ bitbake meta-ide-support
$ bitbake meta-toolchain

The output will be located at tmp/deploy/sdk/. On a 64 bit Ubuntu you will get:

sdk/poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.8.sh

Install the tools by running:

$ tmp/deploy/sdk/poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.8.sh

Reply to all defaults 'y'
The toolchain name depend on your build machine and may change.

Build Linux out of Yocto tree

Get sources:

$ cd ~/var-som-mx6-yocto-fido
$ git clone https://github.com/varigit/linux-2.6-imx.git
$ cd linux-2.6-imx/
$ git checkout -b imx_3.14.38_6qp_ga_var01 remotes/origin/imx_3.14.38_6qp_ga_var01

Build the Linux kernel:

$ export PATH=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:$PATH
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx_v7_var_defconfig
$ make -j6 LOADADDR=0x10008000 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage
$ make -j6 LOADADDR=0x10008000 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules
Build all device tree:
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- dtbs
Build device tree for a specific device
Build the device tree for Dualite/Solo
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6dl-var-som.dtb
Build the device tree for Quad/Dual
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6q-var-som.dtb
Build the device tree for VAR-SOM-SOLO
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6dl-var-som-solo.dtb
Build the device tree for VAR-SOM-SOLO on VAR-SOLOCustomBoard
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6dl-var-som-solo-vsc.dtb  
Build the device tree for DART-MX6
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- imx6q-var-dart.dtb



Copy the uImage and device tree to the sd-card boot partition or to the opt/image in order to be flashed to the nand. Copy modules to the sd-card

$ sudo make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules_install INSTALL_MOD_PATH=/media/rootfs/
$ cp arch/arm/boot/uImage /media/BOT_varsomi
$ cp arch/arm/boot/dts/*var*.dtb /media/BOT_varsomi

Useful Bitbake commands

Bitbake Cheat Sheet

Useful bitbake commands

i.MX Yocto Project: ltib versus bitbake