VAR-SOM-MX6 Yocto GS: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 2: Line 2:
=VAR-SOM-MX6 - Yocto V4.1 Dora R2 =
=VAR-SOM-MX6 - Yocto V4.1 Dora R2 =
__toc__
__toc__
= Introduction  =
= Introduction  =


This is the second release of VAR-SOM-MX6 - Yocto V4.1 Dora. We updated the kernel with features and cleanup update u-boot and added support for Bluetooth and camera on the Dual lite and Solo SOM versions.<br>We also added 2 packages that enable Eclipse/Yocto application debug. A debug application note will come soon.<br>
This is the second release of VAR-SOM-MX6 - Yocto V4.1 Dora. We updated the kernel with features and cleanup update u-boot and added support for Bluetooth and camera on the Dual lite and Solo SOM versions.<br>We also added 2 packages that enable Eclipse/Yocto application debug. A debug application note will come soon.<br>  


= Supported hardware and features  =
= Supported hardware and features  =
Line 69: Line 70:
|}
|}


Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1.<br>
Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1.<br>  


= Installing required packages<br>  =
= Installing required packages<br>  =
Line 81: Line 82:
Variscite Yocto build is tested with Ubuntu 12.04 lts.<br>  
Variscite Yocto build is tested with Ubuntu 12.04 lts.<br>  


= Get Yocto Dora for i.MX with Variscite SOM support  =
= Get Yocto Dora for i.MX6 with Variscite VAR-SOM-MX6 support  =


== Method 1 recommended<br>  ==
== Method 1 (recommended)<br>  ==
<pre>$ cd ~
<pre>$ cd ~
$ tar xvf var_yocto_rel_v3.2.tar.bz2
$ tar xvf var_yocto_rel_v3.2.tar.bz2
</pre>  
</pre>  
This will install an entire tree. No need to do any patch.<br>
This will install an entire source tree. No need to apply any patch.<br>  


== Method 2 using "Repo"<br>  ==
== Method 2 using "Repo"<br>  ==
Line 96: Line 97:
$ chmod a+x ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH</pre>  
$ export PATH=~/bin:$PATH</pre>  
In case of repo problems we uploaded a tested version into our ftp site. Use it please.  
In case of repo problems a tested version can be download from Variscite's ftp.


Get Yocto Dora from github.<br>  
Get Yocto Dora from github.<br>  
Line 105: Line 106:
$ repo sync
$ repo sync
</pre>  
</pre>  
Download var_yocto_v3.2.tar.bz2 from Variscite FTP.<br>  
Download var_yocto_v3.2.tar.bz2 from Variscite's FTP.<br>  
<pre>$ tar xvf var_yocto_v3.2.tar.bz2
<pre>$ tar xvf var_yocto_v3.2.tar.bz2
$ variscite/install</pre>  
$ variscite/install</pre>  
<br>
<br>  


= Setup and Customize your Yocto build  =
= Setup and Customize your Yocto build  =
Line 114: Line 115:
Setup the environment and build folder<br>  
Setup the environment and build folder<br>  


== MACHINE=varsommx6q . setup-environment build_mx6q<br> ==
== MACHINE=varsommx6q . setup-environment build_mx6q<br> ==


== local.conf customizations<br> ==
== local.conf customizations<br> ==


edit conf/local.conf  
edit conf/local.conf  
Line 139: Line 140:
|}
|}


=== Parallel build<br> ===
=== Parallel build<br> ===


Set the build parameters to fully utilize your host machine  
Set the build parameters to fully utilize your host machine  
Line 145: Line 146:
BB_NUMBER_THREADS = '4'<br>PARALLEL_MAKE = '-j 6'  
BB_NUMBER_THREADS = '4'<br>PARALLEL_MAKE = '-j 6'  


BB_NUMBER_THREADS should be your host machine number of threads minus 2 or same.
BB_NUMBER_THREADS should be your host machine's number of threads minus 2 or same.  


PARALLEL_MAKE should be the number of threads your host machine has plus two.<br>
PARALLEL_MAKE should be the number of threads your host machine has plus two.<br>  


=== download directory.  ===
=== download directory.  ===


Recommended to save download time and space.
Recommended to save download time and space.  


