Christian's Blog

Linux, programming, hacking, electronics, Python… These are the things I love.

Building Freescale’s Community Yocto BSP for the OLinuXino

This tutorial is based on https://github.com/Freescale/fsl-community-bsp-platform.

Basics

BSP = Board Support Package

Yocto Project™: http://www.yoctoproject.org/about

The Yocto Project is a Linux Foundation workgroup whose goal is to produce tools and processes that will enable the creation of Linux distributions for embedded software that are independent of the underlying architecture of the embedded software itself. The project was announced by the Linux Foundation in 2010. In March 2011, the project aligned itself with OpenEmbedded, an existing framework with similar goals, with the result being The OpenEmbedded-Core Project.

—Source: https://en.wikipedia.org/wiki/Yocto_Project

OpenEmbedded: http://www.openembedded.org/wiki/Main_Page

OpenEmbedded is a software framework to create Linux distributions aimed for, but not restricted to, embedded devices. The build system is based on BitBake recipes, which behaves like Gentoo’s ebuilds. The OpenEmbedded-Core Project (OE-Core for short) resulted from the merge of the Yocto Project with OpenEmbedded.

—Source: https://en.wikipedia.org/wiki/OpenEmbedded

Step by Step

Install the repo utility

[chris@thinkpad ~]$ curl --create-dirs -o ~/bin/repo https://dl-ssl.google.com/dl/googlesource/git-repo/repo
[chris@thinkpad ~]$ chmod a+x ~/bin/repo

The ~/bin directory should have been added already to your $PATH, Ubuntu adds it in ~/.profile and Fedora in ~/.bash_profile, if this is not the case you can add the following line in your ~/.bashrc:

PATH=$PATH:$HOME/.local/bin:$HOME/bin

Download the source code

[chris@thinkpad OLinuXino]$ mkdir fsl-community-bsp
[chris@thinkpad OLinuXino]$ cd fsl-community-bsp
[chris@thinkpad fsl-community-bsp]$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dylan
Get https://gerrit.googlesource.com/git-repo
remote: Counting objects: 101, done
remote: Finding sources: 100% (101/101)
remote: Total 2530 (delta 1442), reused 2530 (delta 1442)
Receiving objects: 100% (2530/2530), 1.70 MiB | 1009.00 KiB/s, done.
Resolving deltas: 100% (1442/1442), done.
From https://gerrit.googlesource.com/git-repo
* [new branch]      maint      -> origin/maint
* [new branch]      master     -> origin/master
* [new branch]      stable     -> origin/stable
* [new tag]         v1.0       -> v1.0
* [new tag]         v1.0.1     -> v1.0.1
* [new tag]         v1.0.2     -> v1.0.2
* [new tag]         v1.0.3     -> v1.0.3
* [new tag]         v1.0.4     -> v1.0.4
* [new tag]         v1.0.5     -> v1.0.5
* [new tag]         v1.0.6     -> v1.0.6
* [new tag]         v1.0.7     -> v1.0.7
* [new tag]         v1.0.8     -> v1.0.8
* [new tag]         v1.0.9     -> v1.0.9
* [new tag]         v1.1       -> v1.1
* [new tag]         v1.10.0    -> v1.10.0
* [new tag]         v1.10.1    -> v1.10.1
* [new tag]         v1.10.2    -> v1.10.2
* [new tag]         v1.10.3    -> v1.10.3
* [new tag]         v1.10.4    -> v1.10.4
* [new tag]         v1.11.0    -> v1.11.0
* [new tag]         v1.11.1    -> v1.11.1
* [new tag]         v1.12.0    -> v1.12.0
* [new tag]         v1.12.1    -> v1.12.1
* [new tag]         v1.12.2    -> v1.12.2
* [new tag]         v1.2       -> v1.2
* [new tag]         v1.3       -> v1.3
* [new tag]         v1.3.1     -> v1.3.1
* [new tag]         v1.3.2     -> v1.3.2
* [new tag]         v1.4       -> v1.4
* [new tag]         v1.4.1     -> v1.4.1
* [new tag]         v1.4.2     -> v1.4.2
* [new tag]         v1.4.3     -> v1.4.3
* [new tag]         v1.4.4     -> v1.4.4
* [new tag]         v1.5       -> v1.5
* [new tag]         v1.5.1     -> v1.5.1
* [new tag]         v1.6       -> v1.6
* [new tag]         v1.6.1     -> v1.6.1
* [new tag]         v1.6.10    -> v1.6.10
* [new tag]         v1.6.10.1  -> v1.6.10.1
* [new tag]         v1.6.10.2  -> v1.6.10.2
* [new tag]         v1.6.2     -> v1.6.2
* [new tag]         v1.6.3     -> v1.6.3
* [new tag]         v1.6.4     -> v1.6.4
* [new tag]         v1.6.5     -> v1.6.5
* [new tag]         v1.6.6     -> v1.6.6
* [new tag]         v1.6.7     -> v1.6.7
* [new tag]         v1.6.7.1   -> v1.6.7.1
* [new tag]         v1.6.7.2   -> v1.6.7.2
* [new tag]         v1.6.7.3   -> v1.6.7.3
* [new tag]         v1.6.7.4   -> v1.6.7.4
* [new tag]         v1.6.7.5   -> v1.6.7.5
* [new tag]         v1.6.8     -> v1.6.8
* [new tag]         v1.6.8.1   -> v1.6.8.1
* [new tag]         v1.6.8.10  -> v1.6.8.10
* [new tag]         v1.6.8.11  -> v1.6.8.11
* [new tag]         v1.6.8.2   -> v1.6.8.2
* [new tag]         v1.6.8.3   -> v1.6.8.3
* [new tag]         v1.6.8.4   -> v1.6.8.4
* [new tag]         v1.6.8.5   -> v1.6.8.5
* [new tag]         v1.6.8.6   -> v1.6.8.6
* [new tag]         v1.6.8.7   -> v1.6.8.7
* [new tag]         v1.6.8.8   -> v1.6.8.8
* [new tag]         v1.6.8.9   -> v1.6.8.9
* [new tag]         v1.6.9     -> v1.6.9
* [new tag]         v1.6.9.1   -> v1.6.9.1
* [new tag]         v1.6.9.2   -> v1.6.9.2
* [new tag]         v1.6.9.3   -> v1.6.9.3
* [new tag]         v1.6.9.4   -> v1.6.9.4
* [new tag]         v1.6.9.5   -> v1.6.9.5
* [new tag]         v1.6.9.6   -> v1.6.9.6
* [new tag]         v1.6.9.7   -> v1.6.9.7
* [new tag]         v1.6.9.8   -> v1.6.9.8
* [new tag]         v1.7       -> v1.7
* [new tag]         v1.7.1     -> v1.7.1
* [new tag]         v1.7.2     -> v1.7.2
* [new tag]         v1.7.3     -> v1.7.3
* [new tag]         v1.7.3.1   -> v1.7.3.1
* [new tag]         v1.7.4     -> v1.7.4
* [new tag]         v1.7.4.1   -> v1.7.4.1
* [new tag]         v1.7.4.2   -> v1.7.4.2
* [new tag]         v1.7.4.3   -> v1.7.4.3
* [new tag]         v1.7.5     -> v1.7.5
* [new tag]         v1.7.6     -> v1.7.6
* [new tag]         v1.7.6.1   -> v1.7.6.1
* [new tag]         v1.7.7     -> v1.7.7
* [new tag]         v1.7.7.1   -> v1.7.7.1
* [new tag]         v1.7.7.2   -> v1.7.7.2
* [new tag]         v1.7.7.3   -> v1.7.7.3
* [new tag]         v1.7.7.4   -> v1.7.7.4
* [new tag]         v1.7.7.5   -> v1.7.7.5
* [new tag]         v1.7.7.6   -> v1.7.7.6
* [new tag]         v1.7.8     -> v1.7.8
* [new tag]         v1.7.8.1   -> v1.7.8.1
* [new tag]         v1.7.8.2   -> v1.7.8.2
* [new tag]         v1.8.0     -> v1.8.0
* [new tag]         v1.8.1     -> v1.8.1
* [new tag]         v1.8.2     -> v1.8.2
* [new tag]         v1.9.0     -> v1.9.0
* [new tag]         v1.9.1     -> v1.9.1
* [new tag]         v1.9.2     -> v1.9.2
* [new tag]         v1.9.3     -> v1.9.3
* [new tag]         v1.9.4     -> v1.9.4
* [new tag]         v1.9.5     -> v1.9.5
* [new tag]         v1.9.6     -> v1.9.6
Get https://github.com/Freescale/fsl-community-bsp-platform
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Counting objects: 84, done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 84 (delta 25), reused 79 (delta 21)
Unpacking objects: 100% (84/84), done.
From https://github.com/Freescale/fsl-community-bsp-platform
* [new branch]      danny      -> origin/danny
* [new branch]      denzil     -> origin/denzil
* [new branch]      dylan      -> origin/dylan
* [new branch]      master     -> origin/master
* [new tag]         1.2        -> 1.2
* [new tag]         1.4        -> 1.4

