The whole section is revised for explaining the installation process of Open Embedded Linux on bc10, including
X-Loader and U-Boot. The previous version was discussed only the configuration of OpenEmbedded, a Linux
framework for embedded systems. However, in new version, the installation process of the Angstrom Distribution
is described. (The Angstrom Distribution is treated as one of Linux distributions for embedded system since it
requires sufficient amount of knowledges of OpenEmbedded as well as embedded Linux and call it “OpenEmbedded Linux.")

(Caution)From November 2010, the built system, which is argued here, has been greatly modified. On stable/2009 branch,
the build process is unlikely completed. On Master branch, the build process can be finished, the directories of userland
and version of software can be different from the ones described here

For the details, please visit Building Angstrom.

How to create the Build Environment of OpenEmbedded for bc10

To follow the explanation listed at Building Angstrom on the Angstrom Distribution, configure the build environment
in Ubuntu 10.04.

Ubuntu 10.04 development environment

  • Configuration and addition of packages

As the default, dash is the shell script for Ubuntu. However, this causes unexpected errors when BitBake is executed since
bash is used in some parts of BitBake. To use the command shown below, change the shell script of Ubuntu form dash to bash.

$ sudo dpkg-reconfigure dash

As execute the command, it will ask whether dash is installed into /bin/sh or not. and, select No as the answer. Then, bash
is chosen for shell script.

To follow the direction published at the Debian section of OEandYourDistro, install deb packages. The packages are mandatory
and necessary for build.

$ sudo apt-get install ssh
$ sudo apt-get install sed wget cvs subversion git-core \
 coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \
 gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ \
 desktop-file-utils chrpath
$ sudo apt-get install libxml2-utils xmlto python-psyco docbook
  • gzip

As BitBake base-image is executed in Ubuntu 10.04, DATA-CAC Error occurs at expat-2.0.1.tar.gz. This error is due to
gzip 1.3.12. This gzip 1.3.12 is obsolete and needed to be updated. gzip 1.3.12 is replaced with gzip1.4.

Check up the version of gzip

$ gzip --version
gzip 1.3.12 

As it is shown above, the version of gzip is 1.3.12, so it is going to be updated to 1.4. Obtain gzip1.4 from gnu.org,
and build and install it.

$ wget ftp://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz
$ tar xvfz gzip-1.4.tar.gz
$ cd gzip-1.4
$ ./configure
$ make
$ sudo make install

After complete the installation, re-examine the version of gzip.

$ gzip --version
gzip 1.4

Build BitBake environment

This explains how to set up the BitBake environment. This mostly follows the instructions published at Building Angstrom,
yet the instructions are slightly altered for bc10.

  • What is BitBake

BitBake acts like make command as a tool, and it specifically manages kernel and packages for embedded Linux distributions.
Its package management system is called recipe. A recipe informs BitBake all steps of the installation of packages, and a recipe
maintains a meta data for the information, which is needed to install the packages. For the details, please look at "BitBake User Manual".

  • angstrom-setup-scripts

For building Angstrom (OpenEmbedded Linux), angstrom-setup -script is used for saving configuration scripts and the files,
which are created after executing scripts, and building.

Obtain angstrom-setup-script by git.

$ cd ~
$ git clone git://gitorious.org/angstrom/angstrom-setup-scripts.git
$ cd angstrom-setup-scripts

To run oebb.sh enter the name of the targeted machine. It will beagleboard to be exact.

$ ./oebb.sh config beagleboard

After executing, receive the message shown below.

There now is a sourceable script in ~/.oe/enviroment. You can do '.  
~/.oe/environment' and run 'bitbake something' without using ./oebb.sh 
as wrapper

Setup for beagleboard completed

Execute oebb.sh update, and download OE and BitBake files.

$ ./oebb.sh update

At the end of the execution, the error massage appears, but this is not affect the update process and build process.

fatal: git checkout: branch org.openembedded.dev already exists

(Caution) The build system of "stable/2009 branch" is greatly changed since November 2009, the build process is not likely completed on
stable/2009 branch. As applying Master branch, the build process is finished, but the directories of userland and version of software
are different from ones that originally argued here.


To build the environment easily , the brach of OpenEmbedded is shifted from org.openembedded.dev to stable/2009.
Make sure that stable/2009 exists in angstrom-setup-scripts-/sources/openembedded/.

$ cd ~/angstrom-setup-scripts/sources/openembedded/
$ git branch -a


$ git checkout origin/stable/2009 -b stable/2009
$ git pull

Execute git pull, and receive a message, which informs that update is not necessary.

Already up-to-date.

  • local.conf

In local.conf, angstrom-2008.1 and beagleboard are listed at the sections of DISTRO and MACHINE, respectively.

$ cd ~/angstrom-setup-scripts/build/conf
$ vi local.conf

DISTRO   = "angstrom-2008.1"
MACHINE ?= "beagleboard" 

# Set TMPDIR instead of defaulting it to /tmp
TMPDIR = "/home/beat/angstrom-setup-scripts/build/tmp-angstrom_2008_1"

# Don't generate the mirror tarball for SCM repos, the snaps
hot is enough
  • Setup the environment variable for BitBake

Read the file for the environment variable, ~/.oe/environment/, and complete the configuration of every PATH for

$ .  ~/.oe/environment
  • mmap_min_addr

While BitBake is executed, a build error occurs at build of qemu-arm. Preventing this error, the value of vm/mmap_min_addr
is set to 0. Although wiki notes that value of 128 is acceptable, the error will be persist, and the error message shown below
appears as BitBake is executed.

$  MACHINE=beagleboard bitbake base-image
FATAL:  Openembedded's config sanity checker detected a potential 
      Either fix the cause of this error or at your own risk disable the 
checker (see sanity.conf).
      Following is the list of potential problems / advisories:
       /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).

To fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.

There are two ways to configure the value of mmap_min_addr is equal to 0. [SOLVED - update 2010] of wiki shows two different
methods ( a), b) ) to change the value of mmap_min_addr to 0. (In wiki, the value is set to be 128, but the error message will
appear as BitBake is executed.)

$ sudo -s
# echo 0 > /proc/sys/vm/mmap_min_addr
# cat /proc/sys/vm/mmap_min_addr
# sysctl -w vm.mmap_min_addr=0 

Create Angstrom image (1)

Execute BitBake

  • about bitbake base-image and bitbake console-image

base-image handles the same tasks as its predecessor, nano, and it installs kernel, busybox, and ipkg. Console-image is add
extra features to its previous version, task-base. The newly added features are packages for several peripherals, Bluetooth,
and WiFi.

  • bitbake base-image

The configuration of mmap_min_addr is completed, execute bitbake base-image.

$ MACHINE=beagleboard bitbake base-image
NOTE: Running task 2909 of 2910 (ID: 18, /home/beat/angstrom-setup-scripts/sources/openembedded/recipes/images/base-image.bb, do_rm_work) 
NOTE: package base-image-1.0-r0: task do_rm_work: Started
NOTE: package base-image-1.0-r0: task do_rm_work: Succeeded
NOTE: Running task 2910 of 2910 (ID: 0, /home/beat/angstrom-setup-scripts
/sources/openembedded/recipes/images/base-image.bb, do_rm_work_all)
NOTE: package base-image-1.0-r0: task do_rm_work_all: Started
NOTE: package base-image-1.0-r0: task do_rm_work_all: Succeeded
NOTE: Tasks Summary: Attempted 2910 tasks of which 2822 didn't need to be rerun and 0 failed.

As messages displayed above appear, bitbake base-image is completed.

  • Caution: In the middle of executing BitBake, the message described below occasionally shows up.
    NOTE: Running task 2823 of 2910 (ID: 128, /home/beat/angstrom-setup-scripts
    /sources/openembedded/recipes/mtd/mtd-utils-native_1.0.0+git.bb, do_setscene)
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
    ERROR: TaskFailed event exception, aborting
    ERROR: Build of /home/beat/angstrom-setup-scripts/sources/openembedded/recipes
    /u-boot/u-boot_git.bb do_fetch failed
    ERROR: Task 147 (/home/beat/angstrom-setup-scripts/sources/openembedded/recipes
    /u-boot/u-boot_git.bb, do_fetch) failed with 256
    NOTE: Task failed: Unknown fetch Error: [Errno 2] No such file or directory: 
    NOTE: package u-boot2009.05+r30+gitrd363f9cb0918a1b6b92e2e20d01543d0c4f53274-r30:
    task do_fetch: Failed
    ERROR: TaskFailed event exception, aborting
    NOTE: package mtd-utils-native-1.0.0+git-r8: task do_compile: Succeeded
    ERROR: Build of /home/beat/angstrom-setup-scripts/sources/openembedded/recipes
    /u-boot/u-boot_git.bb do_fetch failed
    ERROR: Task 147 (/home/beat/angstrom-setup-scripts/sources/openembedded/recipes
    /u-boot/u-boot_git.bb, do_fetch) failed with 256
    BitBake fails to obtain files as during the creating process. The failure is treated as an error, and the process is ended.
    To execute bitbake base-image again, it will start from obtaining the files.
  • bitbake console-image

