Buiding Sakoman’s GNOME R13 firmware for Overo with OpenEmbedded, Poky and Bitbake
Unlike the default builds provided by Gumstix for their Overo board, I personally prefer the build provided on Mr. Sakoman’s web site and we will build using his latest R13 version (as of this writing). This build system is optimized to make sure that the Gumstix Caspapx camera would work without further tweaking as is currently required when using the 2.6.39 (factory-default image) on the Overo boards.
Important Tips
Getting Started
How this Guide (and BitBake/OE) works
-
Configure the Ubuntu host system
-
Download OpenEmbedded
-
Download Bitbake
-
Create configuration files
-
Load the profile file
-
Run BitBake to create an OE image
-
Copy bootloader (MLO and u-boot), kernel image (uImage) and root file system on SD/SDHC card
Disk Space
-
Minimum requirement: 12 GB (e.g. omap3-console-image for Gumstix Overo and BeagleBoard)
-
Standard requirement: 30 GB (e.g. omap3-desktop-image)
-
Maximum requirement: 35 GB (for full OE build,
bitbake world)
So the minimum free disk space is about 15 GB (no desktop images), standard would be 35 GB and a safe size is 60 GB ( I just learnt this the hard way by running out of disk space on Ubuntu running under in a Parallels VM and was unable to expand the disk as it corrupted the previous VM!!!, Better go 64GB for your VM to be safe than sorry as i became losing about a month’s work!).
Configure the Host System
Open Terminal
Use Bash, not Dash as default sh shell
sudo dpkg-reconfigure dash
Answer no when asked whether you want to install dash as /bin/sh.
Change Sysctl Settings on Ubuntu 10.04+
- sudo sh -c “echo -e \”vm.vdso_enabled = 0\nvm.mmap_min_addr = 0\” > /etc/sysctl.d/60-oe-settings.conf”
- sudo invoke-rc.d procps start
- sudo sysctl -p
Update Package List and Upgrade System
- sudo apt-get update
- sudo apt-get upgrade
A reboot might be necessary after this.
Install necessary Software
- sudo apt-get install subversion cvs git-core
- sudo apt-get install build-essential help2man
- sudo apt-get install diffstat texi2html texinfo
- sudo apt-get install libncurses5-dev gawk python-dev
- sudo apt-get install python-psyco python-pysqlite2
- sudo apt-get install gnome-doc-utils gettext automake flex
Install OpenEmbedded From Sakoman‘s Git repository
-
bitbake (the bitbake executable)
-
build (the configuration files)
-
openembedded (the OE recipe collection)
-
sources (created on first build, downloaded sources)
-
tmp (created on first build)
-
user.collection (your personal recipes)
Set the OpenEmbedded directory
$HOME/oeto whatever you like better, but the path must not contain symbolic links (or bitbake will fail later with an “GNUmakefile: Too many levels of symbolic links” error).
echo export OVEROTOP=$HOME/oe >> $HOME/.bashrc source $HOME/.bashrc
Checkout the OpenEmbedded files. This is the OE development branch.
mkdir -p $OVEROTOP cd $OVEROTOP git clone git://www.sakoman.com/git/openembedded.git cd org.openembedded.dev git branch -a (to see a listing of all the branches that you have downloaded) git checkout --track -b master origin/master
Install BitBake
bitbake. The BitBake project is now maintained in a git repository stored on git.openembedded.org. The svn is deprecated, and any commits will not flow into releases.
cd $OVEROTOP git clone git://git.openembedded.org/bitbake.git cd bitbake git branch -a (displays a listing of all local and remote branches) git checkout -b 1.12 --track origin/1.12 (1.14 is unable to compile openembedded!)
BITBAKE IS BY DEFAULT NOT IN THE PATH! And thus won’t be found when you try to execute it. You have to load the profile file before you build an image. Just continue with this guide step-by-step to learn how to build your first image.
Create Configuration Files
.bashrc.Setup Environment Script File
cd ~/oe
mkdir -p ~/oe/build
cat > ~/oe/setupenv.sh <<_EOF
#!/bin/bash
# Environment setup environment for oe
#
export OVEROTOP="${HOME}/oe"
export OEBRANCH="${OVEROTOP}/org.openembedded.dev"
export USERBRANCH="${OVEROTOP}/user.collection"
export PATH="${OVEROTOP}/bitbake/bin:$PATH"
export BBPATH="${OVEROTOP}/build:${USERBRANCH}:${OEBRANCH}"
export BB_ENV_EXTRAWHITE="OVEROTOP OEBRANCH USERBRANCH"
clear
#
# end oe environment setup
#
Execute the setupenv script to setup the environment and paths
mkdir -p ~/oe/build/conf
cat > ~/oe/build/conf/local.conf <<_EOF
DISTRO = "angstrom-2010.x"
MACHINE = "omap3-multi"
# Comment out ONE of the the distro type lines
#DISTRO_TYPE = "debug"
DISTRO_TYPE = "release"
BBFILES="\${OEBRANCH}/recipes/*/*.bb \${USERBRANCH}/recipes/*/*.bb"
ENABLE_BINARY_LOCALE_GENERATION = "0"
# specifies where BitBake should create its temporary files
TMPDIR = "\${OVEROTOP}/tmp"
# specifies that BitBake should emit the log if a build fails
BBINCLUDELOGS = "yes"
BBFILE_COLLECTIONS="oe user"
BBFILE_PATTERN_oe="^\${OEBRANCH}/recipes"
BBFILE_PATTERN_user="^\${USERBRANCH}/recipes"
BBFILE_PRIORITY_oe="5"
BBFILE_PRIORITY_user="15"
# Enable these lines if you have a dual-core machine
# BB_NUMBER_THREADS = "2" # ERROR-PRONE: Downloads one package while compiling the last one
# PARALLEL_MAKE = "-j2" # HEAVILY RECOMMENDED: Runs GCC in parallel, useful on Core 2 Duo/Quad
# Solves problems with checksums occuring sometimes
PREFERRED_PROVIDER_virtual/kernel = "linux-sakoman-pm"
OE_ALLOW_INSECURE_DOWNLOADS = "1"
# Overrides the standard kernel version
PREFERRED_VERSION_linux-omap3 = "3.0"
_EOF
Create Custom Image Recipes
mkdir -p $OE_HOME/user.collection/recipes/images
Create a testing-console-image recipe, which just contains the standard omap3-console-image.
cat > $OE_HOME/user.collection/recipes/images/test-opencv.bb <<_EOF # Personal testing console image require virtual/kernel # If you need additional packages by default, you can add them to the installation image here. # This example installs everything to make OpenCV work on Caspapx camera module on Overo AirStorm # (run "opencv-cvcap 0" to test, but to do so you have to change the line above # to "require recipes/images/omap3-desktop-image.bb") # # It also contains GCC and binutils, so you can compile code on the board itself IMAGE_INSTALL += " \ grep \ dropbear \ git \ " export IMAGE_BASENAME = "linux-sakoman-pm" _EOF
Building OpenEmbedded
-
source ./setupenv.sh
-
bitbake linux-sakoman-pm
-
Flash it onto the SDHC card
-
Boot your Overo card from the SDHC card and a Tobi add-on and check your monitor that is connected to your Tobi. By default the sakomon build doesn’t install VNCSERVER so you would have to manually start the VNCSERVER session if you would like to see GNOME from your remote session.