Your identity is: Christian Jann <christian.jann@ymail.com>
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /home/chris/local/OLinuXino/fsl-community-bsp
[chris@thinkpad fsl-community-bsp]$ repo sync
remote: Counting objects: 529, done.
remote: Counting objects: 136, done.
remote: Compressing objects: 100% (299/299), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 136 (delta 78), reused 131 (delta 73)
Receiving objects: 100% (136/136), 20.93 KiB | 0 bytes/s, done.
Resolving deltas: 100% (78/78), done.
From git://github.com/Freescale/fsl-community-bsp-base
* [new branch]      danny      -> freescale/danny
* [new branch]      denzil     -> freescale/denzil
* [new branch]      dylan      -> freescale/dylan
* [new branch]      master     -> freescale/master
* [new tag]         1.2        -> 1.2
* [new tag]         1.2-rc1    -> 1.2-rc1
* [new tag]         1.3        -> 1.3
* [new tag]         1.4        -> 1.4
remote: Counting objects: 4836, done.
remote: Compressing objects: 100% (1763/1763), done.
remote: Total 529 (delta 203), reused 481 (delta 162)
Receiving objects: 100% (529/529), 1.22 MiB | 251.00 KiB/s, done.
Resolving deltas: 100% (203/203), done.
From git://github.com/Freescale/meta-fsl-arm-extra
* [new branch]      danny      -> freescale/danny
* [new branch]      denzil     -> freescale/denzil
* [new branch]      dylan      -> freescale/dylan
* [new branch]      master     -> freescale/master
* [new branch]      master-next -> freescale/master-next
* [new tag]         1.2        -> 1.2
* [new tag]         1.2-rc1    -> 1.2-rc1
* [new tag]         1.3        -> 1.3
* [new tag]         1.4        -> 1.4
remote: Counting objects: 28094, done.
remote: Compressing objects: 100% (11171/11171), done.
remote: Counting objects: 193818, done.
remote: Compressing objects: 100% (51376/51376), done.
remote: Total 28094 (delta 16312), reused 26960 (delta 15668)
Receiving objects: 100% (28094/28094), 18.19 MiB | 110.00 KiB/s, done.
Resolving deltas: 100% (16312/16312), done.
From git://git.openembedded.org/meta-openembedded | 100.00 KiB/s
* [new branch]      danny      -> oe/danny
* [new branch]      danny-next -> oe/danny-next
* [new branch]      denzil     -> oe/denzil
* [new branch]      denzil-next -> oe/denzil-next
* [new branch]      dylan      -> oe/dylan
* [new branch]      dylan-next -> oe/dylan-next
* [new branch]      master     -> oe/master
remote: Total 4836 (delta 2840), reused 4831 (delta 2837)
Receiving objects: 100% (4836/4836), 36.87 MiB | 140.00 KiB/s, done.
Resolving deltas: 100% (2840/2840), done.
From git://git.yoctoproject.org/meta-fsl-arm06 MiB | 74.00 KiB/s
* [new branch]      1.4_M3     -> yocto/1.4_M3
* [new branch]      1.4_M5     -> yocto/1.4_M5
* [new branch]      danny      -> yocto/danny
* [new branch]      danny-next -> yocto/danny-next
* [new branch]      denzil     -> yocto/denzil
* [new branch]      dylan      -> yocto/dylan
* [new branch]      dylan-next -> yocto/dylan-next
* [new branch]      master     -> yocto/master
* [new branch]      master-next -> yocto/master-next
* [new tag]         1.2        -> 1.2
* [new tag]         1.2-rc1    -> 1.2-rc1
* [new tag]         1.3        -> 1.3
* [new tag]         1.4        -> 1.4
remote: Counting objects: 567, done.
remote: Compressing objects: 100% (247/247), done.
remote: Total 567 (delta 274), reused 567 (delta 274)
Receiving objects: 100% (567/567), 181.85 KiB | 150.00 KiB/s, done.
Resolving deltas: 100% (274/274), done.
From git://github.com/Freescale/meta-fsl-demos
* [new branch]      danny      -> freescale/danny
* [new branch]      denzil     -> freescale/denzil
* [new branch]      dylan      -> freescale/dylan
* [new branch]      master     -> freescale/master
* [new branch]      master-next -> freescale/master-next
* [new tag]         1.2        -> 1.2
* [new tag]         1.2-rc1    -> 1.2-rc1
* [new tag]         1.3        -> 1.3
* [new tag]         1.4        -> 1.4
remote: Total 193818 (delta 140057), reused 191577 (delta 137825)
Receiving objects: 100% (193818/193818), 91.85 MiB | 152.00 KiB/s, done.
Resolving deltas: 100% (140057/140057), done.
From git://git.yoctoproject.org/poky
* [new branch]      1.1_M1     -> yocto/1.1_M1
* [new branch]      1.1_M2     -> yocto/1.1_M2
* [new branch]      1.1_M3     -> yocto/1.1_M3
* [new branch]      1.1_M4     -> yocto/1.1_M4
* [new branch]      1.2_M1     -> yocto/1.2_M1
* [new branch]      1.2_M2     -> yocto/1.2_M2
* [new branch]      1.2_M3     -> yocto/1.2_M3
* [new branch]      1.2_M4     -> yocto/1.2_M4
* [new branch]      1.3_M1     -> yocto/1.3_M1
* [new branch]      1.3_M2     -> yocto/1.3_M2
* [new branch]      1.3_M3     -> yocto/1.3_M3
* [new branch]      1.3_M4     -> yocto/1.3_M4
* [new branch]      1.3_M5     -> yocto/1.3_M5
* [new branch]      1.3_beta   -> yocto/1.3_beta
* [new branch]      1.4_M1     -> yocto/1.4_M1
* [new branch]      1.4_M3     -> yocto/1.4_M3
* [new branch]      1.4_M4     -> yocto/1.4_M4
* [new branch]      1.4_M5     -> yocto/1.4_M5
* [new branch]      bernard    -> yocto/bernard
* [new branch]      blinky     -> yocto/blinky
* [new branch]      clyde      -> yocto/clyde
* [new branch]      danny      -> yocto/danny
* [new branch]      danny-next -> yocto/danny-next
* [new branch]      denzil     -> yocto/denzil
* [new branch]      dylan      -> yocto/dylan
* [new branch]      edison     -> yocto/edison
* [new branch]      elroy      -> yocto/elroy
* [new branch]      green      -> yocto/green
* [new branch]      laverne    -> yocto/laverne
* [new branch]      master     -> yocto/master
* [new branch]      master-next -> yocto/master-next
* [new branch]      pinky      -> yocto/pinky
* [new branch]      purple     -> yocto/purple
* [new tag]         1.1_M1.final -> 1.1_M1.final
* [new tag]         1.1_M1.rc1 -> 1.1_M1.rc1
* [new tag]         1.1_M1.rc2 -> 1.1_M1.rc2
* [new tag]         1.1_M2.final -> 1.1_M2.final
* [new tag]         1.1_M2.rc1 -> 1.1_M2.rc1
* [new tag]         1.1_M2.rc2 -> 1.1_M2.rc2
* [new tag]         1.1_M2.rc3 -> 1.1_M2.rc3
* [new tag]         1.1_M3.final -> 1.1_M3.final
* [new tag]         1.1_M3.rc2 -> 1.1_M3.rc2
* [new tag]         1.1_M3.rc3 -> 1.1_M3.rc3
* [new tag]         1.1_M4.rc2+ -> 1.1_M4.rc2+
* [new tag]         1.1_M4.rc3 -> 1.1_M4.rc3
* [new tag]         1.1_M4.rc4 -> 1.1_M4.rc4
* [new tag]         1.2_M1.final -> 1.2_M1.final
* [new tag]         1.2_M1.rc1 -> 1.2_M1.rc1
* [new tag]         1.2_M1.rc2 -> 1.2_M1.rc2
* [new tag]         1.2_M2.final -> 1.2_M2.final
* [new tag]         1.2_M2.rc1 -> 1.2_M2.rc1
* [new tag]         1.2_M3.final -> 1.2_M3.final
* [new tag]         1.2_M3.rc1 -> 1.2_M3.rc1
* [new tag]         1.2_M4.rc1 -> 1.2_M4.rc1
* [new tag]         1.2_M4.rc2 -> 1.2_M4.rc2
* [new tag]         1.2_M4.rc3 -> 1.2_M4.rc3
* [new tag]         1.2_M4.rc3.1 -> 1.2_M4.rc3.1
* [new tag]         1.2_M4.rc3.2 -> 1.2_M4.rc3.2
* [new tag]         1.2_M4.rc4 -> 1.2_M4.rc4
* [new tag]         1.2_M4.rc4.0 -> 1.2_M4.rc4.0
* [new tag]         1.3        -> 1.3
* [new tag]         1.3.2      -> 1.3.2
* [new tag]         1.3.2.final -> 1.3.2.final
* [new tag]         1.3_M1.final -> 1.3_M1.final
* [new tag]         1.3_M1.rc1 -> 1.3_M1.rc1
* [new tag]         1.3_M2.final -> 1.3_M2.final
* [new tag]         1.3_M2.rc1 -> 1.3_M2.rc1
* [new tag]         1.3_M3.final -> 1.3_M3.final
* [new tag]         1.3_M3.rc2 -> 1.3_M3.rc2
* [new tag]         1.3_M4.final -> 1.3_M4.final
* [new tag]         1.3_M4.rc1 -> 1.3_M4.rc1
* [new tag]         1.3_M5.rc1 -> 1.3_M5.rc1
* [new tag]         1.3_M5.rc2 -> 1.3_M5.rc2
* [new tag]         1.3_M5.rc3 -> 1.3_M5.rc3
* [new tag]         1.3_M5.rc4 -> 1.3_M5.rc4
* [new tag]         1.4.1.rc1  -> 1.4.1.rc1
* [new tag]         1.4_M1.final -> 1.4_M1.final
* [new tag]         1.4_M1.rc1 -> 1.4_M1.rc1
* [new tag]         1.4_M3.final -> 1.4_M3.final
* [new tag]         1.4_M3.rc1 -> 1.4_M3.rc1
* [new tag]         1.4_M3.rc2 -> 1.4_M3.rc2
* [new tag]         1.4_M4.final -> 1.4_M4.final
* [new tag]         1.4_M4.rc1 -> 1.4_M4.rc1
* [new tag]         1.4_M5.final -> 1.4_M5.final
* [new tag]         1.4_M5.rc1 -> 1.4_M5.rc1
* [new tag]         1.4_M5.rc2 -> 1.4_M5.rc2
* [new tag]         1.4_M5.rc3 -> 1.4_M5.rc3
* [new tag]         1.4_M6.rc1 -> 1.4_M6.rc1
* [new tag]         1.5_M1.final -> 1.5_M1.final
* [new tag]         1.5_M1.rc1 -> 1.5_M1.rc1
* [new tag]         bernard-1.0rc1 -> bernard-1.0rc1
* [new tag]         bernard-5.0 -> bernard-5.0
* [new tag]         bernard-5.0-alpha -> bernard-5.0-alpha
* [new tag]         bernard-5.0.1 -> bernard-5.0.1
* [new tag]         bernard-5.0.2 -> bernard-5.0.2
* [new tag]         bernard-5.0.2+docs -> bernard-5.0.2+docs
* [new tag]         bernard-5.0rc1 -> bernard-5.0rc1
* [new tag]         bernard-5.0rc2 -> bernard-5.0rc2
* [new tag]         blinky-3.0 -> blinky-3.0
* [new tag]         clyde-2.0  -> clyde-2.0
* [new tag]         danny-8.0  -> danny-8.0
* [new tag]         danny-8.0.1 -> danny-8.0.1
* [new tag]         danny-8.0.2 -> danny-8.0.2
* [new tag]         denzil-7.0 -> denzil-7.0
* [new tag]         denzil-7.0.0 -> denzil-7.0.0
* [new tag]         denzil-7.0.1 -> denzil-7.0.1
* [new tag]         denzil-7.0.1_rc2 -> denzil-7.0.1_rc2
* [new tag]         denzil-7.0.2 -> denzil-7.0.2
* [new tag]         dylan-9.0.0 -> dylan-9.0.0
* [new tag]         dylan-9.0.1 -> dylan-9.0.1
* [new tag]         dylan-9.0.1.rc1 -> dylan-9.0.1.rc1
* [new tag]         edison-6.0 -> edison-6.0
* [new tag]         edison-6.0.1 -> edison-6.0.1
* [new tag]         edison-6.0.1.final -> edison-6.0.1.final
* [new tag]         edison-6.0.1.release -> edison-6.0.1.release
* [new tag]         edison-6.0.2 -> edison-6.0.2
* [new tag]         edison-6.0.2_rc1 -> edison-6.0.2_rc1
* [new tag]         green-3.3  -> green-3.3
* [new tag]         green-3.3.1 -> green-3.3.1
* [new tag]         inky-1.0   -> inky-1.0
* [new tag]         laverne-4.0 -> laverne-4.0
* [new tag]         laverne-4.0.1 -> laverne-4.0.1
* [new tag]         pinky-3.1  -> pinky-3.1
* [new tag]         pinky-3.1.1 -> pinky-3.1.1
* [new tag]         pinky-3.1.2 -> pinky-3.1.2
* [new tag]         purple-3.2 -> purple-3.2
* [new tag]         purple-3.2.1 -> purple-3.2.1
* [new tag]         yocto-1.4.1 -> yocto-1.4.1
Fetching projects: 100% (6/6), done.
Syncing work tree: 100% (6/6), done.