After the build of bitbake base-image is completed, run bitbake console-image.

$ MACHINE=beagleboard bitbake cosole-image
NOTE: package console-image-1.0-r0: task do_rm_work: Started
NOTE: package console-image-1.0-r0: task do_rm_work: Succeeded
NOTE: Running task 2892 of 2892 (ID: 0, /home/beat/angstrom-setup-scripts
/sources/openembedded/recipes/images/console-image.bb, do_rm_work_all)
NOTE: package console-image-1.0-r0: task do_rm_work_all: Started
NOTE: package console-image-1.0-r0: task do_rm_work_all: Succeeded
NOTE: Tasks Summary: Attempted 2892 tasks of which 2854 didn't need to be rerun and 0 failed.

As these outputs, shown above appear, the build process of bitbake console-image is completed.

  • Image Files

Created image files are stared under the directory, angstrom-setup-scripts/build/tmp-angstrom_2008_1/deploy/glibc/images/beagleboard .

/images/beagleboard$ ls

Configure environment variable

The toolchain, which has been employed creating BitBake, is used for building X-Loader, U-Boot, and bc10-rowboat-kernel.
The toolchain which has been used for building angstrom stable/2009 is placed the locations shown below.

beat@bc10-oedev:~/angstrom-setup-scripts/build/tmp-angstrom_2008_1/cross/armv7a/bin$ ls
arm-angstrom-linux-gnueabi-addr2line   arm-angstrom-linux-gnueabi-gccbug                  arm-angstrom-linux-gnueabi-modprobe
arm-angstrom-linux-gnueabi-ar          arm-angstrom-linux-gnueabi-gcov                    arm-angstrom-linux-gnueabi-nm
arm-angstrom-linux-gnueabi-as          arm-angstrom-linux-gnueabi-generate-modprobe.conf  arm-angstrom-linux-gnueabi-objcopy
arm-angstrom-linux-gnueabi-c++         arm-angstrom-linux-gnueabi-gfortran                arm-angstrom-linux-gnueabi-objdump
arm-angstrom-linux-gnueabi-c++filt     arm-angstrom-linux-gnueabi-gprof                   arm-angstrom-linux-gnueabi-ranlib
arm-angstrom-linux-gnueabi-cpp         arm-angstrom-linux-gnueabi-insmod                  arm-angstrom-linux-gnueabi-readelf
arm-angstrom-linux-gnueabi-depmod-2.6  arm-angstrom-linux-gnueabi-insmod.static           arm-angstrom-linux-gnueabi-rmmod
arm-angstrom-linux-gnueabi-g++         arm-angstrom-linux-gnueabi-ld                      arm-angstrom-linux-gnueabi-size
arm-angstrom-linux-gnueabi-gcc         arm-angstrom-linux-gnueabi-lsmod                   arm-angstrom-linux-gnueabi-strings
arm-angstrom-linux-gnueabi-gcc-4.3.1   arm-angstrom-linux-gnueabi-modinfo                 arm-angstrom-linux-gnueabi-strip

Configure the environment variable as it is described below.

$ export PATH=${HOME}/angstrom-setup-scripts/build/tmp-angstrom_2008_1/cross/armv7a/bin:${PATH}
$ export ARCH=arm
$ export CROSS_COMPILE=arm-angstrom-linux-gnueabi-

Build X-Loader

Obatin X-Loader, which is specific to bc10, and execute the build.

