<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=CL-SOM-iMX6UL%3A_Yocto_Linux%3A_Building</id>
	<title>CL-SOM-iMX6UL: Yocto Linux: Building - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=CL-SOM-iMX6UL%3A_Yocto_Linux%3A_Building"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.compulab.com/w/index.php?title=CL-SOM-iMX6UL:_Yocto_Linux:_Building&amp;action=history"/>
	<updated>2026-09-02T06:08:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://mediawiki.compulab.com/w/index.php?title=CL-SOM-iMX6UL:_Yocto_Linux:_Building&amp;diff=2834&amp;oldid=prev</id>
		<title>Valentin: /* Install on the eMMC */</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.compulab.com/w/index.php?title=CL-SOM-iMX6UL:_Yocto_Linux:_Building&amp;diff=2834&amp;oldid=prev"/>
		<updated>2016-02-16T11:36:50Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Install on the eMMC&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Overview =&lt;br /&gt;
The Yocto Project is an open-source collaboration focused on embedded Linux development.&amp;lt;br&amp;gt;&lt;br /&gt;
The purpose of this article is to show how to get Yocto Image with CL-SOM-iMX6UL support.&lt;br /&gt;
&lt;br /&gt;
= Build CL-SOM-iMX6UL Yocto Image =&lt;br /&gt;
== Yocto Environment Setup ==&lt;br /&gt;
This section describes the Yocto environment setup and build procedure.&lt;br /&gt;
=== Host Setup ===&lt;br /&gt;
To get the Yocto Project expected behavior in a Linux Host Machine, the packages and utilities described below must be installed.&lt;br /&gt;
An important consideration is the hard disk space required in the host machine.&lt;br /&gt;
For example, when building on a machine running Ubuntu, the minimum hard disk space required is about 50 GB for the X11 backend.&lt;br /&gt;
It is recommended that at least 120 GB be provided, which is enough to compile any backend.&lt;br /&gt;
The recommended minimum Ubuntu version is 12.04 or later.&lt;br /&gt;
Earlier versions may cause the Yocto Project build setup to fail, because it requires python versions only available starting with Ubuntu 12.04.&lt;br /&gt;
&lt;br /&gt;
==== Host Packages ====&lt;br /&gt;
A Freescale Yocto Project Community BSP build requires that some packages be installed for the build that are documented under the Yocto Project.&lt;br /&gt;
You can go to [http://www.yoctoproject.org/docs/1.5/ref-manual/ref-manual.html#required-packages-for-the-host-development-system Yocto Project Quick Start] and check for the packages that must be installed for your build machine.&lt;br /&gt;
* Essential Yocto Project host packages:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* i.MX layers host packages for Ubuntu 12.04 or 14.04 host setup are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \&lt;br /&gt;
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \&lt;br /&gt;
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* i.MX layers host packages for a Ubuntu 12.04 host setup only are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install uboot-mkimage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* i.MX layers host packages for a Ubuntu 14.04 host setup only are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo apt-get install u-boot-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setting up the repo utility ====&lt;br /&gt;
{{filename|repo}} is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need to be on the same server.&lt;br /&gt;
{{filename|repo}} complements very well the layered nature of the Yocto Project, making it easier for customers to add their own layers to the BSP.&lt;br /&gt;
&amp;lt;br&amp;gt;To install the {{filename|repo}} utility, perform these steps:&lt;br /&gt;
* Create a bin folder in the home directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir ~/bin #(this step may not be needed if the bin folder already exists)&lt;br /&gt;
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo &amp;gt; ~/bin/repo&lt;br /&gt;
$ chmod a+x ~/bin/repo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Add the following line to the {{filename|.bashrc}} file to ensure that the ~/bin folder is in your PATH variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PATH=~/bin:$PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Yocto Project Setup ====&lt;br /&gt;
A Yocto Project directory contains a {{filename|sources}} directory, which contains the recipes used to build, one or more build&lt;br /&gt;
directories, and a set of scripts used to set up the environment.&lt;br /&gt;
The recipes used to build the project come from both the community and Freescale. The following commands are used to&lt;br /&gt;
download the Freescale Yocto Project Community BSP recipe layers. The Yocto Project layers are downloaded and placed in&lt;br /&gt;
the {{filename|sources}} directory. This sets up the recipes that are used to build the project.&lt;br /&gt;
For this example, a directory called &amp;quot;fsl-release-bsp&amp;quot; is created for the project.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir fsl-release-bsp&lt;br /&gt;
$ cd fsl-release-bsp&lt;br /&gt;
$ git config --global user.name &amp;quot;Your Name&amp;quot;&lt;br /&gt;
$ git config --global user.email &amp;quot;Your Email&amp;quot;&lt;br /&gt;
$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.38-6UL_ga&lt;br /&gt;
$ repo sync&lt;br /&gt;
$ export FSL_BSP_ROOT=`pwd`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this process is completed, the source code is checked out at {{filename|fsl-release-bsp/sources}}.&lt;br /&gt;
You can perform repo synchronization, with the command {{filename|repo sync}}, periodically to update to the latest codes.&lt;br /&gt;
&lt;br /&gt;
=== CL-SOM-iMX6UL Support ===&lt;br /&gt;
{{Note|We assume that {{filename|/path/to/cl-som-imx6ul-yocto}} contains unpacked content of the CL-SOM-iMX6UL Yocto Linux Package}}&lt;br /&gt;
==== CL-SOM-iMX6UL Patches ====&lt;br /&gt;
* Go to the {{filename|fsl-release-bsp/source/meta-fsl-arm-extra}} directory and apply the patches:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ${FSL_BSP_ROOT}/sources/meta-fsl-arm-extra&lt;br /&gt;
$ git am /path/to/cl-som-imx6ul-yocto/development/*.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Go to the {{filename|fsl-release-bsp}} root:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ${FSL_BSP_ROOT}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Build x11 image for CL-SOM-iMX6UL ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export MACHINE=cl-som-imx6ul&lt;br /&gt;
$ source fsl-setup-release.sh –b build -e x11&lt;br /&gt;
$ bitbake fsl-image-gui&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If bitbake displays an error indicating that fsl-image-gui cannot be found, this means that fsl-setup-release.sh was not run.&lt;br /&gt;
This script hooks in the meta-fsl-bsp-release layer with the Yocto Project layer system.&lt;br /&gt;
Build scripts used to generate prebuilt images for this release are provided in the meta-fsl-bsp-release layer in imx/tools.&lt;br /&gt;
Use these for additional examples.&lt;br /&gt;
&lt;br /&gt;
Once a build is complete, the created images reside in {{filename|${FSL_BSP_ROOT}/build/tmp/deploy/images/${MACHINE}}}.&lt;br /&gt;
The image build creates a U-Boot, Linux kernel, and rootfs image type based on the IMAGE_FSTYPES defined in the machine configuration file.&lt;br /&gt;
Most machine configurations provide an SD card image, ext3 and tar.bz2. The ext3 is the root file system.&lt;br /&gt;
&lt;br /&gt;
Create an environment variable {{parameter|BSP_IMAGES_DIR}} for use during deployment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export BSP_IMAGES_DIR=${FSL_BSP_ROOT}/build/tmp/deploy/images/${MACHINE}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Image Deployment =&lt;br /&gt;
== Image content ==&lt;br /&gt;
=== File System ===&lt;br /&gt;
* {{filename|fsl-image-gui-cl-som-imx6ul.sdcard}} - SD card image that provides the full system to boot with U-Boot and Linux kernel&lt;br /&gt;
* {{filename|fsl-image-gui-cl-som-imx6ul.tar.bz2}} - rootfs tar ball for deployment onto any (including NFS) storage or further customization&lt;br /&gt;
=== Kernel and Modules ===&lt;br /&gt;
* {{filename|zImage-cl-som-imx6ul.bin}} - ready to run Linux kernel image binary for CL-SOM-iMX6UL&lt;br /&gt;
* {{filename|modules-cl-som-imx6ul.tgz}} - the Linux kernel modules&lt;br /&gt;
=== Device Tree Blobs ===&lt;br /&gt;
* {{filename|zImage-imx6ul-cl-som-imx6ul.dtb}} - CL-SOM-iMX6UL (module only) device tree blob&lt;br /&gt;
* {{filename|zImage-imx6ul-cl-som-imx6ul-wilink.dtb}} - CL-SOM-iMX6UL (module only) with WiLink8 device tree blob&lt;br /&gt;
* {{filename|zImage-imx6ul-sbc-imx6ul.dtb}} - SBC-iMX6UL (evaluation board) device tree blob&lt;br /&gt;
* {{filename|zImage-imx6ul-sbc-imx6ul-wilink.dtb}} - SBC-iMX6UL (evaluation board) with WiLink8 device tree blob&lt;br /&gt;
&lt;br /&gt;
=== U-Boot ===&lt;br /&gt;
* {{filename|u-boot-cl-som-imx6ul.imx}} - ready to flash CL-SOM-iMX6UL firmware&lt;br /&gt;
&lt;br /&gt;
== SD card deployment ==&lt;br /&gt;
=== Flashing an SD card ===&lt;br /&gt;
* Flash the SD card image:&lt;br /&gt;
{{Note|sdX represents an entire device, not a partition&amp;lt;br&amp;gt;Example: {{filename|/dev/sde}} }}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo -i&lt;br /&gt;
$ cd ${BSP_IMAGES_DIR}&lt;br /&gt;
$ SDCARD_IMAGE=$(ls -tr *.sdcard | head -1)&lt;br /&gt;
$ dd if=${SDCARD_IMAGE} of=/dev/sdX bs=1M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Copy the U-Boot binary to the SD card:&lt;br /&gt;
{{Note|sdX1 represents the device 1-st partition&amp;lt;br&amp;gt;Example: {{filename|/dev/sde1}} }}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ hdparm -z /dev/sdX&lt;br /&gt;
$ mkdir /tmp/sdX1&lt;br /&gt;
$ mount /dev/sdX1 /tmp/sdX1&lt;br /&gt;
$ cp u-boot-cl-som-imx6ul.imx /tmp/sdX1/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Unmount and eject the SD card:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ umount /dev/sdX1&lt;br /&gt;
$ eject /dev/sdX&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting from an SD card ===&lt;br /&gt;
* Plug the SD card into the full size sd slot(P9) of the SB-SOM-iMX6UL&lt;br /&gt;
* Hold the ALT BOOT (SW3) button while resetting/powering on the CL-SOM-iMX6UL evaluation system&lt;br /&gt;
* The CL-SOM-iMX6UL will boot from the SD card&lt;br /&gt;
* Press a button as soon as &amp;quot;'''Hit any key to stop autoboot:'''&amp;quot; shows up&lt;br /&gt;
&lt;br /&gt;
==== Flash the U-Boot ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mmc dev 0; mmc rescan&lt;br /&gt;
setenv size 0x80000; mw.b ${loadaddr} 0 ${size}&lt;br /&gt;
load mmc 0 ${loadaddr} u-boot-cl-som-imx6ul.imx&lt;br /&gt;
sf probe ; sf erase 0 0x80000 ; sf write ${loadaddr} 0x400 ${size}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Set and save the default U-Boot environment ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
env default -a&lt;br /&gt;
saveenv&lt;br /&gt;
reset&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== eMMC deployment ==&lt;br /&gt;
=== Install on the eMMC ===&lt;br /&gt;
{{Note|Requires a Yocto [[#SD card deployment|SD card]] to be prepared first.}}&lt;br /&gt;
* [[#Booting_from_an_SD_card|Boot up the board using the SD-Card]]&lt;br /&gt;
* Upon successful boot the login prompt shows up:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Poky (Yocto Project Reference Distro) 1.8 cl-som-imx6ul /dev/ttymxc2&lt;br /&gt;
&lt;br /&gt;
cl-som-imx6ul login:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Login as {{parameter|root}} into the system.&lt;br /&gt;
Once the board has been booted using a bootable [[#SD card deployment|SD Card]], the Yocto rootfs can be installed onto the board eMMC.&lt;br /&gt;
{{Note|We assume that {{filename|/mount/point}} contains unpacked content of the {{parameter|BSP_IMAGES_DIR}}.}}&lt;br /&gt;
* In this subsection the term {{filename|/mount/point}} can be:&lt;br /&gt;
** {{filename|/mnt/net}} if NFS is used&lt;br /&gt;
** {{filename|/media/mmcblk0pX}} if an MMC/SD card is used, where X is the partition number.&lt;br /&gt;
** {{filename|/media/sdXY}} if a USB storage is used, where X is the USB drive letter and Y is the partition number.&lt;br /&gt;
* Flash the SD card image on the eMMC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ${BSP_IMAGES_DIR}&lt;br /&gt;
$ SDCARD_IMAGE=$(ls -tr *.sdcard | head -1)&lt;br /&gt;
$ sudo dd if=${SDCARD_IMAGE} of=/dev/mmcblk1 bs=1M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* WiLink8 Deployment&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ hdparm -z /dev/sdX&lt;br /&gt;
$ mkdir /tmp/sdX2&lt;br /&gt;
$ mount /dev/sdX2 /tmp/sdX2&lt;br /&gt;
$ tar -C /tmp/sdX2 -xvf /path/to/cl-som-imx6ul-yocto/images/extra/WiLink8.fs.support.tar.bz2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Power off the device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ poweoff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting from the eMMC ===&lt;br /&gt;
* Power on the device.&lt;br /&gt;
* Press a button as soon as &amp;quot;'''Hit any key to stop autoboot:'''&amp;quot; shows up.&lt;br /&gt;
* Update the boot environment and boot the device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv mmcdev 1&lt;br /&gt;
setenv mmcroot &amp;quot;/dev/mmcblk${mmcdev}p2 rootwait rw&amp;quot;&lt;br /&gt;
setenv fdt_file imx6ul-sbc-imx6ul-wilink.dtb&lt;br /&gt;
saveenv&lt;br /&gt;
boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Display Options ==&lt;br /&gt;
&lt;br /&gt;
SBC-iMX6UL has an option to connecte either an LCD or a DVI display.&amp;lt;br&amp;gt;&lt;br /&gt;
The default device tree layout allows using both interfaces at the same time with the 1024x768@60 resolution.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|A side effect is: the LCD display shows upper left part of the screen with geometry 800x480}}&lt;br /&gt;
&lt;br /&gt;
Below are examples that show how to change the boot environment in order to set the correct interface&lt;br /&gt;
timing and geometry and work with either an LCD or a DVI display separately.&lt;br /&gt;
&lt;br /&gt;
=== LCD ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv lcd+ 'fdt add ${fdt_addr}; fdt rm lcdif/display/display-timings/dvi'&lt;br /&gt;
setenv bootcmd 'run mmcargs; run loadfdt; run loadimage; run lcd+; bootz ${loadaddr} - ${fdt_addr}'&lt;br /&gt;
saveenv&lt;br /&gt;
boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DVI ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv dvi+ 'fdt add ${fdt_addr}; fdt rm lcdif/display/display-timings/lcd'&lt;br /&gt;
setenv bootcmd 'run mmcargs; run loadfdt; run loadimage; run lcd+; bootz ${loadaddr} - ${fdt_addr}'&lt;br /&gt;
saveenv&lt;br /&gt;
boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [http://compulab.co.il/utilite-computer/download/imx6ul/unofficial_unsupported/Yocto/Freescale_Yocto_Project_User's_Guide.pdf Freescale Yocto Project_User's Guide]&lt;br /&gt;
* [http://www.yoctoproject.org The Yocto Project homepage]&lt;br /&gt;
* [http://www.yoctoproject.org/docs/1.5/ref-manual/ref-manual.html#required-packages-for-the-host-development-system Yocto Project Quick Start]&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:Yocto]]&lt;br /&gt;
[[Category:CL-SOM-iMX6UL]]&lt;/div&gt;</summary>
		<author><name>Valentin</name></author>
		
	</entry>
</feed>