wiki:Building_SHR_without_chroot

Install required dependencies

To run bitbake (make image) some programs are needed to be installed on the buildhost:

libtool, python-2.6 or python-2.7, python-curses, git, svn, cvs, make, gcc, g++, patch, help2man, diffstat, texi2html, bzip2, gawk, tar, md5sum, texinfo, chrpath

Install required packages on ubuntu oneiric (may as well work on debian)

# apt-get install build-essential coreutils libtool python2.6 git git-core subversion cvs make gcc g++ patch help2man diffstat texi2html bzip2 gawk tar texinfo chrpath

bash must be your default shell. On Ubuntu dash is used by default and can be changed to bash using

# dpkg-reconfigure dash
chose no.

For a full shr-image you will at least need 50 Gb of disk space, something around 1.5 Gb will be downloaded.

Building SHR using Makefile

How to setup a local SHR repository and build images automatically using SHR Makefile which can be used to setup the SHR build environment.

Getting Makefile

Download the FSO/SHR Makefile from  http://build.shr-project.org/ :

$ wget http://build.shr-project.org/Makefile

You can build SHR images on almost any GNU/Linux distribution you already have installed or you can use provided minimal chroot environment to minimize influence of your host system and this chroot is what most SHR users use, so it's well tested.

Setup

If you want to build SHR without setting up a chroot environment but use the programs installed on your native build host use these commands:

make setup-shr-core

Updating OE core

In order to update the files and metadata from OpenEmbedded you should enter the chroot and run the following:

$ make update

Using different branches

There are 4 branches

  • danny, was used in shr-2012.07 release
  • dylan, preparation for next release shr-2013.07, is now default.
  • shr, using latest layers, preparation for some next shr release in future (feeds set to shr-next)
  • master, the same as default branch (currently danny).

To change it, edit BRANCH_COMMON in Makefile and run "make update"

Building SHR manually from scratch

The following commands will start a build of shr-core, without a chroot environment and not using the Makefile. For the "conventional and easier" Makefile approach see below section. All setup steps described here are also done by the Makefile so beginners should use the Makefile approach.

EDITOR=emacs

git clone http://git.shr-project.org/repo/shr-makefile.git common

git clone git://github.com/shr-distribution/oe-core openembedded-core
cd openembedded-core
git checkout -b shr origin/shr
cd ..

git clone git://github.com/shr-distribution/meta-oe meta-openembedded
cd meta-openembedded
git checkout -b shr origin/shr
cd ..

git clone -n git://github.com/shr-distribution/meta-smartphone.git
cd meta-smartphone
git checkout -b shr origin/shr
cd ..

git clone -n git://github.com/shr-distribution/meta-browser.git
cd meta-browser
git checkout -b shr origin/shr
cd ..

git clone git://github.com/shr-distribution/bitbake

mkdir downloads
mkdir shr-core
cd shr-core


ln -s ../openembedded-core .
ln -s ../meta-openembedded .
ln -s ../meta-smartphone .
ln -s ../meta-browser .
ln -s ../bitbake .
ln -s ../downloads .
ln -s ../common/setup-env .
ln -s ../common/setup-local .


echo 'export BBFETCH2=True' >> setup-local
cp -ra ../common/conf conf
echo "TOPDIR='`pwd`'" > conf/topdir.conf
$EDITOR conf/local.conf
# Set machine appropriately
$EDITOR setup-local

. setup-env
bitbake -k shr-image

It is not necessary to build or install bitbake from the cloned tree; the environment setup scripts adjust the PATH to refer to the cloned tree, which contains executables as-is (ie, python scripts). The latest git bitbake is required for building shr-core.

After building, images should be deposited in tmp-eglibc/deploy/images/.