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

From Variscite Wiki
No edit summary
Line 17: Line 17:
= Build U-Boot out of Yocto tree =
= Build U-Boot out of Yocto tree =


{{note|Note:<br/>This is a single u-boot image that supports all VAR-SOM-MX6 SOMs.|info}} Obtain sources:
{{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
<pre>$ cd ~/var-som-mx6-yocto-fido
$ git clone https://github.com/varigit/uboot-imx
$ git clone https://github.com/varigit/uboot-imx
$ cd 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>
*follow above procedure for installing the toolchain
<pre>
 
clean tree:
Build u-boot:
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper
<pre>$ source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
</pre><pre>clean tree:
$ make mrproper
 
Choose build for SD-Card or NAND Flash:
Choose build for SD-Card or NAND Flash:
$ make mx6var_som_sd_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  mx6var_som_sd_config
or
or
$ make mx6var_som_nand_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-  mx6var_som_nand_config
 
Build U-BOOT:
Build U-BOOT:
$ make
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi-
</pre>
</pre>  
Flash u-boot to the sd-card:
Flash u-boot to the sd-card:  
<pre>$ sudo dd if=SPL of=/dev/sdxxx bs=1K seek=1; sync
<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
$ sudo dd if=u-boot.img of=/dev/sdxxx bs=1K seek=69; sync
</pre>
</pre>
In case of UBI copy it to the sd-card:
In case of UBI copy it to the sd-card:  
<pre>$ sudo cp SPL /media/rootfs/opt/images
<pre>$ sudo cp SPL /media/rootfs/opt/images
$ sudo cp u-boot.img /media/rootfs/opt/images
$ sudo cp u-boot.img /media/rootfs/opt/images
</pre>
</pre>
Eject SD-Card gracefully from host machine.<br/>{{note|Note:<br/>Refer to [[VAR-SOM-MX6 NAND Flash Burning|NAND Flash Burning]] for a complete description.|info}}
Eject SD-Card gracefully from host machine.<br>
{{note|Note:<br/>Refer to [[VAR-SOM-MX6 NAND Flash Burning|NAND Flash Burning]] for a complete description.|info}}

Revision as of 12:10, 14 March 2016

VAR-SOM-MX6 - Yocto fsl-3.14.38_6qp Fido R2 u-boot 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 U-Boot out of Yocto tree

Note:
This is a single u-boot image that supports all VAR-SOM-MX6 SOM's.

Obtain sources:

$ cd ~/var-som-mx6-yocto-fido
$ git clone https://github.com/varigit/uboot-imx
$ cd uboot-imx/
  • follow above procedure for installing the toolchain

Build u-boot:

$ export PATH=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:$PATH
$ export USE_PRIVATE_LIBGCC=yes
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-

Flash u-boot to the sd-card:

$ 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

In case of UBI copy it to the sd-card:

$ sudo cp SPL /media/rootfs/opt/images
$ sudo cp u-boot.img /media/rootfs/opt/images

Eject SD-Card gracefully from host machine.

Note:
Refer to NAND Flash Burning for a complete description.