DL_DIR = "/home/&lt;uname&gt;/yocto_dl"<br>
DL_DIR = "/home/&lt;uname&gt;/yocto_dl"<br>  


= Build your image  =
= Build your image  =
Line 216: Line 217:
= U-Boot options<br>  =
= U-Boot options<br>  =


By default all images are built for NAND based U-Boot. If you want to change the setting to build SD-Card images, change the board file.<br>  
By default all images are built for NAND-based U-Boot. If you want to change the setting to build SD-Card images, change the board file.<br>  


under ~/var_yocto/sources/meta-fsl-arm-extra/conf/machine you will find Variscite board definitions.<br>  
under ~/var_yocto/sources/meta-fsl-arm-extra/conf/machine you will find Variscite board definitions.<br>  
Line 260: Line 261:
Install the tools by running:<br>  
Install the tools by running:<br>  
<pre>$ tmp/deploy/sdk/poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.1.sh</pre>  
<pre>$ tmp/deploy/sdk/poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.1.sh</pre>  
The toolchain name depend on your build machine and may change.<br>
The toolchain name depend on your build machine and may change.<br>  


= Build Linux out of Yocto tree<br>  =
= Build Linux out of Yocto tree<br>  =
Line 298: Line 299:
Install the Linux modules into the rootfs file system<br>  
Install the Linux modules into the rootfs file system<br>  
<pre>$ sudo make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules_install INSTALL_MOD_PATH=../rootfs
<pre>$ sudo make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules_install INSTALL_MOD_PATH=../rootfs
</pre>
</pre>  
 
= Build U-Boot out of Yocto tree<br>  =
= Build U-Boot out of Yocto tree<br>  =


Line 331: Line 331:
<pre>sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync
<pre>sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync
</pre>  
</pre>  
Set the /dev/mmcblk0 according to you host sd-card device.
Set the /dev/mmcblk0 according to you host sd-card device.  


= Creating recovery SD-Card  =
= Creating a recovery SD-Card  =


''Comment: we use Ubuntu 12.04 mount convention and a laptop media name. "/media/var_som_mx6_rf" and "/dev/mmcblk0" are widely used in this section.<br>You should be aware of this and change the media name to you host machine name.''<br>
{{note|Comment:<br/> we use Ubuntu 12.04 mount convention and a laptop media name. "/media/var_som_mx6_rf" and "/dev/mmcblk0" are widely used in this section.<br>You should be aware of this and change the media name to you host machine name.|info}}


Create a new folder:<br>  
Create a new folder:<br>  
Line 392: Line 392:
Un mount the SD-Card<br>  
Un mount the SD-Card<br>  
<pre>$ sudo dd of=mx6qd-som-nand-recovery-sd.v19.img if=/dev/mmcblk0 bs=1M </pre>  
<pre>$ sudo dd of=mx6qd-som-nand-recovery-sd.v19.img if=/dev/mmcblk0 bs=1M </pre>  
<br>
''Comment:<br>I used "/dev/mmcblk0" as the SD-Card device name. You should replace it with your own SD-Card device name.''<br>
= Appendix  =
== Running Yocto rootfs on Variscite board using tftp &amp; nfs  ==
=== Host  ===
Make sure you installed NFS server:
<pre>$ sudo apt-get install nfs-kernel-server
$ cd ~/var-som-mx6-dora-v3
$ sudo mkdir rootfs
$ cd rootfs
$ sudo tar xvf ../build_mx6q/tmp/deploy/images/vafsl-image-gui-varsommx6q.tar.bz2 </pre><pre>$ sudo gedit /etc/exports </pre>
add:
/home/&lt;uname&gt;/var-som-mx6-dora-v3/rootfs *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
exit &amp; save
<pre>$ sudo /etc/init.d/nfs-kernel-server restart</pre>
Make sure you installed TFTP server:
<pre>$ sudo apt-get install xinetd tftpd tftp
Verify:
$ ls /usr/sbin/in.tftpd
$ sudo gedit /etc/xinetd.d/tftp
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo /etc/init.d/xinetd restart
$ cp ~/var-som-mx6-dora/buildmx6q/tmp/deploy/images/varsommx6q/uImage /tftpboot</pre>
=== Target  ===
make sure you have a serial connection to the target.


