giovedì 7 maggio 2009

Openembedded and a sutable distro

Here all the steps to build a valid root filesystem where I can deal with all my work since here!

I choose Openembedded as build system to build the linux distribution, first for curiosity (in so many place it is mentioned an so many people tell me about), last for no other known choices! (Sorry at anyone that fight to open the way for your own embedded distribuition build system)

Openembedded main page is here and following the Getting Started guide i had been able to create a valid Openembedded enviroment in my workstation:
Base dir
$ mkdir -p /media/dati/oe/stuff/build/conf
$ cd /media/dati/oe/stuff/

For BitBake
$ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake

For Openembedded
$ git clone git://git.openembedded.net/openembedded
Next I created the BitBake configuration file locale.conf:
$ cd /media/dati/oe/stuff/
$ cp openembedded/conf/local.conf.sample build/conf/local.conf

Editing it for me it result: (without comments..):

TOPDIR = "/media/dati/oe"
DL_DIR = "${TOPDIR}/sources"

BBFILES = "${TOPDIR}/stuff/openembedded/recipes/*/*.bb"

BBMASK = ""

PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-x11"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-intermediate:gcc-cross-intermediate"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

MACHINE = "armadillo500"

TARGET_OS = "linux"

DISTRO = "angstrom-2008.1"

GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 it_DE.UTF-8"

IMAGE_FSTYPES = "ext2"

CACHE = "${TOPDIR}/cache"

BBINCLUDELOGS = "yes"
And next the patch to openembedded: 0001-Initial-Armadillo-500-support-for-OpenEmbedded.patch

Applying this the command:
$ cd /media/dati/oe/stuff/
$ bitbake helloworld-image
Produce at /media/dati/oe/tmp/deploy/glibc/images/armadillo500 the file Angstrom-helloworld-image-glibc-ipk-2009.X-test-20090506-armadillo500.rootfs.ext2
that mounted as loopback filesystem on /nfsarmadilloroot:
$ sudo mount Angstrom-helloworld-image-glibc-ipk-2009.X-test-20090506-armadillo500.rootfs.ext2 /nfsarmadilloroot -t ext2 -o loop
Work great as rootfilesystem!

That's all folks :)

Next is a console-image..
Openembedded take so much time building! Sure.. it build also so much software not needed.. nevermind I'm not here to penetrate in that build process. :P

Nessun commento:

Posta un commento