[chris@thinkpad fsl-community-bsp]$

Setup the build environment

Have a look at the fsl-community-bsp/sources/meta-fsl-arm-extra/conf/machine/ directory, there are some example configurations, to use the configuration for the OLinuXino-Micro we have to run the following command:

[chris@thinkpad fsl-community-bsp]$ MACHINE=imx233-olinuxino-micro . ./setup-environment build
Configuring for imx233-olinuxino-micro

Some SoC depends on libraries and packages that are covered by
Freescale EULA. To have the right to use those binaries in your images
you need to read and accept the EULA that will be displayed.


IMPORTANT. Read the following Freescale Software License Agreement
("Agreement") completely. By selecting the "I Accept" button at the
end of this page, you indicate that you accept the terms of the
Agreement referenced below.  You may then download the file.  If this
is a "shrink wrap license," by opening the package and installing the
software contained, you indicate that you accept the terms of the
Agreement referenced below.

                        OPEN SOURCE LICENSE

You are about to download certain software that is subject to various
open source licenses such as the Apache License, the BSD license, the
Free Software Foundation General Public License and Lesser General
Public License, the Mozilla Public License and others.  The particular
files are listed in a file in the distribution, which will typically
be called "package_manifest.txt" ("Manifest"). In the case of a
discrepancy between the Manifest and the files in the distribution,
the files in the distribution will supersede this list. The files that
are subject to open source licenses will have the licensing details
contained in those files. If you do not accept the terms of any of
those licenses, stop using those files immediately.

                FREESCALE SOFTWARE LICENSE AGREEMENT