reset and hold the space bar. This will brink you to u-boot prompt
{{note|Comment:<br/>I used <nowiki>"/dev/mmcblk0"</nowiki> as the SD-Card device name. You should replace it with your own SD-Card device name.|info}}
<pre>$ setenv serverip 192.168.1.188
$ setenv ethaddr a8:cc:3d:d9:b8:f5
$ setenv kernel uImage
$ setenv nfsroot /home/&lt;uname&gt;/fsl-community-bsp/rootfs
$ setenv bootcmd run bootcmd_net
$ saveenv </pre>  
You are all set. Pushing reset on the VAR-SOM-MX6 board will run your Yocto result file system.<br>


== Useful Bitbake commands  ==
= Useful Bitbake commands  =


http://elinux.org/Bitbake_Cheat_Sheet  
http://elinux.org/Bitbake_Cheat_Sheet  
Line 456: Line 403:
i.MX Yocto Project: ltib versus bitbake:  
i.MX Yocto Project: ltib versus bitbake:  


https://community.freescale.com/docs/DOC-94874<br>
https://community.freescale.com/docs/DOC-94874<br>
 
= Unit Testing  =
 
=== GPU  ===
 
Play OpenGLES demo, from Linux shell type:
<pre>$&nbsp;modprobe galcore
$&nbsp;cd /opt/viv_samples/vdk/ &amp;&amp; ./tutorial3 -f 1000
</pre>
=== WLAN  ===
 
List SSIDs, from Linux shell type:
<pre>$&nbsp;ifconfig wlan0 up
$&nbsp;iwlist wlan0 scan
</pre>
Connecting to an encrypted network<br>
 
Find your network from the above scan command.<br>
<pre>wpa_passphrase &lt;YourAP&gt; &lt;YourPassword&gt; &gt;wpa.conf
ps | grep wpa_supplicant
kill the wpa_supplicant process if exist.
wpa_supplicant -Dwext -iwlan0 -c./wpa.conf -B
udhcpc -iwlan0
ifconfig
</pre>
=== Video playback  ===
 
Play video file,&nbsp;from linux shell type:<br>
<pre>$ gplay &lt;file&gt;
</pre>
=== HDMI, LVDS , LCD boot arguments  ===
 
All paramters are u-boot enviroment parameters.<br>
 
Default:<br>
<pre>U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
</pre>
This will set the LCD to work. <br>
 
HDMI 1080P:<br>
<pre>U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB16 fbmem=48M vmalloc=400 mxc_hdmi.only_cea=1'
</pre>
mxc_hdmi.only_cea=1 paramter is to work with dvi-hdmi adapter. If you connect it to a TV-HDMI this paramters is not required.<br>
 
HDMI 720P:<br>
<pre>U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24'</pre>
LVDS and LCD Dual display:<br>
<pre>U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=dul0'
</pre>
LVDS only display:<br>
<pre>U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=sin1'
</pre>
LVDS only display with screen paramters:<br>
<pre>U-Boot # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,if=RGB24'
</pre>
 
=== RTC<br>  ===
 
To set the RTC first set the date from Linux shell, type:<br>
<pre>$ date 2013.08.27-15:43
</pre>
Then set the real time clock from Linux shell, type:<br>
<pre>$ hwclock --systohc
</pre>
Power down your board wait 5 minutes and power up. Check your system with date and the time should be up to date.<br>
 
=== Camera  ===
<pre>$ modprobe ov5642_camera
$ modprobe mxc_v4l2_capture
$ /etc/rc5.d/S01xserver-nodm stop
$ gst-launch mfw_v4lsrc ! mfw_v4lsink
</pre>
 
=== USB OTG as host<br>  ===
 
Plugin Disk on Key Keyboard or Mouse. It will work automaticly.<br>
 
Use the file manager and the mouse to browse the file system.<br>
 
You can open terminal and type in Linux commands.<br>
 
=== USB OTG as device<br>  ===
 
Plug a cable to a A linux host.<br>
 