$ cd ~/
$ git clone git://gitorious.org/~bc-dev/x-load-omap3/x-load-bc10.git x-load-bc10
$ cd x-load-bc10
$ git checkout -t -b bc10 origin/bc10
$ make omap3530bc10_config
$ make

After its build is completed, x-load.bin is created.

  • Adjust the binary image

The format of x-load.bin does not fit into the configurations of OMAP BootROM. As x-load.bin is read into NAND Flash or SD
card without any modification, it does not work as a bootloader. Fixing this issue, x-load.bin is needed to be altered by
signGP. The executable file of signGP is downloaded form here.

signGP can be applied as it is defined below.

$ ./signGP x-load.bin

x-load.bin.ift is created after applying signGP.
Due to the specification of BootROM, x-load.bin.ift is saved as MLO when it is copied and saved in the root directory of
the SD card.

Place created image files in SD card (1)

Some created files, which are required for booting bc10, are copied to a SD card. Read“Create bootable SD Card” section of bc10/booting,
create FAT32 and Linux partitions in the SD card.
(Hereafter FAT32 partition and Linux partition are named and called LAVBEL1 and LABEL2, respectively.)

As the intended OS, which is booted from U-Boot, is a Linux, this is how files should be placed and organized inside the SD card.

  • FAT32 partition
    • X-Loader
    • U-Boot
    • Linux kernel
    • boot.scr
  • Linux partition
    • Linux root file system

FAT32 partition

  • X-Loader

As X-Loader, the first bootloader, is placed on SD card, there are several restrictions on the method of placing it. Please follow the
instructions written below.

  1. After formatting FAT32 partition, x-loader is the first to be placed.
  2. It will be put on the top directory of FAT32 partition.
  3. Change the name from x-loader to MLO.
$ cd  ~/bc10/x-load-bc10
$ cp x-load.bin.ift /media/LABEL1/MLO

This X-Loader is specifically designed for bc10, and it will not be modified in the farther sections.

  • u-boot.bin