This is a legal agreement between you (either as an individual or as
an authorized representative of your employer) and Freescale
Semiconductor, Inc. ("Freescale"). It concerns your rights to use
these files and any accompanying written materials (the "Software" and
the "Codec Software" (as defined below).  Except where specifically
indicated in the License Grant below, Software will include Codec
Software including third party software as more fully described below
and identified on Attachment A; and software created or licensed to
Freescale. This Agreement does not concern your use of any files that
are subject to an "open source" software license, such as the Free
Software Foundation "General Public License," or "GNU GPL."  In
consideration for Freescale allowing you to access the Software, you
are agreeing to be bound by the terms of this Agreement. If you do not
agree to all of the terms of this Agreement, do not download the
Software. If you change your mind later, stop using the Software and
delete all copies of the Software in your possession or control. Any
copies of the Software that you have already distributed, where
permitted, and do not destroy will continue to be governed by this
Agreement. Your prior use will also continue to be governed by this
Agreement.

LICENSE GRANT.  Exclusively in conjunction with your development and
sale of a product containing an i.MX or STMP programmable processing
unit (e.g. a microprocessor, microcontroller) supplied directly or
indirectly from Freescale ("Freescale System"), Freescale grants to
you, free of charge, the non-exclusive, non-transferable right (1) to
use the Software, (2) to reproduce the Software, (3) distribute the
Software, (4) to sublicense to others the right to use the distributed
Software as included within the Freescale System and, to the extent
the Software is provided in source code form (human readable), (5) to
prepare derivative works of the Software, (6) to distribute derivative
works thereof only in object (machine-readable) form as part of a
Freescale System, and (7) to sublicense to others the right to use the
distributed derivative works as included within the Freescale System.
Exclusively in conjunction with your development and sale of a product
containing a Freescale System, Freescale grants to you, free of
charge, the non-exclusive, non-transferable right to use the Codec
Software evaluation and demonstration purposes only.  Codec Software
is software designed for processing multimedia streams (audio and
video).  You agree that you are responsible for obtaining any
necessary licenses or permission for all Essential Patents for Codec
Software. "Essential Patent" means a patent to the limited extent that
infringement of such patent cannot be avoided in remaining compliant
with the technology standards implicated by the usage of any of the
Codec Software, including optional implementation of such standards,
on technical but not commercial grounds, taking into account normal
technical practice and the state of the art generally available at the
time of standardization.  You may not translate, reverse engineer,
decompile, or disassemble the Software except to the extent applicable
law specifically prohibits such restriction. You will not assert
against Freescale any intellectual property right that you create in
preparation of any derivative works of the Software. If you violate
any of the terms or restrictions of this Agreement, Freescale may
immediately terminate this Agreement, and require that you stop using
and delete all copies of the Software in your possession or control.

COPYRIGHT.  The Software is licensed to you, not sold.  Freescale or
its licensor owns the Software, and United States copyright laws and
international treaty provisions protect the Software. Therefore, you
must treat the Software like any other copyrighted material (e.g. a
book or musical recording). You may not use or copy the Software for
any other purpose than what is described in this Agreement. Except as
expressly provided herein, Freescale does not grant to you any express
or implied rights under any Freescale or third party patents,
copyrights, trademarks, or trade secrets. Additionally, you must
reproduce and apply any copyright or other proprietary rights notices
included on or embedded in the Software to any copies or derivative
works made thereof, in whole or in part, if any.

SUPPORT.  Freescale is NOT obligated to provide any support, upgrades
or new releases of the Software. If you wish, you may contact
Freescale and report problems and provide suggestions regarding the
Software. Freescale has no obligation whatsoever to respond in any way
to such a problem report or suggestion. Freescale may make changes to
the Software at any time, without any obligation to notify or provide
updated versions of the Software to you.

EXCLUDED LICENSES. You will not take or fail to take any action that
could subject the Software to an Excluded License.  An Excluded
License means any license that requires as a condition of use,
modification and/or distribution of software subject to the Excluded
License, that such software or other software combined and/or
distributed with such software be (A) disclosed or distributed in
source code form; (B) licensed for the purpose of making derivative
works; or (C) redistributable at no charge.

FEEDBACK. You grant to Freescale a non-exclusive, non-transferable,
irrevocable, perpetual, worldwide, royalty-free, sub-licensable
license under your Intellectual Property Rights to use without
restriction and for any purpose any suggestion, comment or other
feedback related to the Licensed Software (including, but not limited
to, error corrections and bug fixes).

NO WARRANTY.  TO THE MAXIMUM EXTENT PERMITTED BY LAW, FREESCALE
EXPRESSLY DISCLAIMS ANY WARRANTY FOR THE SOFTWARE.  THE SOFTWARE IS
PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
NON-INFRINGEMENT. YOU ASSUME THE ENTIRE RISK ARISING OUT OF THE USE OR
PERFORMANCE OF THE SOFTWARE, OR ANY SYSTEMS YOU DESIGN USING THE
SOFTWARE (IF ANY). NOTHING IN THIS AGREEMENT MAY BE CONSTRUED AS A
WARRANTY OR REPRESENTATION BY FREESCALE THAT THE SOFTWARE OR ANY
DERIVATIVE WORK DEVELOPED WITH OR INCORPORATING THE SOFTWARE WILL BE
FREE FROM INFRINGEMENT OF THE INTELLECTUAL PROPERTY RIGHTS OF THIRD
PARTIES.

INDEMNITY. You agree to fully defend and indemnify Freescale from any
and all claims, liabilities, and costs (including reasonable
attorney's fees) related to (1) your use (including your sublicensee's
use, if permitted) of the Software or (2) your violation of the terms
and conditions of this Agreement.

LIMITATION OF LIABILITY.  IN NO EVENT WILL FREESCALE BE LIABLE,
WHETHER IN CONTRACT, TORT, OR OTHERWISE, FOR ANY INCIDENTAL, SPECIAL,
INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES, INCLUDING, BUT NOT
LIMITED TO, DAMAGES FOR ANY LOSS OF USE, LOSS OF TIME, INCONVENIENCE,
COMMERCIAL LOSS, OR LOST PROFITS, SAVINGS, OR REVENUES TO THE FULL
EXTENT SUCH MAY BE DISCLAIMED BY LAW.  FREESCALE'S TOTAL LIABILITY FOR
ANY AND ALL COSTS, DAMAGES, CLAIMS, OR LOSSES WHATSOEVER ARISING OUT
OF OR IN CONNECTION WITH THIS AGREEMENT OR PRODUCT(S) SUPPLIED UNDER
THIS AGREEMENT IS LIMITED TO THE AGGREGATE AMOUNT PAID BY LICENSEE TO
FREESCALE IN CONNECTION WITH THE LICENSED SOFTWARE TO WHICH LOSSES OR
DAMAGES ARE CLAIMED.

COMPLIANCE WITH LAWS; EXPORT RESTRICTIONS. You must use the Software
in accordance with all applicable export laws, regulations and
statutes.  You agree that neither you nor your licensees (if any)
intend to or will, directly or indirectly, export or transmit the
Software to any country in violation of. any export restrictions.

GOVERNMENT USE.  Use of the Software and any corresponding
documentation, if any, is provided with RESTRICTED RIGHTS. Use,
duplication or disclosure by the Government is subject to restrictions
as set forth in subparagraph (c)(1)(ii) of The Rights in Technical
Data and Computer Software clause at DFARS 252.227-7013 or
subparagraphs (c)(l) and (2) of the Commercial Computer
Software--Restricted Rights at 48 CFR 52.227-19, as
applicable. Manufacturer is Freescale Semiconductor, Inc., 6501
William Cannon Drive West, Austin, TX, 78735.

HIGH RISK ACTIVITIES.  You acknowledge that the Software is not fault
tolerant and is not designed, manufactured or intended by Freescale
for incorporation into products intended for use or resale in on-line
control equipment in hazardous, dangerous to life or potentially
life-threatening environments requiring fail-safe performance, such as
in the operation of nuclear facilities, aircraft navigation or
communication systems, air traffic control, direct life support
machines or weapons systems, in which the failure of products could
lead directly to death, personal injury or severe physical or
environmental damage ("High Risk Activities"). You specifically
represent and warrant that you will not use the Software or any
derivative work of the Software for High Risk Activities.

CHOICE OF LAW; VENUE; LIMITATIONS.  You agree that the statutes and
laws of the United States and the State of Texas, USA, without regard
to conflicts of laws principles, will apply to all matters relating to
this Agreement or the Software, and you agree that any litigation will
be subject to the exclusive jurisdiction of the state or federal
courts in Texas, USA.

PRODUCT LABELING.  You are not authorized to use any Freescale
trademarks, brand names, or logos.

ENTIRE AGREEMENT.  This Agreement constitutes the entire agreement
between you and Freescale regarding the subject matter of this
Agreement, and supersedes all prior communications, negotiations,
understandings, agreements or representations, either written or oral,
if any.  This Agreement may only be amended in written form, executed
by you and Freescale.

SEVERABILITY.  If any provision of this Agreement is held for any
reason to be invalid or unenforceable, then the remaining provisions
of this Agreement will be unimpaired and, unless a modification or
replacement of the invalid or unenforceable provision is further held
to deprive you or Freescale of a material benefit, in which case the
Agreement will immediately terminate, the invalid or unenforceable
provision will be replaced with a provision that is valid and
enforceable and that comes closest to the intention underlying the
invalid or unenforceable provision.

NO WAIVER.  The waiver by Freescale of any breach of any provision of
this Agreement will not operate or be construed as a waiver of any
other or a subsequent breach of the same or a different provision.




                            ATTACHMENT A:

SanDisk Corporation Software
The Board Support Package includes software developed by SanDisk
Corporation ("SanDisk").  You must separately obtain the rights to
reproduce and distribute this software in source code form from
SanDisk.  Please follow these easy steps to obtain the license and
software:
1. Contact your local SanDisk sales representative to obtain the
SanDisk License Agreement.
2. Sign the license agreement.  Fax the signed agreement to SanDisk
USA marketing department at 408-542-0403.  The license will be valid
when fully executed by SanDisk.
3. If you have specific questions, please send an email to
sales@sandisk.com You may only use the SanDisk Corporation Software on
products compatible with a SanDisk Secure Digital Card.  You may not
use the SanDisk Corporation Software on any memory device product.
SanDisk retains all rights to any modifications or derivative works to
the SanDisk Corporation Software that you may create.

Global Locate
The Board Support Package includes software and hardware developed by
Global Locate, Inc. ("Global Locate") and acquired by Broadcom
Corporation.  You must separately obtain rights beyond evaluation and
demonstration in connection with the Board Support Package from
Broadcom Corporation.

CSR
The Board Support Package includes software and hardware developed by
Cambridge Silicon Radio, Inc. ("CSR").  You must separately obtain
rights beyond evaluation and demonstration in connection with the
Board Support Package from CSR.

CTS
The Board Support Package includes software or technology developed by
Coding Technologies, AB ("CTS").  You only have the right to use the
CTS software in connection with the Freescale System.

Do you accept the EULA you just read? (y/n) y
EULA has been accepted.

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    meta-toolchain
    meta-toolchain-sdk
    adt-installer
    meta-ide-support

Your build environemnt has been configured with:

    MACHINE=imx233-olinuxino-micro
    SDKMACHINE=i686
    DISTRO=poky
    EULA=1
[chris@thinkpad build]$

A small patch to avoid build failures

[chris@thinkpad build]$ cd ../sources/poky/meta/recipes-connectivity/openssl/openssl-1.0.1e/
[chris@thinkpad openssl-1.0.1e]$ wget https://github.com/OpenELEC/OpenELEC.tv/raw/79ff26908f12c1ba1285b4d6e3fc3228491e9400/packages/security/openssl/patches/openssl-1.0.1c-nodocs.patch
--2013-06-28 07:51:14--  https://github.com/OpenELEC/OpenELEC.tv/raw/79ff26908f12c1ba1285b4d6e3fc3228491e9400/packages/security/openssl/patches/openssl-1.0.1c-nodocs.patch
Resolving github.com (github.com)... 204.232.175.90
Connecting to github.com (github.com)|204.232.175.90|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.github.com/OpenELEC/OpenELEC.tv/79ff26908f12c1ba1285b4d6e3fc3228491e9400/packages/security/openssl/patches/openssl-1.0.1c-nodocs.patch [following]
--2013-06-28 07:51:16--  https://raw.github.com/OpenELEC/OpenELEC.tv/79ff26908f12c1ba1285b4d6e3fc3228491e9400/packages/security/openssl/patches/openssl-1.0.1c-nodocs.patch
Resolving raw.github.com (raw.github.com)... 199.27.76.133
Connecting to raw.github.com (raw.github.com)|199.27.76.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 362 [text/plain]
Saving to: ‘openssl-1.0.1c-nodocs.patch’

100%[===========================================>] 362         --.-K/s   in 0s

2013-06-28 07:51:16 (16.6 MB/s) - ‘openssl-1.0.1c-nodocs.patch’ saved [362/362]

[chris@thinkpad openssl-1.0.1e]$ cat openssl-1.0.1c-nodocs.patch
diff --git a/Makefile.org b/Makefile.org
index 55273ea..4e70281 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -537,7 +537,7 @@ dist:
dist_pem_h:
        (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)

-install: all install_docs install_sw
+install: all install_sw

install_sw:
        @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
[chris@thinkpad openssl-1.0.1e]$ cd ../
[chris@thinkpad openssl]$ cp openssl_1.0.1e.bb openssl_1.0.1e.bb.bak
[chris@thinkpad openssl]$ vim openssl_1.0.1e.bb
[chris@thinkpad openssl]$ git diff openssl_1.0.1e.bb.bak openssl_1.0.1e.bb
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.1e.bb b/meta/recipes-connectivity/openssl/openssl_1.0.1e.bb
index c7c225d..b04f765 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.1e.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.1e.bb
@@ -29,6 +29,7 @@ SRC_URI += "file://configure-targets.patch \
            file://debian/no-symbolic.patch \
            file://debian/debian-targets.patch \
            file://openssl_fix_for_x32.patch \
+            file://openssl-1.0.1c-nodocs.patch \
            file://find.pl \
            "

[chris@thinkpad openssl]$ cd ../../../../../build/
[chris@thinkpad build]$

Build the SD card image

Now we can build the SD card image, this needs around 15 GB of disk space and takes nearly 2 hours:

[chris@thinkpad build]$ bitbake -v core-image-minimal 2>&1 | tee output-bitbake.txt
Pseudo is not present but is required, building this first before the main build
WARNING: Host distribution "Fedora-19" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes...WARNING: Unable to get checksum for nativesdk-openssl SRC_URI entry openssl-1.0.1c-nodocs.patch: file could not be found
WARNING: Unable to get checksum for openssl-native SRC_URI entry openssl-1.0.1c-nodocs.patch: file could not be found
WARNING: Unable to get checksum for openssl SRC_URI entry openssl-1.0.1c-nodocs.patch: file could not be found
done.
Parsing of 1276 .bb files complete (0 cached, 1276 parsed). 1644 targets, 86 skipped, 0 masked, 0 errors.

Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "imx233-olinuxino-micro"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4.1"
TUNE_FEATURES     = "armv5 thumb dsp"
TARGET_FPU        = "soft"
meta
meta-yocto        = "(nobranch):e4a0a4c5e419154a34710a1b6c28d4180c6304c3"
meta-oe           = "(nobranch):13ae5105ee30410136beeae66ec41ee4a8a2e2b0"
meta-fsl-arm      = "(nobranch):42ace2971e25eba042a1058358ffc84722794f67"
meta-fsl-arm-extra = "(nobranch):5f5a9cfcad223f5a1c623346780510ffcdc012ab"
meta-fsl-demos    = "(nobranch):724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Marking Active Tasks
NOTE: Pruned 301 inactive tasks, 63 left
NOTE: Assign Weightings
NOTE: Compute totals (have 1 endpoint(s))
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 63 (ID: 11, /home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_fetch)
NOTE: Running task 2 of 63 (ID: 53, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb, do_fetch)
NOTE: Running task 3 of 63 (ID: 60, /home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/m4/m4-native_1.4.16.bb, do_fetch)
NOTE: Running task 4 of 63 (ID: 32, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb, do_fetch)
NOTE: recipe quilt-native-0.60-r0: task do_fetch: Started
NOTE: recipe gnu-config-native-20120814-r0: task do_fetch: Started
NOTE: recipe m4-native-1.4.16-r4: task do_fetch: Started
NOTE: recipe autoconf-native-2.69-r11: task do_fetch: Started
NOTE: recipe gnu-config-native-20120814-r0: task do_fetch: Succeeded
NOTE: Running task 5 of 63 (ID: 49, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb, do_unpack)
NOTE: recipe gnu-config-native-20120814-r0: task do_unpack: Started
NOTE: recipe gnu-config-native-20120814-r0: task do_unpack: Succeeded
...
1+0 records in
1+0 records out
1 byte (1 B) copied, 4.2609e-05 s, 23.5 kB/s
+ parted /home/chris/local/OLinuXino/fsl-community-bsp/build/tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard print

Model:  (file)
Disk /home/chris/local/OLinuXino/fsl-community-bsp/build/tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard: 25.2MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
1      1049kB  2097kB  1049kB  primary
2      2097kB  12.6MB  10.5MB  primary  fat16
3      12.6MB  21.0MB  8389kB  primary


++ expr 8192 '*' 1024 + 4096 '*' 1024

+ dd if=/home/chris/local/OLinuXino/fsl-community-bsp/build/tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.ext3 of=/home/chris/local/OLinuXino/fsl-community-bsp/build/tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard conv=notrunc seek=1 bs=12582912

0+1 records in
0+1 records out
8388608 bytes (8.4 MB) copied, 0.00854933 s, 981 MB/s

+ sync

+ sync

+ cd /home/chris/local/OLinuXino/fsl-community-bsp/build/tmp/deploy/images/

+ '[' -n core-image-minimal-imx233-olinuxino-micro ']'
+ for type in sdcard
+ '[' -e core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard ']'
+ ln -s core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard /home/chris/local/OLinuXino/fsl-community-bsp/build/tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro.sdcard


NOTE: recipe core-image-minimal-1.0-r0: task do_rootfs: Succeeded
NOTE: Running noexec task 1669 of 1669 (ID: 12, /home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb, do_build)
NOTE: Tasks Summary: Attempted 1669 tasks of which 1200 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
[chris@thinkpad build]$

The file fsl-community-bsp/build/output-bitbake.txt contains the full build log and has a size of around 60 MB.

The generated sdcard image is available under tmp/deploy/images and has only a size of 24 megabytes, which is a lot smaller than the default Arch Linux ARM image:

[chris@thinkpad build]$ ls -lh tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard
-rw-r--r--. 1 chris chris 24M Jun 28 11:35 tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard
[chris@thinkpad build]$

So there are probably a lot of programs missing in the core-image-minimal.

Note

You can also fetch all packages at once if you have a fast internet connection at work/university and then build it at home:

[chris@thinkpad build]$ bitbake -c fetchall core-image-minimal
WARNING: Host distribution "Fedora-19" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#######################################| ETA:  00:00:00
Loaded 1645 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "imx233-olinuxino-micro"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4.1"
TUNE_FEATURES     = "armv5 thumb dsp"
TARGET_FPU        = "soft"
meta
meta-yocto        = "(nobranch):e4a0a4c5e419154a34710a1b6c28d4180c6304c3"
meta-oe           = "(nobranch):13ae5105ee30410136beeae66ec41ee4a8a2e2b0"
meta-fsl-arm      = "(nobranch):42ace2971e25eba042a1058358ffc84722794f67"
meta-fsl-arm-extra = "(nobranch):5f5a9cfcad223f5a1c623346780510ffcdc012ab"
meta-fsl-demos    = "(nobranch):724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
Currently 2 running tasks (270 of 284):
0: linux-fslc-3.8+gitAUTOINC+8a197c14157aca439ce104e4bf6cd12076f81630-r5 do_fetch (pid 3543)
1: python-native-2.7.3-r0.1 do_populate_sysroot (pid 23618)
...
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 284 tasks of which 141 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
[chris@thinkpad build]$

Not ALL packages got fetched, u-boot and elftosb for example were missing and got downloaded later:

...
NOTE: recipe parted-native-3.1-r1: task do_fetch: Started
NOTE: recipe dosfstools-native-2.11-r5: task do_fetch: Succeeded
NOTE: Running task 1110 of 1669 (ID: 264, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb, do_unpack)
NOTE: recipe dosfstools-native-2.11-r5: task do_unpack: Started
NOTE: recipe dosfstools-native-2.11-r5: task do_unpack: Succeeded
NOTE: Running task 1111 of 1669 (ID: 265, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb, do_patch)
NOTE: recipe dosfstools-native-2.11-r5: task do_patch: Started
NOTE: recipe dosfstools-native-2.11-r5: task do_patch: Succeeded
NOTE: Running task 1112 of 1669 (ID: 228, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/meta-fsl-arm/recipes-bsp/u-boot/u-boot-mxsboot_2013.04.bb, do_fetch)
NOTE: recipe u-boot-mxsboot-native-v2013.04-r0: task do_fetch: Started
NOTE: recipe parted-native-3.1-r1: task do_fetch: Succeeded
NOTE: Running task 1113 of 1669 (ID: 251, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-extended/parted/parted_3.1.bb, do_unpack)
NOTE: recipe parted-native-3.1-r1: task do_unpack: Started
NOTE: recipe parted-native-3.1-r1: task do_unpack: Succeeded
NOTE: Running task 1114 of 1669 (ID: 252, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-extended/parted/parted_3.1.bb, do_patch)
NOTE: recipe parted-native-3.1-r1: task do_patch: Started
NOTE: recipe parted-native-3.1-r1: task do_patch: Succeeded
NOTE: Running task 1115 of 1669 (ID: 215, virtual:native:/home/chris/local/OLinuXino/fsl-community-bsp/sources/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.7.bb, do_fetch)
NOTE: recipe e2fsprogs-native-1.42.7-r0: task do_fetch: Started
...

You can specify the maximum number of concurrent tasks in build/conf/local.conf, I had download failures with the default of 4 concurrent downloads.

[chris@thinkpad build]$ tail -n2 conf/local.conf
PARALLEL_MAKE     = "-j2"
BB_NUMBER_THREADS = "1"
[chris@thinkpad build]$

Copy the file system image to the SD card and boot it

Now we can test our newly created image on the hardware, just use dd to write the new image to the SD card:

[chris@thinkpad build]$ sudo dd if=tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628092718.rootfs.sdcard of=/dev/mmcblk0 bs=1M
24+0 records in
24+0 records out
25165824 bytes (25 MB) copied, 7.04297 s, 3.6 MB/s
[chris@thinkpad build]$

You can check the partition layout or resize the root partition if you want:

[chris@thinkpad build]$ sudo fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 1015 MB, 1015808000 bytes, 1984000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009d5bf

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048        4095        1024   53  OnTrack DM6 Aux3
/dev/mmcblk0p2            4096       24575       10240   83  Linux
/dev/mmcblk0p3           24576       40959        8192   83  Linux
[chris@thinkpad build]$

And it starts fine:

[chris@thinkpad ~]$ minicom oli
Welcome to minicom 2.6.2

OPTIONS: I18n
Compiled on Feb  7 2013, 12:53:19.
Port /dev/ttyUSB0, 12:55:11

Press CTRL-A Z for help on special keys

HTLLCLC

U-Boot 2013.04-00053-g08868db (Jun 28 2013 - 11:32:12)

CPU:   Freescale i.MX23 rev1.4 at 454 MHz
BOOT:  SSP SD/MMC #0
DRAM:  64 MiB
MMC:   MXS MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
mmc0 is current device
reading boot.scr
** Unable to read file boot.scr **
reading uImage
3257992 bytes read in 1113 ms (2.8 MiB/s)
Booting from mmc ...
reading imx23-olinuxino.dtb
21010 bytes read in 34 ms (602.5 KiB/s)
## Booting kernel from Legacy Image at 42000000 ...
  Image Name:   Linux-3.8.13-fslc+g8a197c1
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:    3257928 Bytes = 3.1 MiB
  Load Address: 40008000
  Entry Point:  40008000
  Verifying Checksum ... OK
## Flattened Device Tree blob at 41000000
  Booting using the fdt blob at 0x41000000
  Loading Kernel Image ... OK
OK
  Loading Device Tree to 43b65000, end 43b6d211 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.8.13-fslc+g8a197c1 (chris@thinkpad) (gcc version 4.7.2 (GCC) ) #1 Fri Jun 28 10:10:18 CEST 2013
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Freescale i.MX23 (Device Tree), model: i.MX23 Olinuxino Low Cost Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyAMA0,115200 root=/dev/mmcblk0p3 rw rootwait
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 53020k/53020k available, 12516k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05dbb00   (5967 kB)
[    0.000000]       .init : 0xc05dc000 - 0xc0601980   ( 151 kB)
[    0.000000]       .data : 0xc0602000 - 0xc0642328   ( 257 kB)
[    0.000000]        .bss : 0xc0642328 - 0xc0b93e68   (5447 kB)
[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] of_irq_init: children remain, but no parents
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3695 kB
[    0.000000]  per task-struct memory footprint: 1152 bytes
[    0.070000] Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.070000] CPU: Testing write buffer coherency: ok
[    0.080000] Setting up static identity map for 0x40432698 - 0x404326f0
[    0.090000] devtmpfs: initialized
[    0.100000] pinctrl core: initialized pinctrl subsystem
[    0.110000] regulator-dummy: no parameters
[    0.110000] NET: Registered protocol family 16
[    0.110000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.160000] Serial: AMBA PL011 UART driver
[    0.160000] 80070000.serial: ttyAMA0 at MMIO 0x80070000 (irq = 129) is a PL011 rev2
[    0.350000] console [ttyAMA0] enabled
[    0.380000] bio: create slab <bio-0> at 0
[    0.400000] mxs-dma 80004000.dma-apbh: initialized
[    0.410000] mxs-dma 80024000.dma-apbx: initialized
[    0.420000] usb0_vbus: 5000 mV
[    0.420000] SCSI subsystem initialized
[    0.430000] usbcore: registered new interface driver usbfs
[    0.430000] usbcore: registered new interface driver hub
[    0.440000] usbcore: registered new device driver usb
[    0.450000] Advanced Linux Sound Architecture Driver Initialized.
[    0.460000] Switching to clocksource mxs_timer
[    0.710000] NET: Registered protocol family 2
[    0.720000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.730000] TCP bind hash table entries: 512 (order: 2, 18432 bytes)
[    0.730000] TCP: Hash tables configured (established 512 bind 512)
[    0.740000] TCP: reno registered
[    0.740000] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.750000] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.760000] NET: Registered protocol family 1
[    0.770000] RPC: Registered named UNIX socket transport module.
[    0.770000] RPC: Registered udp transport module.
[    0.780000] RPC: Registered tcp transport module.
[    0.780000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.790000] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.890000] NFS: Registering the id_resolver key type
[    0.890000] Key type id_resolver registered
[    0.900000] Key type id_legacy registered
[    0.900000] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.910000] msgmni has been set to 103
[    0.930000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.940000] io scheduler noop registered (default)
[    1.400000] uart-pl011 80070000.serial: no DMA platform data
[    1.410000] 8006c000.serial: ttyAPP0 at MMIO 0x8006c000 (irq = 126) is a 8006c000.serial
[    1.420000] mxs-auart 8006c000.serial: Found APPUART 3.0.0
[    1.440000] usbcore: registered new interface driver asix
[    1.440000] usbcore: registered new interface driver cdc_ether
[    1.450000] usbcore: registered new interface driver smsc95xx
[    1.460000] usbcore: registered new interface driver net1080
[    1.460000] usbcore: registered new interface driver cdc_subset
[    1.470000] usbcore: registered new interface driver zaurus
[    1.480000] usbcore: registered new interface driver cdc_ncm
[    1.480000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.490000] Initializing USB Mass Storage driver...
[    1.490000] usbcore: registered new interface driver usb-storage
[    1.500000] USB Mass Storage support registered.
[    1.510000] imx_usb 80080000.usb: pinctrl get/select failed, err=-19
[    1.520000] ci_hdrc ci_hdrc.0: doesn't support gadget
[    1.520000] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    1.530000] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    1.560000] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    1.570000] hub 1-0:1.0: USB hub found
[    1.580000] hub 1-0:1.0: 1 port detected
[    1.590000] mousedev: PS/2 mouse device common for all mice
[    1.600000] stmp3xxx-rtc 8005c000.rtc: rtc core: registered 8005c000.rtc as rtc0
[    1.610000] i2c /dev entries driver
[    1.660000] mxs-mmc 80010000.ssp: initialized
[    1.670000] usbcore: registered new interface driver usbhid
[    1.680000] usbhid: USB HID core driver
[    1.700000] TCP: cubic registered
[    1.700000] NET: Registered protocol family 17
[    1.710000] Key type dns_resolver registered
[    1.720000] registered taskstats version 1
[    1.730000] stmp3xxx-rtc 8005c000.rtc: setting system clock to 1970-01-01 00:00:07 UTC (7)
[    1.770000] ALSA device list:
[    1.770000]   No soundcards found.
[    1.780000] mmc0: host does not support reading read-only switch. assuming write-enable.
[    1.790000] Waiting for root device /dev/mmcblk0p3...
[    1.800000] mmc0: new SD card at address e624
[    1.810000] mmcblk0: mmc0:e624 SU01G 968 MiB
[    1.820000]  mmcblk0: p1 p2 p3
[    1.910000] EXT3-fs (mmcblk0p3): warning: feature flags set on rev 0 fs, running e2fsck is recommended
[    1.930000] kjournald starting.  Commit interval 5 seconds
[    1.930000] EXT3-fs (mmcblk0p3): warning: updating to rev 1 because of new feature flag, running e2fsck is recommended
[    1.950000] EXT3-fs (mmcblk0p3): using internal journal
[    1.950000] EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
[    1.960000] VFS: Mounted root (ext3 filesystem) on device 179:3.
[    1.970000] devtmpfs: mounted
[    1.980000] Freeing init memory: 148K
INIT: version 2.88 booting
Starting udev
[    3.160000] udevd[58]: starting version 182
Starting Bootlog daemon: bootlogd.
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Fri Jun 28 09:35:00 UTC 2013
INIT: Entering runlevel: 5
Starting syslogd/klogd: done
Stopping Bootlog daemon: bootlogd.

Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 imx233-olinuxino-micro ttyAMA0