Folow [http://www.linux-usb.org/gadget/file_storage.html www.linux-usb.org/gadget/file_storage.html] and build the backing_file.<br>
 
On the Target:<br>
<pre>modprobe g_file_storage file=./backing_file
</pre>
On the Host:
<pre>use dmesg and find out your device for example /dev/sdb
sudo dd if=/dev/zero of=/dev/sdb bs=128k count=1000
</pre>
=== 3 ports USB Host<br>  ===
 
Plug a DiskOnKey, Mouse or Keyboard to any of the 3 ports.
=== canbus<br>  ===
 
#Patch the kernel. Download&nbsp;0001-can-bus-enable.patch from our ftp site. Place it in VAR-MX6-yocto-dora-v3/sources/meta-fsl-arm-extra/recipes-kernel/linux/linux-variscite-3.0.35. Edit linux-variscite_3.0.35.bb change:<br># SRC_URI += "file://0001-file-rename.patch \<br>#"<br>into:<br>SRC_URI += "file://0001-can-bus-enable.patch \<br>"<br>
#Add canutils. Edit VAR-MX6-yocto-dora-v3/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb. Add canutilis to the image build.<br>IMAGE_INSTALL += " \<br> ${SOC_IMAGE_INSTALL} \<br> cpufrequtils \<br> nano \<br> packagegroup-fsl-gstreamer \<br> packagegroup-fsl-tools-testapps \<br> packagegroup-fsl-tools-benchmark \<br> packagegroup-qt-in-use-demos \<br> qt4-plugin-phonon-backend-gstreamer \<br> qt4-demos \<br> qt4-examples \<br> fsl-gui-extrafiles \<br> minicom \<br> imx-kobs \<br> tcf-agent \<br> openssh-sftp-server \<br> canutils \<br> "<br>
#Build and deploy your image.<br>
#Connect 2 boards. Each board JP26 connect to the other with the right cable.<br>
 
Set the 2 boards:<br>
<pre>$ canconfig can0 bitrate 125000
$ ifconfig can0 up </pre>
On board 1:<br>
<pre>canecho can0 -v
</pre>
On board 2:<br>
<pre>cansend can0 -i0x100 11 22 33 44
</pre>

Revision as of 14:18, 19 January 2014

VAR-SOM-MX6 - Yocto V4.1 Dora R2

Introduction

This is the second release of VAR-SOM-MX6 - Yocto V4.1 Dora. We updated the kernel with features and cleanup update u-boot and added support for Bluetooth and camera on the Dual lite and Solo SOM versions.
We also added 2 packages that enable Eclipse/Yocto application debug. A debug application note will come soon.

Supported hardware and features

Feature
Description
Board support
VAR-DVK-MX6,VAR-SOM-MX6
CPU

i.MX6 Quad
i.MX6 Dual
i.MX6 Dual lite
i.MX6 Solo

Software platform

Yocto Dora release.
Freescale release version 4.1
Meta freescale community release for Dora

Nand Recovery NAND-recovery SD V22 - can be downloaded from FTP
NAND Flash size support
0.5,1.0,2.0 GB
SD-Card
+
Wired Network
10/100/1000 Mbps Ethernet
Wireless Network
802.11 b/g/n
Bluetooth
4.0
USB host
+
USB OTG
Host and Device
Uarts
x3, up to 3.6 Mbps. Minicom avilable to use with the port
RTC
+
Display HDMI 720P,1080P LVDS0 (On board LVDS to RGB bridge, EVK supports 800x480 resolution) LVDS1 external display
Audio Line IN/ Line out
Camera ov5640 camera sensor. CB402 board can be ordered seperately
SATA +

Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1.

Installing required packages

Follow the link below and install all the required packages on your machine.

www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html

For example, if building machine is an Ubuntu machine:

sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath libsdl1.2-dev xterm

Variscite Yocto build is tested with Ubuntu 12.04 lts.

Get Yocto Dora for i.MX6 with Variscite VAR-SOM-MX6 support

Method 1 (recommended)

$ cd ~
$ tar xvf var_yocto_rel_v3.2.tar.bz2

This will install an entire source tree. No need to apply any patch.

Method 2 using "Repo"

Install the `repo` utility:

$ mkdir ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH

In case of repo problems a tested version can be download from Variscite's ftp.

Get Yocto Dora from github.

$ cd ~
$ mkdir var-som-mx6-dora-v3
$ cd var-som-mx6-dora-v3
$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dora
$ repo sync

Download var_yocto_v3.2.tar.bz2 from Variscite's FTP.

$ tar xvf var_yocto_v3.2.tar.bz2
$ variscite/install


Setup and Customize your Yocto build

Setup the environment and build folder

MACHINE=varsommx6q . setup-environment build_mx6q

local.conf customizations

edit conf/local.conf

Set:

MACHINE options

Macine selection

MACHINE ??= 'varsommx6q'
Build for the Quad or The Dual MX6 SOC version
MACHINE ??= 'varsommx6dual'
Build for the Dual Lite MX6 SOC version
MACHINE ??= 'varsommx6solo'
Build for the Solo MX6 SOC version

Parallel build

Set the build parameters to fully utilize your host machine

BB_NUMBER_THREADS = '4'
PARALLEL_MAKE = '-j 6'

BB_NUMBER_THREADS should be your host machine's number of threads minus 2 or same.

PARALLEL_MAKE should be the number of threads your host machine has plus two.

download directory.

Recommended to save download time and space.

DL_DIR = "/home/<uname>/yocto_dl"

Build your image

$ bitbake core-image-base
$ bitbake fsl-image-test
$ bitbake fsl-image-gui 


image name
description
core-image-base
A console-only image that fully supports the target device hardware.
fsl-image-test
Builds contents core-image-base plus Freescale test applications and multimedia components.
fsl-image-gui
Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11


The resulted images are in tmp/deploy/images/varsommx6q.
Looking at tmp/deploy/images/varsommx6q you will find 6 main files that are linked to the actual file

Image Name
How to use
fsl-image-gui-varsommx6q.ext3
Not in Use
fsl-image-gui-varsommx6q.sdcard

Flash into SD-card and use boot select to boot from.

$ sudo dd if=tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.sdcard of=/dev/devxxx bs=1024k

devxxx = mmcblk0 or sdX. Do dmesg after you insert an SD-Card into your build system to figure out the device name

fsl-image-gui-varsommx6q.tar.bz2

Used to create an NFS root file system on the host.

$ sudo mkdir ../rootfs
$ sudo rm -rf ../rootfs/*
# sudo tar xvf tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.tar.bz2 -C ../rootfs

See apendix for setting an NFS server

fsl-image-gui-varsommx6q.ubi
u-boot.bin
uImage

The best practice is to use Variscite's NAND-recovery SD-Card. update the Yocto folder on the SD-Card
/opt/recover/Yocto and replace u-boot, uImage and the UBI files with the files on tmp/deploy/images.

You can also look at /sbin/nand-recovery.sh for the excat procedure to flash the nand.

U-Boot options

By default all images are built for NAND-based U-Boot. If you want to change the setting to build SD-Card images, change the board file.

under ~/var_yocto/sources/meta-fsl-arm-extra/conf/machine you will find Variscite board definitions.

varsommx6q.conf
varsommx6solo.conf
varsommx6dual.conf

Edit you specifc board and change UBOOT_MACHINE according to the folowing table.

Definition
Built for
mx6q_var_som_config
VAR-SOM-MXQ/D,  boot from MMC
mx6solo_var_som_config
VAR-SOM-MXSolo, boot from MMC
mx6dl_var_som_config
VAR-SOM-MXDL,    boot from MMC
mx6q_var_som_nand_config
VAR-SOM-MXQ/D,  boot from NAND
mx6solo_var_som_nand_config
VAR-SOM-MXSolo, boot from NAND
mx6dl_var_som_nand_config
VAR-SOM-MXDL,    boot from NAND

Toolchain

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:

poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.sh.

Install the tools by running:

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

The toolchain name depend on your build machine and may change.

Build Linux out of Yocto tree

Prepare the Linux kernel

$ bitbake -c cleansstate linux-variscite
$ bitbake -c devshell linux-variscite 

This will open a new shell at ...tmp/work/varsommx6q-poky-linux-gnueabi/linux-variscite/3.0.35-r0/git#

Copy the Linux kernel to a new folder

$ mkdir ~/var-som-mx6-dora-v3/linux-imx
$ cp -a * ~/var-som-mx6-dora-v3/linux-imx
$ exit

change dir into the new Linux kernel folder

$ cd ~/var-som-mx6-dora-v3/linux-imx

Set the tools path:

$ export PATH=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi:$PATH

Clean the Linux kernel:

$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper

Configure the Linux kernel:

$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- var_som_mx6_defconfig

Change configuration if required:

$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig

Build the Linux kernel:

$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules

The best practice of testing the new Linux kernel is using TFTP&NFS. Described in the apendix.

$ cp arch/arm/boot/uImage /tftpboot

Install the Linux modules into the rootfs file system

$ sudo make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules_install INSTALL_MOD_PATH=../rootfs

Build U-Boot out of Yocto tree

Prepare the U-Boot boot loader

$ bitbake -c cleansstate u-boot-variscite
$ bitbake -c devshell u-boot-variscite 

This will open a new shell at ...tmp/work/varsommx6q-poky-linux-gnueabi/linux-variscite/3.0.35-r0/git#

Copy the U-Boot boot loader to a new folder

$ mkdir ~/var-som-mx6-dora/uboot-imx
$ cp -a * ~/var-som-mx6-dora/uboot-imx
$ exit

change dir into the new u-boot folder

$ cd ~/var-som-mx6-dora/uboot-imx

set the tools path if required

$ export PATH=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi:$PATH

Clean the U-Boot

$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper

Configure the U-Boot boot loader

$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_nand_config

Build the U-Boot boot loader

$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- 

Use our NAND-recovery sd-card to burn your u-boot to the NAND-Flash.

In case you build an sd-card version use

sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync

Set the /dev/mmcblk0 according to you host sd-card device.

Creating a recovery SD-Card

Comment:
we use Ubuntu 12.04 mount convention and a laptop media name. "/media/var_som_mx6_rf" and "/dev/mmcblk0" are widely used in this section.
You should be aware of this and change the media name to you host machine name.

Create a new folder:

$ mkdir ~/my_recovery_sd
$ cd ~/my_recovery_sd

Insert Variscite recovery SD-Card version 19 into your host machine.

Copy the recovery folder from the SD-Card into your local folder:

$ sudo cp -a /media/var_som_mx6_rf/opt/recovery ./
$ sudo cp /media/var_som_mx6_rf/sbin/nand-recovery.sh ./

Update your local folder with the files you created during the Yocto build:

$ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.ubi recovery/Yocto/rootfs.ubi.img
$ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.tar.bz2 recovery/Yocto/rootfs.tar.bz2
$ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/uImage recovery/Yocto/uImage
$ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6q/u-boot.bin recovery/Yocto/u-boot.bin 

Copy the SD-Card image from your Yocto build folder to the local recovery folder:

$ sudo cp ~/var-som-mx6-dora/build_mx6q/tmp/deploy/images/varsommx6dual/fsl-image-gui-varsommx6dual.sdcard ./

Build U-Boot for SD-Card. Follow the "Build U-Boot out of Yocto tree" section.

Configure U-Boot with:

$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_config

Build U-Boot:

$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- 

Copy U-Boot from your U-Boot build folder to the local recovery folder:

$ cp u-boot.bin ~/my_recovery_sd

From ~/my_recovery_sd folder

Unmount your SD-Card.

Build the SD-Card. First flash the SD-Card image and U-Boot.

$ sudo dd if=fsl-image-gui-varsommx6q.sdcard of=/dev/mmcblk0 bs=1M
$ sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync
$ sync

Set the SD-Card label:

$ Sudo apt-get install gparted
$ sudo gparted
Set the label to var_som_mx6_rf

Mount the SD-Card. You can simply remove it and inster it again to your host machine.

Copy all files from the recovery folder on your host machibe into the SD-Card:

$ sudo cp -a recovery/ /media/var_som_mx6_rf/opt/
$ sudo cp nand-recovery.sh /media/var_som_mx6_rf/sbin/
$ sudo rm /media/var_som_mx6_rf/var/lib/alsa/asound.state 

If you want you can back up your new SD-Card image:

Un mount the SD-Card

$ sudo dd of=mx6qd-som-nand-recovery-sd.v19.img if=/dev/mmcblk0 bs=1M 


Comment:
I used "/dev/mmcblk0" as the SD-Card device name. You should replace it with your own SD-Card device name.

Useful Bitbake commands

http://elinux.org/Bitbake_Cheat_Sheet

https://community.freescale.com/docs/DOC-94953

i.MX Yocto Project: ltib versus bitbake:

https://community.freescale.com/docs/DOC-94874