Below the directory, angstrom-setup-scripts/build/temp-angstrom_2008_1/deploy/glibc/images/beagleboard, u-boot-beagleboard.bin
is created. u-boot-beagleboard.bin is changed as u-boot.bin''', and it is copied to FAT32 partition.

$ cd ~/angstrom-setup-scripts/build/tmp-angstrom_2008_1/deploy/glibc/images/beagleboard
$ cp u-boot-beagleboard.bin /media/LABEL1/u-boot.bin
  • Linux Kernel

Under the same directory, in which u-boot-beagleboard.bin is found, there is uImage-beagleboard.bin , and its name is
changed to uImage and copied to FAT32 partition.

$ cp uImage-beagleboard.bin /media/LABEL1/uImage
  • boot.scr

Create boot.scr, in the same way as it has been created in bc10/rowboat-eclair-dsp. This file creates the same contents as setenv
configures in the serial console of the u-boot's command prompt. This setting significantly reduces the time since it does not
require the configuration as each time X-Loader is booted. This is also configured for not changing memory mapping. To follow
the instructions, create boot.script.

$ cd ~
$ vi boot.script
if fatload mmc 0 84000000 uImage
 echo ***** Kernel: /dev/mmcblk0p1/uImage.bin *****
echo ***** RootFS: /dev/mmcblk0p2 *****
setenv bootargs 'mem=88M@0x80000000 mem=128M@0x88000000  androidboot.console=ttyS2 console=tty0 console=ttyS2,115200n8 root=/dev/mmcblk0p2 init=/init rootwait omapfb.video_mode=680x480MR-24@60'
bootm 84000000

This file is treated as a parameter, execute mkimage as it is shown below.

$ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n ./boot.script -d ./boot.script ./boot.scr &> /dev/null

The created boot.scr and is copied into FAT32 of the SD card.

$ sudo cp boot.scr /media/LABEL1/

Linux partition

These three files are copied into Linux partition.

  • Angstrom-base-image-glibc-ipk-20009.X-stable-beagleboard.rootfs.tar.bz2
  • Angstrom-console-image-glibc-ipk-2009.X-stable-beagleboard.rootfs.tar.bz2
  • modules-2.6.29-r46-beagleboard.tgz
$ cd ~/angstrom-setup-scripts/build/tmp-angstrom_2008_1/deploy/glibc/images/beagleboard
$ sudo tar xvfj Angstrom-base-image-glibc-ipk-2009.X-stable-beagleboard.rootfs.tar.bz2 -C /media/LABEL2/
$ sudo tar xvfj Angstrom-console-image-glibc-ipk-2009.X-stable-beagleboard.rootfs.tar.bz2 -C /media/LABEL2/
$ sudo tar xvfz modules-2.6.29-r46-beagleboard.tgz -C /media/LABEL2/

This is the end of placing userland of Linux. This ends the first part of installing the image files to the SD card. Then, make sure that
Angstrom starts booting after the SD card is placed and power is turned on.

This is the boot log of this section. Please use it for reference.

Create Angstrom image (2)

As the previous section has been successfully completed, build u-boot customized for bc10 and bc10-rowboat-kernel. As kernel is
replaced, u-boot is also changed.

u-boot build

Download the source of bc10 specific u-boot, and build it.

$ cd ~/
$ git clone git://gitorious.org/bc10/u-boot-bc10.git u-boot-bc10
$ cd u-boot-bc10
$ git checkout -t -b build origin/build
$ make mrproper
$ make omap3_bc10_config
$ make

After the build is completed, u-boot.bin is created.

bc10-rowboat-kernel build

$ git clone git://gitorious.org/~bc-dev/rowboat/bc10-rowboat-kernel.git bc10-rowboat-kernel
$ cd bc10-rowboat-kernel
$ git checkout -t -b bc10-2.6.32-build origin/bc10-2.6.32-build
$ make omap3_bc10_defconfig
$ make uImage
$ make modules

After ending the build process, uImage is created.

$ ls ~/bc10-rowboat-kernel/arch/arm/boot/
Image  Makefile  bootp  compressed  install.sh  uImage  zImage

modules build

$ cd ~/bc10-rowboat-kernel/
$ mkdir mod_work
$ make ARCH=arm DEPMOD=echo INSTALL_MOD_PATH=mod_work modules_install

At the end of execution, DEPMOD is displayed. (Caution)

DEPMOD  2.6.32-bc10-gdfb6acc
$ arm-angstrom-linux-gnueabi-depmod-2.6 -A -b /home/beat/bc10-rowboat-kernel/mod_work -F ./System.map 2.6.32-bc10-gdfb6acc
$ tar cvfz modules-2.6.32-bc10-gdb6acc.gz -C mod_work lib
$ ln -s modules-2.6.32-bc10-gdb6acc.gz modules-2.6.32-bc10-gdb6acc.tgz

(Caution): Askernel config enables "Automatically append version information to the version string", the
last six digits of version information may be automatically changed. For instance, in 2.6.32-bc10-gxxxxxx,
the value of xxxxxx may be frequently changed.

$ git rev-parse  -- verify HEAD

Or, use a command to check the version.

$ make kernel release

Place created image files in SD card (2)

The SD card is re-mounted on the build machine.
(Assume that the location of mount is the same as the previous time.)

FAT32 partition

  • u-boot.bin

Erase the previous u-boot.bin.

$ rm /media/LABEL1/u-boot.bin 
$ cd ~/u-boot-bc10/
$ cp u-boot.bin /media/LABEL1/u-boot.bin
  • Linux kernel

Also remove the old Linux kernel.

$ rm /media/LABEL1/uImage
$ cd ~/bc10-rowboat-kernel/arch/arm/boot/
$ cp uImage /media/LABEL1/uImage

Linux partition

module is copied to Linux partition, freshly.

$ cd ~/bc10-rowboat-kernel/
$ sudo tar xvfz modules-2.6.32-bc10-gdb6acc.tgz -C /media/LABEL2/

This is the end of installation.

This is the boot log. Please use it for comparison.


Revision History

2010/07/23 The article is initially listed. It discuss up to how to create OpenEmbedded build environment.
2010/10/07 The article is rewritten. The new article explains the whole process of installation of OpenEmbedded Linux.
2010/10/13 Add information of how to find the value of version.
2010/12/01 Fix a typo. At the fourth set of code from the top, change from dockbook to docbook, removing k.
2011/03/03 Add the information of change in the build system.

Attach file: fileoe4thboot.txt 1438 download [Information] fileoe1stboot.txt 1611 download [Information]

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2011-03-03 (Thu) 10:31:16 (3558d)