imx233-olinuxino-micro login: root
root@imx233-olinuxino-micro:~# ls /bin/
addgroup             fgrep                ping6
adduser              grep                 ps
ash                  gunzip               pwd
busybox              gzip                 rm
cat                  hostname             rmdir
chattr               ip                   sed
chgrp                kill                 sh
chmod                ln                   sleep
chown                login                stty
cp                   ls                   su
cpio                 mkdir                sync
date                 mknod                tar
dd                   mktemp               tinylogin
delgroup             more                 touch
deluser              mount                true
df                   mountpoint           umount
dmesg                mountpoint.sysvinit  uname
dnsdomainname        mv                   usleep
dumpkmap             netstat              vi
echo                 pidof                zcat
egrep                pidof.sysvinit
false                ping
root@imx233-olinuxino-micro:~# ls /usr/bin/
[                    last.sysvinit        telnet
[[                   lastb                test
ar                   less                 tftp
awk                  logger               time
basename             logname              top
bunzip2              md5sum               tr
bzcat                mesg                 traceroute
chvt                 mesg.sysvinit        tty
clear                microcom             udevadm
cmp                  mkfifo               uniq
cut                  nc                   unzip
dc                   nohup                update-alternatives
deallocvt            nslookup             uptime
diff                 od                   users
dirname              openvt               utmpdump
du                   passwd               utmpdump.sysvinit
dumpleases           patch                vlock
env                  printf               wall
expr                 readlink             wall.sysvinit
find                 realpath             watch
flock                renice               wc
free                 reset                wget
fuser                run-parts            which
groups               seq                  who
head                 sort                 whoami
hexdump              stat                 xargs
id                   strings              yes
killall              tail
last                 tee
root@imx233-olinuxino-micro:~# top
Mem: 16500K used, 36668K free, 0K shrd, 956K buff, 3324K cached
CPU:   8% usr   8% sys   0% nic  83% idle   0% io   0% irq   0% sirq
Load average: 0.00 0.08 0.20 1/34 438
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
  438   433 root     R     2224   4%  17% top
   58     1 root     S     3048   6%   0% /lib/udev/udevd -d
  174    58 root     S     3044   6%   0% /lib/udev/udevd -d
  175    58 root     S     3044   6%   0% /lib/udev/udevd -d
  433     1 root     S     2404   5%   0% -sh
  429     1 root     S     2224   4%   0% /sbin/klogd -n
  427     1 root     S     2224   4%   0% /sbin/syslogd -n -O /var/log/messages
  434     1 root     S     1956   4%   0% /sbin/getty 38400 tty1
    1     0 root     S     1696   3%   0% init [5]
   10     2 root     SW       0   0%   0% [kdevtmpfs]
   34     2 root     SW       0   0%   0% [mmcqd/0]
    3     2 root     SW       0   0%   0% [ksoftirqd/0]
   21     2 root     SW       0   0%   0% [kworker/u:1]
    8     2 root     SW       0   0%   0% [watchdog/0]
   35     2 root     SW       0   0%   0% [kjournald]
    2     0 root     SW       0   0%   0% [kthreadd]
   33     2 root     SW       0   0%   0% [kworker/u:2]
    4     2 root     SW       0   0%   0% [kworker/0:0]
    5     2 root     SW<      0   0%   0% [kworker/0:0H]
    7     2 root     SW<      0   0%   0% [kworker/u:0H]
root@imx233-olinuxino-micro:~# echo 1 > /sys/class/leds/green/brightness
root@imx233-olinuxino-micro:~# echo 0 > /sys/class/leds/green/brightness
root@imx233-olinuxino-micro:~# echo heartbeat >  /sys/class/leds/green/trigger

Customize the kernel

Use menuconfig to create a custom kernel configuration

[chris@thinkpad fsl-community-bsp]$ bitbake -c menuconfig linux-fslc
bash: bitbake: command not found
[chris@thinkpad fsl-community-bsp]$ MACHINE=imx233-olinuxino-micro . ./setup-environment build
Configuring for imx233-olinuxino-micro

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    meta-toolchain
    meta-toolchain-sdk
    adt-installer
    meta-ide-support

Your configuration files at build has not been touched.
[chris@thinkpad build]$ bitbake -c menuconfig linux-fslc
WARNING: Host distribution "Fedora-19" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#########################################| ETA:  00:00:00
Loaded 1645 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "imx233-olinuxino-micro"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4.1"
TUNE_FEATURES     = "armv5 thumb dsp"
TARGET_FPU        = "soft"
meta
meta-yocto        = "(nobranch):e4a0a4c5e419154a34710a1b6c28d4180c6304c3"
meta-oe           = "(nobranch):13ae5105ee30410136beeae66ec41ee4a8a2e2b0"
meta-fsl-arm      = "(nobranch):42ace2971e25eba042a1058358ffc84722794f67"
meta-fsl-arm-extra = "(nobranch):5f5a9cfcad223f5a1c623346780510ffcdc012ab"
meta-fsl-demos    = "(nobranch):724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 247 tasks of which 246 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
[chris@thinkpad build]$
Screenshot "bitbake -c menuconfig linux-fslc"

Screenshot “bitbake -c menuconfig linux-fslc”

Note

You can also try:

[chris@thinkpad build]$ bitbake -c devshell linux-fslc

And then run make menuconfig in the devshell.

Screenshot "bitbake -c devshell linux-fslc"

Screenshot “bitbake -c devshell linux-fslc”

Load an Alternate Configuration File

Now you have the chance to load an alternate configuration file. To do this select Load an Alternate Configuration File in menuconfig and paste the path of the kernel configuration file.

Or start from scratch...

Networking support

At the moment my network adapter gets not recognized:

root@imx233-olinuxino-micro:~#
[ 1018.670000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
root@imx233-olinuxino-micro:~# tail /var/log/messages
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.820000]  mmcblk0: p1 p2 p3
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.920000] kjournald starting.  Commit interval 5 seconds
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.930000] EXT3-fs (mmcblk0p3): using internal journal
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.930000] EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.940000] VFS: Mounted root (ext3 filesystem) on device 179:3.
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.950000] devtmpfs: mounted
Jun 28 10:49:00 imx233-olinuxino-micro user.info kernel: [    1.960000] Freeing init memory: 148K
Jun 28 10:49:00 imx233-olinuxino-micro user.err kernel: 0>[    3.130000] udevd[58]: starting version 182
Jun 28 10:49:20 imx233-olinuxino-micro auth.info login[321]: root login  on `ttyAMA0'
Jun 28 11:05:37 imx233-olinuxino-micro user.info kernel: [ 1018.670000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
root@imx233-olinuxino-micro:~# dmesg | tail
[    1.810000] mmcblk0: mmc0:e624 SU01G 968 MiB
[    1.820000]  mmcblk0: p1 p2 p3
[    1.920000] kjournald starting.  Commit interval 5 seconds
[    1.930000] EXT3-fs (mmcblk0p3): using internal journal
[    1.930000] EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
[    1.940000] VFS: Mounted root (ext3 filesystem) on device 179:3.
[    1.950000] devtmpfs: mounted
[    1.960000] Freeing init memory: 148K
>[    3.130000] udevd[58]: starting version 182
[ 1018.670000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
root@imx233-olinuxino-micro:~# lsusb
-sh: lsusb: not found
root@imx233-olinuxino-micro:~#

Now I will enable the driver in menuconfig:

[*] Networking support  --->
    [*]   Wireless (NEW)  --->
    --- Wireless
      <*>   cfg80211 - wireless configuration API
      [ ]     nl80211 testmode command (NEW)
      [*]     enable developer warnings
      [*]     cfg80211 regulatory debugging
      [*]     enable powersave by default (NEW)
      [ ]     cfg80211 DebugFS entries (NEW)
      [*]     cfg80211 wireless extensions compatibility
      <*>   Generic IEEE 802.11 Networking Stack (mac80211)
            Default rate control algorithm (Minstrel)  --->
      [ ]   Enable mac80211 mesh networking (pre-802.11s) support (NEW)
      [*]   Enable LED triggers
      [ ]   Export mac80211 internals in DebugFS (NEW)
      [ ]   Trace all mac80211 debug messages (NEW)
      [ ]   Select mac80211 debugging features  --->

Device Drivers  --->
  [*] Network device support  --->
    [*]   Wireless LAN  --->
      <*>   Atheros Wireless Cards  --->
       --- Atheros Wireless Cards
        [*]   Atheros wireless debugging
        [*]   Atheros bluetooth coexistence support (NEW)
        <*>   Atheros 802.11n wireless cards support
        [ ]     Atheros ath9k AHB bus support
        [ ]     Atheros ath9k debugging (NEW)
        [*]   Atheros ath9k rate control (NEW)
        <*>   Atheros HTC based wireless cards support
        [*]     Atheros ath9k_htc debugging
        < >   Linux Community AR9170 802.11n USB support (NEW)
        < >   Atheros mobile chipsets support (NEW)
        < >   Atheros AR5523 wireless driver support (NEW)

Save it

Exit menuconfig and save the configuration.

Now copy it into the source directory and override the old configuration so that this configuration gets used automatically next time:

[chris@thinkpad build]$ cp tmp/work/imx233_olinuxino_micro-poky-linux-gnueabi/linux-fslc/3.8+gitAUTOINC+8a197c14157aca439ce104e4bf6cd12076f81630-r5/git/.config ../sources/meta-fsl-arm/recipes-kernel/linux/linux-fslc/mxs/defconfig

Rebuild the kernel

[chris@thinkpad build]$ bitbake -c cleansstate linux-fslc
WARNING: Host distribution "Fedora-19" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#########################################| ETA:  00:00:00
Loaded 1645 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "imx233-olinuxino-micro"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4.1"
TUNE_FEATURES     = "armv5 thumb dsp"
TARGET_FPU        = "soft"
meta
meta-yocto        = "(nobranch):e4a0a4c5e419154a34710a1b6c28d4180c6304c3"
meta-oe           = "(nobranch):13ae5105ee30410136beeae66ec41ee4a8a2e2b0"
meta-fsl-arm      = "(nobranch):42ace2971e25eba042a1058358ffc84722794f67"
meta-fsl-arm-extra = "(nobranch):5f5a9cfcad223f5a1c623346780510ffcdc012ab"
meta-fsl-demos    = "(nobranch):724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
[chris@thinkpad build]$
[chris@thinkpad build]$ bitbake core-image-minimal
WARNING: Host distribution "Fedora-19" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##########################################| ETA:  00:00:00
Loaded 1645 entries from dependency cache.

Build Configuration:
BB_VERSION        = "1.18.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "imx233-olinuxino-micro"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4.1"
TUNE_FEATURES     = "armv5 thumb dsp"
TARGET_FPU        = "soft"
meta
meta-yocto        = "(nobranch):e4a0a4c5e419154a34710a1b6c28d4180c6304c3"
meta-oe           = "(nobranch):13ae5105ee30410136beeae66ec41ee4a8a2e2b0"
meta-fsl-arm      = "(nobranch):42ace2971e25eba042a1058358ffc84722794f67"
meta-fsl-arm-extra = "(nobranch):5f5a9cfcad223f5a1c623346780510ffcdc012ab"
meta-fsl-demos    = "(nobranch):724cfb929748f47782dea3b1dc412b028f6f3515"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1669 tasks of which 1541 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
[chris@thinkpad build]$

Copy the new image to the SD card and boot it

[chris@thinkpad build]$ sudo dd if=tmp/deploy/images/core-image-minimal-imx233-olinuxino-micro-20130628174627.rootfs.sdcard of=/dev/mmcblk0 bs=1M
24+0 records in
24+0 records out
25165824 bytes (25 MB) copied, 6.72033 s, 3.7 MB/s
[chris@thinkpad build]$
INIT: version 2.88 booting
Starting udev
[    3.450000] udevd[66]: starting version 182
Starting Bootlog daemon: bootlogd.
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Fri Jun 28 18:04:00 UTC 2013
INIT: Entering runlevel: 5
Starting syslogd/klogd: done
Stopping Bootlog daemon: bootlogd.

Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 imx233-olinuxino-micro ttyAMA0

imx233-olinuxino-micro login: root
root@imx233-olinuxino-micro:~#
[  130.630000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[  130.800000] usb 1-1: ath9k_htc: Firmware htc_7010.fw requested
[  130.890000] usb 1-1: ath9k_htc: Failed to get firmware htc_7010.fw
[  130.930000] usb 1-1: ath9k_htc: USB layer deinitialized

root@imx233-olinuxino-micro:~# tail /var/log/messages
Jun 28 18:04:00 imx233-olinuxino-micro user.info kernel: [    2.230000] EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
Jun 28 18:04:00 imx233-olinuxino-micro user.info kernel: [    2.230000] VFS: Mounted root (ext3 filesystem) on device 179:3.
Jun 28 18:04:00 imx233-olinuxino-micro user.info kernel: [    2.240000] devtmpfs: mounted
Jun 28 18:04:00 imx233-olinuxino-micro user.info kernel: [    2.250000] Freeing init memory: 152K
Jun 28 18:04:00 imx233-olinuxino-micro user.err kernel: 0>[    3.450000] udevd[66]: starting version 182
Jun 28 18:05:41 imx233-olinuxino-micro auth.info login[442]: root login  on `ttyAMA0'
Jun 28 18:05:46 imx233-olinuxino-micro user.info kernel: [  130.630000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
Jun 28 18:05:46 imx233-olinuxino-micro user.info kernel: [  130.800000] usb 1-1: ath9k_htc: Firmware htc_7010.fw requested
Jun 28 18:05:46 imx233-olinuxino-micro user.err kernel: [  130.890000] usb 1-1: ath9k_htc: Failed to get firmware htc_7010.fw
Jun 28 18:05:46 imx233-olinuxino-micro user.info kernel: [  130.930000] usb 1-1: ath9k_htc: USB layer deinitialized
root@imx233-olinuxino-micro:~# dmesg |tail
[    2.220000] EXT3-fs (mmcblk0p3): using internal journal
[    2.230000] EXT3-fs (mmcblk0p3): mounted filesystem with ordered data mode
[    2.230000] VFS: Mounted root (ext3 filesystem) on device 179:3.
[    2.240000] devtmpfs: mounted
[    2.250000] Freeing init memory: 152K
>[    3.450000] udevd[66]: starting version 182
[  130.630000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[  130.800000] usb 1-1: ath9k_htc: Firmware htc_7010.fw requested
[  130.890000] usb 1-1: ath9k_htc: Failed to get firmware htc_7010.fw
[  130.930000] usb 1-1: ath9k_htc: USB layer deinitialized
root@imx233-olinuxino-micro:~# cat /proc/version
Linux version 3.8.13-fslc+g8a197c1 (chris@thinkpad) (gcc version 4.7.2 (GCC) ) #1 Fri Jun 28 19:53:15 CEST 2013
root@imx233-olinuxino-micro:~#
root@imx233-olinuxino-micro:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@imx233-olinuxino-micro:~#

So the wifi device gets detected but the firmware is missing.

Adding WiFi Support

Copy the firmware to the SD card

Since we have already enabled the WiFi drivers for our WiFi dongle we only need to copy the missing firmware to the root filesystem.

I’ve inserted the sdcard into my laptop and will now copy the firmware from my Linux distribution to the sdcard which is kind of a hack but should work:

[chris@thinkpad ~]$ sudo mount /dev/mmcblk0p3 /mnt/olinuxino/
[chris@thinkpad ~]$ df -h /mnt/olinuxino/
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p3  6.9M  5.3M  1.3M  82% /mnt/olinuxino
[chris@thinkpad ~]$ sudo mkdir /mnt/olinuxino/lib/firmware/
[chris@thinkpad ~]$ sudo cp /lib/firmware/htc_7010.fw /mnt/olinuxino/lib/firmware/
[chris@thinkpad ~]$ sudo umount /mnt/olinuxino
[chris@thinkpad ~]$

So now after booting the wifi device is available but the iwconfig command is still missing:

INIT: Entering runlevel: 5
Starting syslogd/klogd: done
Stopping Bootlog daemon: bootlogd.

Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 imx233-olinuxino-micro ttyAMA0

imx233-olinuxino-micro login: root
root@imx233-olinuxino-micro:~# df -h /
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 7.9M      6.3M      1.2M  85% /
root@imx233-olinuxino-micro:~#
[   68.800000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[   68.980000] usb 1-1: ath9k_htc: Firmware htc_7010.fw requested
[   69.130000] usb 1-1: ath9k_htc: Transferred FW: htc_7010.fw, size: 72992
[   69.200000] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 45 credits
[   69.480000] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
[   69.560000] ieee80211 phy0: Atheros AR9287 Rev:2

root@imx233-olinuxino-micro:~# tail /var/log/messages
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: Updating information on frequency 2462 MHz for a 20 MHz width chann:
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: Updating information on frequency 2467 MHz for a 20 MHz width chann:
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: 2457000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: Updating information on frequency 2472 MHz for a 20 MHz width chann:
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: 2457000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: Updating information on frequency 2484 MHz for a 20 MHz width chann:
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.520000] cfg80211: 2474000 KHz - 2494000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
Jun 28 18:14:48 imx233-olinuxino-micro user.info kernel: [   69.560000] ieee80211 phy0: Atheros AR9287 Rev:2
Jun 28 18:14:48 imx233-olinuxino-micro user.debug kernel: [   69.580000] cfg80211: Pending regulatory request, waiting for it to be processed...
root@imx233-olinuxino-micro:~# dmesg |tail
[   69.520000] cfg80211: Updating information on frequency 2462 MHz for a 20 MHz width channel with regulatory rule:
[   69.520000] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
[   69.520000] cfg80211: Updating information on frequency 2467 MHz for a 20 MHz width channel with regulatory rule:
[   69.520000] cfg80211: 2457000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
[   69.520000] cfg80211: Updating information on frequency 2472 MHz for a 20 MHz width channel with regulatory rule:
[   69.520000] cfg80211: 2457000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
[   69.520000] cfg80211: Updating information on frequency 2484 MHz for a 20 MHz width channel with regulatory rule:
[   69.520000] cfg80211: 2474000 KHz - 2494000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
[   69.560000] ieee80211 phy0: Atheros AR9287 Rev:2
[   69.580000] cfg80211: Pending regulatory request, waiting for it to be processed...
root@imx233-olinuxino-micro:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@imx233-olinuxino-micro:~# ifconfig wlan0 up
root@imx233-olinuxino-micro:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 90:F6:52:0F:B4:4A
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@imx233-olinuxino-micro:~# iwconfig
-sh: iwconfig: not found
root@imx233-olinuxino-micro:~#

Add some additional tools to the SD card image

On the Yocto mailing list there are some messages how to add WiFi support to the core-image-minimal.

We have to edit the file build/conf/local.conf and add the following lines to add additional programs that should also be build for the final image:

[chris@thinkpad build]$ vim conf/local.conf
[chris@thinkpad build]$ tail -n2 conf/local.conf
CORE_IMAGE_EXTRA_INSTALL += "wpa-supplicant"
CORE_IMAGE_EXTRA_INSTALL += "wireless-tools"
[chris@thinkpad build]$

I haven’t added the package linux-firmware which should contain the firmware for most WiFi devices because it will imply a lot of additional errors:

CORE_IMAGE_EXTRA_INSTALL += "linux-firmware"
CORE_IMAGE_EXTRA_INSTALL += "bash"
CORE_IMAGE_EXTRA_INSTALL += "linux-firmware-rtl-license"
Computing transaction...error: Can't install linux-firmware-1:0.0+git0+c530a75c1e6a472b0eb9558310b518f0dfcd8860-r0@all: no package provides /bin/bash

Computing transaction...error: Can't install linux-firmware-rtl8192ce-1:0.0+git0+c530a75c1e6a472b0eb9558310b518f0dfcd8860-r0@all: no package provides linux-firmware-rtl-license

Error: linux-firmware-rtl-license not found in the base feeds (imx233_olinuxino_micro armv5te armv5e armv5t armv5 armv4t armv4 arm noarch any all).

Now build the image again:

[chris@thinkpad build]$ bitbake core-image-minimal

Connect to a WiFi network

I’m using a TP-LINK TL-WN821N WiFi adapter connected to my iMX233-OLinuXino-Micro. And on my PC I’m using NetworkManager to create a shared wireless ad-hoc network connection (https://help.ubuntu.com/community/Internet/ConnectionSharing).

TP-LINK TL-WN821N

TP-LINK TL-WN821N (ath9k_htc)

INIT: version 2.88 booting
Starting udev
[    3.300000] udevd[66]: starting version 182
Starting Bootlog daemon: bootlogd.
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Sat Jun 29 01:31:00 UTC 2013
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting syslogd/klogd: done
Stopping Bootlog daemon: bootlogd.

Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 imx233-olinuxino-micro ttyAMA0

imx233-olinuxino-micro login: root
root@imx233-olinuxino-micro:~#
[  818.160000] usb 1-1: new high-speed USB device number 3 using ci_hdrc
[  818.310000] usb 1-1: ath9k_htc: Firmware htc_7010.fw requested
[  818.440000] usb 1-1: ath9k_htc: Transferred FW: htc_7010.fw, size: 72992
[  818.500000] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 45 credits
[  818.780000] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
[  818.840000] ieee80211 phy1: Atheros AR9287 Rev:2

root@imx233-olinuxino-micro:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8056 (7.8 KiB)  TX bytes:8056 (7.8 KiB)

root@imx233-olinuxino-micro:~# iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

root@imx233-olinuxino-micro:~# ping google.de
ping: bad address 'google.de'
root@imx233-olinuxino-micro:~# iwconfig wlan0 mode ad-hoc
root@imx233-olinuxino-micro:~# iwconfig wlan0 channel 11
root@imx233-olinuxino-micro:~# iwconfig wlan0 essid tuxnet
root@imx233-olinuxino-micro:~# iwconfig wlan0 key 00000001111111110000000011
root@imx233-olinuxino-micro:~# ifconfig wlan0 up
root@imx233-olinuxino-micro:~#
[  923.230000] wlan0: Trigger new scan to find an IBSS to join
[  926.000000] wlan0: Trigger new scan to find an IBSS to join
[  928.760000] wlan0: Trigger new scan to find an IBSS to join
[  931.000000] wlan0: Creating new IBSS network, BSSID 1e:07:68:e8:75:dc
root@imx233-olinuxino-micro:~# #use network manager to connect to the same network and set the connection type to shared
root@imx233-olinuxino-micro:~# dhcpcd wlan0
-sh: dhcpcd: not found
root@imx233-olinuxino-micro:~# ifconfig wlan0 10.42.0.2
root@imx233-olinuxino-micro:~# route add -net default gw 10.42.0.1
root@imx233-olinuxino-micro:~# echo 'nameserver 208.67.222.222' >> /etc/resolv.conf
root@imx233-olinuxino-micro:~# ping google.de
PING google.de (173.194.35.87): 56 data bytes
64 bytes from 173.194.35.87: seq=0 ttl=55 time=335.406 ms
64 bytes from 173.194.35.87: seq=1 ttl=55 time=334.125 ms
64 bytes from 173.194.35.87: seq=2 ttl=55 time=313.531 ms
64 bytes from 173.194.35.87: seq=3 ttl=55 time=331.562 ms
^C
--- google.de ping statistics ---
5 packets transmitted, 4 packets received, 20% packet loss
round-trip min/avg/max = 313.531/328.656/335.406 ms
root@imx233-olinuxino-micro:~# cat /proc/version
Linux version 3.8.13-fslc+g8a197c1 (chris@thinkpad) (gcc version 4.7.2 (GCC) ) #1 Fri Jun 28 19:53:15 CEST 2013
root@imx233-olinuxino-micro:~#

Finally we have a working network connection, this should be enough for this introduction. The next step is to get familiar with the Yocto build system, read the documentation and create your own bitbake recipes.

Conclusion

The Yocto stuff (Poky build system) is nice if you want to build really small and clean Linux systems/images for a specific task (e.g. hardware that should be sold) but it is really time consuming.

If you want fast results then my tip is to use Arch Linux ARM, Arch’s package manager pacman to install extra programs and follow Building a kernel 3.x for the iMX233-OLinuXino to build a new kernel and later port your software to Yocto.

You will find my sdcard images under https://sourceforge.net/projects/janncc/files/fsl-community-bsp/2013-06/ if you want to test something without building your own image.