VAR-SOM-MX6 Yocto GS R5: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
{{PageHeader|VAR-SOM-MX6 - Yocto fsl-L3.10.17_1.0.0 Dora R5 Beta1}} | {{PageHeader|VAR-SOM-MX6 - Yocto fsl-L3.10.17_1.0.0 Dora R5 Beta1}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__ | ||
{{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} | |||
__toc__ | |||
= Introduction | = Introduction = | ||
= Supported hardware and features | * This Yocto Dora release is based on Freescale fsl-L3.10.17_1.0.0GA release.<br/>Major features: | ||
* Linux kernel: linux-imx_3.10.17_1.0.0_ga. | |||
* Uboot: u-boot-imx-2013.04. | |||
* Yocto Dora: Based on fsl-L3.10.17_1.0.0_iMX6qdls Freescale release (previous versions were based on the community release). Yocto Dora was re-structured as most of Variscite support code is located in meta-variscite folder. | |||
= Supported hardware and features = | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! scope="col" | Feature<br> | ! scope="col" | Feature<br/> | ||
! scope="col" | Description<br> | ! scope="col" | Description<br/> | ||
|- | |- | ||
| Board support<br> | | Board support<br/> | ||
| [http://www.variscite.com/products/evaluation-kits/var-dvk-mx6 VAR-DVK-MX6],[http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-mx6-cpu-freescale-imx6 VAR-SOM-MX6]<br> | | [http://www.variscite.com/products/evaluation-kits/var-dvk-mx6 VAR-DVK-MX6],[http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-mx6-cpu-freescale-imx6 VAR-SOM-MX6]<br/> | ||
|- | |- | ||
| CPU<br> | | CPU<br/> | ||
| | | | ||
[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fr=g i.MX6 Quad]<br>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6D&fr=g i.MX6 Dual]<br>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6DL&fr=g i.MX6 Dual lite]<br>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6S&nodeId=018rH3ZrDRB24A i.MX6 Solo] | [http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fr=g i.MX6 Quad]<br/>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6D&fr=g i.MX6 Dual]<br/>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6DL&fr=g i.MX6 Dual lite]<br/>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6S&nodeId=018rH3ZrDRB24A i.MX6 Solo] | ||
|- | |- | ||
| Software platform<br> | | Software platform<br/> | ||
| | | | ||
[https://wiki.yoctoproject.org/wiki/Releases Yocto Dora release.]<br>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fpsp=1&tab=Design_Tools_Tab Freescale release version 4.1]<br>[https://github.com/Freescale Meta freescale community release for Dora] | [https://wiki.yoctoproject.org/wiki/Releases Yocto Dora release.]<br/>[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fpsp=1&tab=Design_Tools_Tab Freescale release version 4.1]<br/>[https://github.com/Freescale Meta freescale community release for Dora] | ||
|- | |- | ||
| Nand Recovery | | Nand Recovery | ||
| | | | ||
|- | |- | ||
| NAND Flash size support<br> | | NAND Flash size support<br/> | ||
| 0.5,1.0,2.0,4.0 GB<br> | | 0.5,1.0,2.0,4.0 GB<br/> | ||
|- | |- | ||
| DDR size support configuration<br> | | DDR size support configuration<br/> | ||
| Solo:0.5,1.0 GB DualLite: 1.0GB Dual: 0.5,1.0GB Quad: 1.0,2.0 GB<br> | | Solo:0.5,1.0 GB DualLite: 1.0GB Dual: 0.5,1.0GB Quad: 1.0,2.0 GB<br/> | ||
|- | |- | ||
| SD-Card<br> | | SD-Card<br/> | ||
| +<br> | | +<br/> | ||
|- | |- | ||
| Wired Network<br> | | Wired Network<br/> | ||
| 10/100/1000 Mbps Ethernet<br> | | 10/100/1000 Mbps Ethernet<br/> | ||
|- | |- | ||
| Wireless Network<br> | | Wireless Network<br/> | ||
| 802.11 b/g/n<br> | | 802.11 b/g/n<br/> | ||
|- | |- | ||
| Bluetooth<br> | | Bluetooth<br/> | ||
| 4.0<br> | | 4.0<br/> | ||
|- | |- | ||
| CAN bus<br> | | CAN bus<br/> | ||
| +<br> | | +<br/> | ||
|- | |- | ||
| I2C<br> | | I2C<br/> | ||
| +<br> | | +<br/> | ||
|- | |- | ||
| SPI<br> | | SPI<br/> | ||
| +<br> | | +<br/> | ||
|- | |- | ||
| USB host<br> | | USB host<br/> | ||
| +<br> | | +<br/> | ||
|- | |- | ||
| USB OTG<br> | | USB OTG<br/> | ||
| Device only. Host will be supported on next version<br> | | Device only. Host will be supported on next version<br/> | ||
|- | |- | ||
| Uarts<br> | | Uarts<br/> | ||
| x3, up to 3.6 Mbps. Minicom avilable to use with the port<br> | | x3, up to 3.6 Mbps. Minicom avilable to use with the port<br/> | ||
|- | |- | ||
| RTC<br> | | RTC<br/> | ||
| +<br> | | +<br/> | ||
|- | |- | ||
| Display | | Display | ||
| HDMI 720P,1080P LVDS0 (On board LVDS to RGB bridge, EVK supports 800x480 resolution) LVDS1 external display | | HDMI 720P,1080P LVDS0 (On board LVDS to RGB bridge, EVK supports 800x480 resolution) LVDS1 external display | ||
|- | |- | ||
| Audio | | Audio | ||
| Line IN/ Line out | | Line IN/ Line out | ||
|- | |- | ||
| Camera | | Camera | ||
| ov5640 camera sensor. CB402 board can be ordered seperately | | ov5640 camera sensor. CB402 board can be ordered seperately | ||
|- | |- | ||
| SATA | | SATA | ||
| + | | + | ||
|} | |} | ||
Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1 | Variscite Yocto Dora release 2 for Freescale i.MX6 version 4.1. | ||
= Installing required packages<br/> = | |||
Follow the link below and install all the required packages on your machine. | |||
[http://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html] | |||
For example, if your building machine is an Ubuntu machine: | |||
<pre>sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath libsdl1.2-dev xterm</pre> | |||
Variscite Yocto build is tested with Ubuntu 12.04 lts. | |||
= Get Yocto Dora for i.MX6 with Variscite VAR-SOM-MX6 support = | |||
This method use a "repo" to fetch Yocto and apply Variscite patch for BSP support. | This method use a "repo" to fetch Yocto and apply Variscite patch for BSP support. Install the `repo` utility: | ||
Install the `repo` utility: | |||
<pre>$ mkdir ~/bin (this step may not be needed if the bin folder already exists) | <pre>$ mkdir ~/bin (this step may not be needed if the bin folder already exists) | ||
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | ||
$ chmod a+x ~/bin/repo | $ chmod a+x ~/bin/repo | ||
Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable | Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable | ||
$ export PATH=~/bin:$PATH</pre> | $ export PATH=~/bin:$PATH</pre> | ||
{{note| NOTE:<br>we uploaded as a reference the repo we used.|info}} | {{note| NOTE:<br>we uploaded as a reference the repo we used.|info}} | ||
Get Yocto Dora from github. | Get Yocto Dora from github. | ||
<pre>$ cd ~ | <pre>$ cd ~ | ||
$ mkdir var-som-mx6-dora-v5 | $ mkdir var-som-mx6-dora-v5 | ||
Line 121: | Line 113: | ||
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.17-1.0.0_ga | $ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.17-1.0.0_ga | ||
$ repo sync | $ repo sync | ||
</pre> | </pre> | ||
Download var_yocto_v5b1.tar.bz2 from Variscite's FTP. | Download var_yocto_v5b1.tar.bz2 from Variscite's FTP. | ||
<pre>$ tar xvf var_yocto_v5b1.tar.bz2 | <pre>$ tar xvf var_yocto_v5b1.tar.bz2 | ||
$ variscite/install</pre> | $ variscite/install</pre> | ||
{{note|Comment:<br/>This method will keep the git repositories. It will enable you to track Variscite and your changes.|info}} | {{note|Comment:<br/>This method will keep the git repositories. It will enable you to track Variscite and your changes.|info}} | ||
= Setup and Customize your Yocto build | = Setup and Customize your Yocto build = | ||
Setup the environment and use build_var folder | Setup the environment and use build_var folder | ||
<pre>$ . ./setup-environment build_var | <pre>$ . ./setup-environment build_var | ||
</pre> | </pre> | ||
{{note|Comment:<br/>If you close your terminal and want to build Yocto you should change directory to ~var-som-mx6-dora-v3 and run the above command again. build_var is your build directory and all bitbake commands should run from it|info}} | {{note|Comment:<br/>If you close your terminal and want to build Yocto you should change directory to ~var-som-mx6-dora-v3 and run the above command again. build_var is your build directory and all bitbake commands should run from it|info}} | ||
== local.conf customizations<br> | == local.conf customizations<br/> == | ||
Edit you local.conf file: | Edit you local.conf file: | ||
<pre>$ gedit conf/local.conf | <pre>$ gedit conf/local.conf | ||
</pre> | </pre> | ||
Change your SOM version, parallel build and download directory: | Change your SOM version, parallel build and download directory: | ||
=== Parallel build<br> | === Select VAR-SOM_MX6 SOM version<br/> === | ||
Set the build parameters to fully utilize your host machine | |||
BB_NUMBER_THREADS = '4'<br>PARALLEL_MAKE = '-j 6' | One of:<br/>MACHINE ??= 'varsomimx6q'<br/>MACHINE ??= 'varsomimx6q2'<br/>MACHINE ??= 'varsomimx6dl'<br/>MACHINE ??= 'varsomimx6solo' | ||
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. | === Parallel build<br/> === | ||
=== Download directory. | |||
Recommended to save download time and space. | Set the build parameters to fully utilize your host machine BB_NUMBER_THREADS = '4'<br/>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. | ||
DL_DIR = "/home/<uname>/yocto_dl" | |||
=== Download directory. === | |||
Recommended to save download time and space. DL_DIR = "/home/<uname>/yocto_dl" | |||
= Build your image | = Build your image = | ||
<pre>$ bitbake var-image-x11 </pre> | <pre>$ bitbake var-image-x11 </pre> | ||
Other image build options: | Other image build options: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! scope="col" | image name <br> | ! scope="col" | image name<br/> | ||
! scope="col" | description<br> | ! scope="col" | description<br/> | ||
|- | |- | ||
| core-image-base<br> | | core-image-base<br/> | ||
| A console-only image that fully supports the target device hardware.<br> | | A console-only image that fully supports the target device hardware.<br/> | ||
|- | |- | ||
| var-image-test <br> | | var-image-test<br/> | ||
| Builds contents core-image-base plus Freescale test applications and multimedia components.<br> | | Builds contents core-image-base plus Freescale test applications and multimedia components.<br/> | ||
|- | |- | ||
| var-image-x11 <br> | | var-image-x11<br/> | ||
| Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11 <br> | | Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11<br/> | ||
|} | |} | ||
The resulted images are in tmp/deploy/images/varsomimx6q.<br>Looking at tmp/deploy/images/varsomimx6q you will find 6 main files that are linked to the actual file<br> | |||
The resulted images are in tmp/deploy/images/varsomimx6q.<br/>Looking at tmp/deploy/images/varsomimx6q you will find 6 main files that are linked to the actual file<br/> | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! scope="col" | Image Name<br> | ! scope="col" | Image Name<br/> | ||
! scope="col" | How to use<br> | ! scope="col" | How to use<br/> | ||
|- | |- | ||
| var-image-x11-varsomimx6q.ext3<br> | | var-image-x11-varsomimx6q.ext3<br/> | ||
| Not in Use<br> | | Not in Use<br/> | ||
|- | |- | ||
| var-image-x11-varsomimx6q.sdcard | | var-image-x11-varsomimx6q.sdcard | ||
| | | | ||
Flash into SD-card and use boot select to boot from. | Flash into SD-card and use boot select to boot from. | ||
<pre>$ sudo dd if=tmp/deploy/images/varsomimx6q/var-image-x11-varsomimx6q.sdcard of=/dev/devxxx bs=1024k | <pre>$ sudo dd if=tmp/deploy/images/varsomimx6q/var-image-x11-varsomimx6q.sdcard of=/dev/devxxx bs=1024k | ||
</pre> | </pre> | ||
Build u-boot out of tree for mmc as explained below and | Build u-boot out of tree for mmc as explained below and | ||
<pre>$ sudo dd if=u-boot.imx of=/dev/devxxx bs=512 seek=2; sync | <pre>$ sudo dd if=u-boot.imx of=/dev/devxxx bs=512 seek=2; sync | ||
</pre> | </pre> | ||
devxxx = mmcblk0 or sdX. Do dmesg after you insert an SD-Card into your build system to figure out the device name<br> | devxxx = mmcblk0 or sdX. Do dmesg after you insert an SD-Card into your build system to figure out the device name<br/>{{note|Comment:<br/>Use "$ sudo gparted /dev/devxxx" | ||
{{note|Comment:<br/>Use "$ sudo gparted /dev/devxxx" | |||
*Lable the second partition and call it "rootfs". | *Lable the second partition and call it "rootfs". | ||
*Increase the second partition to include all avilable sd-card space.|info}} | *Increase the second partition to include all avilable sd-card space.|info}} | ||
|- | |- | ||
| var-image-x11-varsomimx6q.tar.bz2 | | var-image-x11-varsomimx6q.tar.bz2 | ||
| | | | ||
Used to create an NFS root file system on the host. | Used to create an NFS root file system on the host. | ||
<pre>$ sudo mkdir ../rootfs | <pre>$ sudo mkdir ../rootfs | ||
$ sudo rm -rf ../rootfs/* | $ sudo rm -rf ../rootfs/* | ||
$ sudo tar xvf tmp/deploy/images/varsomimx6q/var-image-x11-varsomimx6q.tar.bz2 -C ../rootfs | $ sudo tar xvf tmp/deploy/images/varsomimx6q/var-image-x11-varsomimx6q.tar.bz2 -C ../rootfs | ||
</pre> | </pre> | ||
See apendix for setting an NFS server | See apendix for setting an NFS server | ||
|- | |- | ||
| var-image-x11-varsomimx6q.ubi | | var-image-x11-varsomimx6q.ubi | ||
| | | | ||
Use the sdcard created above. Copy the file into it and use the folwing commands to flash them into nand.<br> | Use the sdcard created above. Copy the file into it and use the folwing commands to flash them into nand.<br/>Coping files (mount the sd-card created above first): | ||
Coping files (mount the sd-card created above first): | |||
<pre>$ sudo mkdir /media/rootfs/opt/images | <pre>$ sudo mkdir /media/rootfs/opt/images | ||
$ sudo cp tmp/deploy/images/varsomimx6q/u-boot.imx /media/rootfs/opt/images | $ sudo cp tmp/deploy/images/varsomimx6q/u-boot.imx /media/rootfs/opt/images | ||
Line 233: | Line 224: | ||
| u-boot.imx | | u-boot.imx | ||
| | | | ||
|} | |} | ||
= 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. | 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. | under ~/var_yocto/sources/meta-fsl-arm-extra/conf/machine you will find Variscite board definitions. | ||
varsommx6q.conf<br>varsommx6solo.conf<br>varsommx6dual.conf | varsommx6q.conf<br/>varsommx6solo.conf<br/>varsommx6dual.conf | ||
Edit you specifc board and change UBOOT_MACHINE according to the folowing table. | Edit you specifc board and change UBOOT_MACHINE according to the folowing table. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! scope="col" | Definition<br> | ! scope="col" | Definition<br/> | ||
! scope="col" | Built for<br> | ! scope="col" | Built for<br/> | ||
|- | |- | ||
| mx6q_var_som_config <br> | | mx6q_var_som_config<br/> | ||
| VAR-SOM-MXQ/D 1GB DDR, boot from MMC<br> | | VAR-SOM-MXQ/D 1GB DDR, boot from MMC<br/> | ||
|- | |- | ||
| mx6q_2g_var_som_config <br> | | mx6q_2g_var_som_config<br/> | ||
| VAR-SOM-MXQ/D 2GB DDR, boot from MMC<br> | | VAR-SOM-MXQ/D 2GB DDR, boot from MMC<br/> | ||
|- | |- | ||
| mx6d_0_5g_var_som <br> | | mx6d_0_5g_var_som<br/> | ||
| VAR-SOM-MXD 0.5GB DDR, boot from MMC<br> | | VAR-SOM-MXD 0.5GB DDR, boot from MMC<br/> | ||
|- | |- | ||
| mx6dl_var_som_config<br> | | mx6dl_var_som_config<br/> | ||
| VAR-SOM-MXDL, 1.0 GB DDR boot from MMC<br> | | VAR-SOM-MXDL, 1.0 GB DDR boot from MMC<br/> | ||
|- | |- | ||
| mx6solo_var_som_config <br> | | mx6solo_var_som_config<br/> | ||
| VAR-SOM-MXSolo, 0.5 or 1.0 GB DDR | | VAR-SOM-MXSolo, 0.5 or 1.0 GB DDR boot from MMC<br/> | ||
|- | |- | ||
| mx6q_var_som_nand_config<br> | | mx6q_var_som_nand_config<br/> | ||
| VAR-SOM-MXQ/D, boot from NAND<br> | | VAR-SOM-MXQ/D, boot from NAND<br/> | ||
|- | |- | ||
| mx6q_2g_var_som_nand_config <br> | | mx6q_2g_var_som_nand_config<br/> | ||
| VAR-SOM-MXQ/D 2GB DDR, boot from NAND<br> | | VAR-SOM-MXQ/D 2GB DDR, boot from NAND<br/> | ||
|- | |- | ||
| mx6d_0_5g_var_nand_som <br> | | mx6d_0_5g_var_nand_som<br/> | ||
| VAR-SOM-MXD 0.5GB DDR, boot from NAND<br> | | VAR-SOM-MXD 0.5GB DDR, boot from NAND<br/> | ||
|- | |- | ||
| mx6dl_var_som_nand_config <br> | | mx6dl_var_som_nand_config<br/> | ||
| VAR-SOM-MXDL,1.0 GB DDR boot from NAND<br> | | VAR-SOM-MXDL,1.0 GB DDR boot from NAND<br/> | ||
|- | |- | ||
| mx6solo_var_som_nand_config <br> | | mx6solo_var_som_nand_config<br/> | ||
| VAR-SOM-MXSolo, 0.5 or 1.0 GB DDR boot from NAND<br> | | VAR-SOM-MXSolo, 0.5 or 1.0 GB DDR boot from NAND<br/> | ||
|} | |} | ||
= Toolchain | = Toolchain = | ||
Build the toolchain by: | Build the toolchain by: | ||
<pre>$ bitbake meta-ide-support | <pre>$ bitbake meta-ide-support | ||
$ bitbake meta-toolchain | $ bitbake meta-toolchain | ||
</pre> | </pre> | ||
The output will be located at tmp/deploy/sdk/. On a 64 bit Ubuntu you will get: | 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. | poky-eglibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.sh. | ||
Install the tools by running: | Install the tools by running: | ||
<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. | The toolchain name depend on your build machine and may change. | ||
= Build Linux out of Yocto tree<br> | = Build Linux out of Yocto tree<br/> = | ||
Prepare the Linux kernel | Prepare the Linux kernel | ||
<pre>$ bitbake -c cleansstate linux-variscite | <pre>$ bitbake -c cleansstate linux-variscite | ||
$ bitbake -c devshell linux-variscite </pre> | $ bitbake -c devshell linux-variscite </pre> | ||
This will open a new shell at ...tmp/work/varsommx6q-poky-linux-gnueabi/linux-variscite/3.0.35-r0/git# | 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 | Copy the Linux kernel to a new folder | ||
<pre>$ mkdir ~/var-som-mx6-dora-v4/linux-imx | <pre>$ mkdir ~/var-som-mx6-dora-v4/linux-imx | ||
$ cp -a * ~/var-som-mx6-dora-v4/linux-imx | $ cp -a * ~/var-som-mx6-dora-v4/linux-imx | ||
$ exit | $ exit | ||
</pre> | </pre> | ||
change dir into the new Linux kernel folder | change dir into the new Linux kernel folder | ||
<pre>$ cd ~/var-som-mx6-dora-v4/linux-imx | <pre>$ cd ~/var-som-mx6-dora-v4/linux-imx | ||
</pre> | </pre> | ||
Set the tools path: | Set the tools path: | ||
<pre>$ 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 | <pre>$ 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 | ||
</pre> | </pre> | ||
Clean the Linux kernel: | Clean the Linux kernel: | ||
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper | <pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper | ||
</pre> | </pre> | ||
Configure the Linux kernel: | Configure the Linux kernel: | ||
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- var_som_mx6_defconfig | <pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- var_som_mx6_defconfig | ||
</pre> | </pre> | ||
Change configuration if required: | Change configuration if required: | ||
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig | <pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- menuconfig | ||
</pre> | </pre> | ||
Build the Linux kernel: | Build the Linux kernel: | ||
<pre>$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage | <pre>$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- uImage | ||
$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules | $ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- modules | ||
</pre> | </pre> | ||
The best practice of testing the new Linux kernel is using TFTP& | The best practice of testing the new Linux kernel is using TFTP&NFS. Described in the apendix. | ||
<pre>$ cp arch/arm/boot/uImage /tftpboot | <pre>$ cp arch/arm/boot/uImage /tftpboot | ||
</pre> | </pre> | ||
Install the Linux modules into the rootfs file system | Install the Linux modules into the rootfs file system | ||
<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/> = | |||
Prepare the U-Boot boot loader | |||
Prepare the U-Boot boot loader | |||
<pre>$ bitbake -c cleansstate u-boot-variscite | <pre>$ bitbake -c cleansstate u-boot-variscite | ||
$ bitbake -c devshell u-boot-variscite </pre> | $ bitbake -c devshell u-boot-variscite </pre> | ||
This will open a new shell at ...tmp/work/varsommx6q-poky-linux-gnueabi/linux-variscite/3.0.35-r0/git# | 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 | Copy the U-Boot boot loader to a new folder | ||
<pre>$ mkdir ~/var-som-mx6-dora-v4/uboot-imx | <pre>$ mkdir ~/var-som-mx6-dora-v4/uboot-imx | ||
$ cp -a * ~/var-som-mx6-dora-v4/uboot-imx | $ cp -a * ~/var-som-mx6-dora-v4/uboot-imx | ||
$ exit | $ exit | ||
</pre> | </pre> | ||
change dir into the new u-boot folder | change dir into the new u-boot folder | ||
<pre>$ cd ~/var-som-mx6-dora-v4/uboot-imx</pre> | <pre>$ cd ~/var-som-mx6-dora-v4/uboot-imx</pre> | ||
set the tools path if required | set the tools path if required | ||
<pre>$ 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 | <pre>$ 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 | ||
</pre> | </pre> | ||
Clean the U-Boot | Clean the U-Boot | ||
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper | <pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mrproper | ||
</pre> | </pre> | ||
Configure the U-Boot boot loader | Configure the U-Boot boot loader | ||
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_nand_config | <pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_nand_config | ||
</pre> | </pre> | ||
Build the U-Boot boot loader | Build the U-Boot boot loader | ||
<pre>$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- | <pre>$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- | ||
</pre> | </pre> | ||
Use our NAND-recovery sd-card to burn your u-boot to the NAND-Flash. | Use our NAND-recovery sd-card to burn your u-boot to the NAND-Flash. | ||
In case you build an sd-card version use | In case you build an sd-card version use | ||
<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 a recovery SD-Card | = Creating a recovery SD-Card = | ||
{{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}} | {{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: | Create a new folder: | ||
<pre>$ mkdir ~/my_recovery_sd | <pre>$ mkdir ~/my_recovery_sd | ||
$ cd ~/my_recovery_sd | $ cd ~/my_recovery_sd | ||
</pre> | </pre> | ||
Insert Variscite recovery SD-Card version 19 into your host machine. | Insert Variscite recovery SD-Card version 19 into your host machine. | ||
Copy the recovery folder from the SD-Card into your local folder: | Copy the recovery folder from the SD-Card into your local folder: | ||
<pre>$ sudo cp -a /media/var_mx6_<x>/opt/recovery ./ | <pre>$ sudo cp -a /media/var_mx6_<x>/opt/recovery ./ | ||
$ sudo cp /media/var_mx6_<x>/sbin/nand-recovery.sh ./ | $ sudo cp /media/var_mx6_<x>/sbin/nand-recovery.sh ./ | ||
</pre> | </pre> | ||
Update your local folder with the files you created during the Yocto build: | Update your local folder with the files you created during the Yocto build: | ||
<pre>$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.ubi recovery/Yocto/rootfs.ubi.img | <pre>$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.ubi recovery/Yocto/rootfs.ubi.img | ||
$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.tar.bz2 recovery/Yocto/rootfs.tar.bz2 | $ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.tar.bz2 recovery/Yocto/rootfs.tar.bz2 | ||
$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/uImage recovery/Yocto/uImage | $ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/uImage recovery/Yocto/uImage | ||
$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/u-boot.bin recovery/Yocto/u-boot.bin | $ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/u-boot.bin recovery/Yocto/u-boot.bin | ||
</pre> | </pre> | ||
Copy the SD-Card image from your Yocto build folder to the local recovery folder: | Copy the SD-Card image from your Yocto build folder to the local recovery folder: | ||
<pre>$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6dual/fsl-image-gui-varsommx6dual.sdcard ./ | <pre>$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6dual/fsl-image-gui-varsommx6dual.sdcard ./ | ||
</pre> | </pre> | ||
Build U-Boot for SD-Card. Follow the "Build U-Boot out of Yocto tree" section. | Build U-Boot for SD-Card. Follow the "Build U-Boot out of Yocto tree" section. | ||
Configure U-Boot with: | Configure U-Boot with: | ||
<pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_config | <pre>$ make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- mx6q_var_som_config | ||
</pre> | </pre> | ||
Build U-Boot: | Build U-Boot: | ||
<pre>$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- | <pre>$ make -j6 ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- | ||
</pre> | </pre> | ||
Copy U-Boot from your U-Boot build folder to the local recovery folder: | Copy U-Boot from your U-Boot build folder to the local recovery folder: | ||
<pre>$ cp u-boot.bin ~/my_recovery_sd | <pre>$ cp u-boot.bin ~/my_recovery_sd | ||
</pre> | </pre> | ||
From ~/my_recovery_sd folder | From ~/my_recovery_sd folder | ||
Unmount your SD-Card. | Unmount your SD-Card. | ||
Build the SD-Card. First flash the SD-Card image and U-Boot. | Build the SD-Card. First flash the SD-Card image and U-Boot. | ||
<pre>$ sudo dd if=fsl-image-gui-varsommx6q.sdcard of=/dev/mmcblk0 bs=1M | <pre>$ 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 | $ sudo dd if=u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2 conv=fsync | ||
$ sync | $ sync | ||
</pre> | </pre> | ||
Set the SD-Card label: | Set the SD-Card label: | ||
<pre>$ Sudo apt-get install gparted | <pre>$ Sudo apt-get install gparted | ||
$ sudo gparted | $ sudo gparted | ||
Set the label to var_som_mx6_rf | Set the label to var_som_mx6_rf | ||
</pre> | </pre> | ||
Mount the SD-Card. You can simply remove it and inster it again to your host machine. | 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: | Copy all files from the recovery folder on your host machibe into the SD-Card: | ||
<pre>$ sudo cp -a recovery/ /media/var_som_mx6_rf/opt/ | <pre>$ sudo cp -a recovery/ /media/var_som_mx6_rf/opt/ | ||
$ sudo cp nand-recovery.sh /media/var_som_mx6_rf/sbin/ | $ sudo cp nand-recovery.sh /media/var_som_mx6_rf/sbin/ | ||
$ sudo rm /media/var_som_mx6_rf/var/lib/alsa/asound.state | $ sudo rm /media/var_som_mx6_rf/var/lib/alsa/asound.state | ||
</pre> | </pre> | ||
If you want you can back up your new SD-Card image: | If you want you can back up your new SD-Card image: | ||
{{note|Comment:<br/>I used | Un mount the SD-Card | ||
<pre>$ sudo dd of=mx6qd-som-nand-recovery-sd.v19.img if=/dev/mmcblk0 bs=1M </pre> | |||
{{note|Comment:<br/>I used "/dev/mmcblk0" as the SD-Card device name. You should replace it with your own SD-Card device name.|info}} | |||
= Useful Bitbake commands | = Useful Bitbake commands = | ||
[http://elinux.org/Bitbake_Cheat_Sheet Bitbake Cheat Sheet] | [http://elinux.org/Bitbake_Cheat_Sheet Bitbake Cheat Sheet] | ||
[https://community.freescale.com/docs/DOC-94953 Useful bitbake commands] | [https://community.freescale.com/docs/DOC-94953 Useful bitbake commands] | ||
[https://community.freescale.com/docs/DOC-94874 i.MX Yocto Project: ltib versus bitbake] | [https://community.freescale.com/docs/DOC-94874 i.MX Yocto Project: ltib versus bitbake] | ||
Revision as of 08:17, 11 July 2014
Introduction
- This Yocto Dora release is based on Freescale fsl-L3.10.17_1.0.0GA release.
Major features: - Linux kernel: linux-imx_3.10.17_1.0.0_ga.
- Uboot: u-boot-imx-2013.04.
- Yocto Dora: Based on fsl-L3.10.17_1.0.0_iMX6qdls Freescale release (previous versions were based on the community release). Yocto Dora was re-structured as most of Variscite support code is located in meta-variscite folder.
Supported hardware and features
Feature |
Description |
---|---|
Board support |
VAR-DVK-MX6,VAR-SOM-MX6 |
CPU |
|
Software platform |
Yocto Dora release. |
Nand Recovery | |
NAND Flash size support |
0.5,1.0,2.0,4.0 GB |
DDR size support configuration |
Solo:0.5,1.0 GB DualLite: 1.0GB Dual: 0.5,1.0GB Quad: 1.0,2.0 GB |
SD-Card |
+ |
Wired Network |
10/100/1000 Mbps Ethernet |
Wireless Network |
802.11 b/g/n |
Bluetooth |
4.0 |
CAN bus |
+ |
I2C |
+ |
SPI |
+ |
USB host |
+ |
USB OTG |
Device only. Host will be supported on next version |
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 your 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
This method use a "repo" to fetch Yocto and apply Variscite patch for BSP support. Install the `repo` utility:
$ mkdir ~/bin (this step may not be needed if the bin folder already exists) $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable $ export PATH=~/bin:$PATH
we uploaded as a reference the repo we used.
Get Yocto Dora from github.
$ cd ~ $ mkdir var-som-mx6-dora-v5 $ cd var-som-mx6-dora-v5 $ git config --global user.name "Your Name" $ git config --global user.email "Your Email" $ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.17-1.0.0_ga $ repo sync
Download var_yocto_v5b1.tar.bz2 from Variscite's FTP.
$ tar xvf var_yocto_v5b1.tar.bz2 $ variscite/install
This method will keep the git repositories. It will enable you to track Variscite and your changes.
Setup and Customize your Yocto build
Setup the environment and use build_var folder
$ . ./setup-environment build_var
If you close your terminal and want to build Yocto you should change directory to ~var-som-mx6-dora-v3 and run the above command again. build_var is your build directory and all bitbake commands should run from it
local.conf customizations
Edit you local.conf file:
$ gedit conf/local.conf
Change your SOM version, parallel build and download directory:
Select VAR-SOM_MX6 SOM version
One of:
MACHINE ??= 'varsomimx6q'
MACHINE ??= 'varsomimx6q2'
MACHINE ??= 'varsomimx6dl'
MACHINE ??= 'varsomimx6solo'
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 var-image-x11
Other image build options:
image name |
description |
---|---|
core-image-base |
A console-only image that fully supports the target device hardware. |
var-image-test |
Builds contents core-image-base plus Freescale test applications and multimedia components. |
var-image-x11 |
Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11 |
The resulted images are in tmp/deploy/images/varsomimx6q.
Looking at tmp/deploy/images/varsomimx6q you will find 6 main files that are linked to the actual file
Image Name |
How to use |
---|---|
var-image-x11-varsomimx6q.ext3 |
Not in Use |
var-image-x11-varsomimx6q.sdcard |
Flash into SD-card and use boot select to boot from. $ sudo dd if=tmp/deploy/images/varsomimx6q/var-image-x11-varsomimx6q.sdcard of=/dev/devxxx bs=1024k Build u-boot out of tree for mmc as explained below and $ sudo dd if=u-boot.imx of=/dev/devxxx bs=512 seek=2; sync devxxx = mmcblk0 or sdX. Do dmesg after you insert an SD-Card into your build system to figure out the device name Comment: Use "$ sudo gparted /dev/devxxx"
|
var-image-x11-varsomimx6q.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/varsomimx6q/var-image-x11-varsomimx6q.tar.bz2 -C ../rootfs See apendix for setting an NFS server |
var-image-x11-varsomimx6q.ubi |
Use the sdcard created above. Copy the file into it and use the folwing commands to flash them into nand. $ sudo mkdir /media/rootfs/opt/images $ sudo cp tmp/deploy/images/varsomimx6q/u-boot.imx /media/rootfs/opt/images $ sudo cp tmp/deploy/images/varsomimx6q/uImage /media/rootfs/opt/images $ sudo cp tmp/deploy/images/varsomimx6q/uImage-imx6q-var-som-ldo.dtb /media/rootfs/opt/images/imx6q-var-som-ldo.dtb $ sudo cp tmp/deploy/images/varsomimx6q/uImage-imx6q-var-som.dtb /media/rootfs/opt/images/imx6q-var-som.dtb $ sudo cp tmp/deploy/images/varsomimx6q/var-image-x11-varsomimx6q.ubi /media/rootfs/opt/images $ sudo umount /media/rootfs $ sudo umount /media/BOT_varsomi Flashing on target: $ flash_eraseall /dev/mtd0 $ kobs-ng init -x /opt/images/u-boot.imx --search_exponent=1 -v $ nandwrite -p /dev/mtd0 -s 0x1e0000 /opt/images/imx6q-var-som.dtb $ flash_eraseall /dev/mtd2 $ nandwrite -p /dev/mtd2 /opt/images/uImage $ flash_eraseall /dev/mtd3 $ ubiformat /dev/mtd3 -f /opt/images/var-image-x11-varsomimx6q.ubi -s 2048 -O 2048 |
uImage | |
u-boot.imx |
|
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 1GB DDR, boot from MMC |
mx6q_2g_var_som_config |
VAR-SOM-MXQ/D 2GB DDR, boot from MMC |
mx6d_0_5g_var_som |
VAR-SOM-MXD 0.5GB DDR, boot from MMC |
mx6dl_var_som_config |
VAR-SOM-MXDL, 1.0 GB DDR boot from MMC |
mx6solo_var_som_config |
VAR-SOM-MXSolo, 0.5 or 1.0 GB DDR boot from MMC |
mx6q_var_som_nand_config |
VAR-SOM-MXQ/D, boot from NAND |
mx6q_2g_var_som_nand_config |
VAR-SOM-MXQ/D 2GB DDR, boot from NAND |
mx6d_0_5g_var_nand_som |
VAR-SOM-MXD 0.5GB DDR, boot from NAND |
mx6dl_var_som_nand_config |
VAR-SOM-MXDL,1.0 GB DDR boot from NAND |
mx6solo_var_som_nand_config |
VAR-SOM-MXSolo, 0.5 or 1.0 GB DDR 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-v4/linux-imx $ cp -a * ~/var-som-mx6-dora-v4/linux-imx $ exit
change dir into the new Linux kernel folder
$ cd ~/var-som-mx6-dora-v4/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-v4/uboot-imx $ cp -a * ~/var-som-mx6-dora-v4/uboot-imx $ exit
change dir into the new u-boot folder
$ cd ~/var-som-mx6-dora-v4/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
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_mx6_<x>/opt/recovery ./ $ sudo cp /media/var_mx6_<x>/sbin/nand-recovery.sh ./
Update your local folder with the files you created during the Yocto build:
$ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.ubi recovery/Yocto/rootfs.ubi.img $ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/fsl-image-gui-varsommx6q.tar.bz2 recovery/Yocto/rootfs.tar.bz2 $ sudo cp ~/var-som-mx6-dora-v4/build_mx6q/tmp/deploy/images/varsommx6q/uImage recovery/Yocto/uImage $ sudo cp ~/var-som-mx6-dora-v4/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-v4/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
I used "/dev/mmcblk0" as the SD-Card device name. You should replace it with your own SD-Card device name.