Mailing List Archive

using catalyst for embedded system building automation
hey everyone,
I know i've been lurking as of late, but i'm going to try and get some
more time to put into gentoo soon. For now I thought i'd actually
submit some documentation pieces I've been saying I'd submit for a
long time ;-)

About 6 months ago I submitted some patches to catalyst that lets you
perform basic tasks to get a minimal gentoo image. I didn't submit
any documentation, but I did submit a simple spec file.

I'm not sure if this is enough for people or not, but I'll explain
things further here.

Make sure you have read all the catalyst information thoroughly before
you read this.

Using Catalyst for Embedded System Building

Catalyst spec files for livecd's and stages are almost identical to
the embedded spec files.

The immediate difference is that there is no dependancy checking for
embedded spec files. The decision was made to not calculate
dependancies because the 'embedded' ebuilds don't have a real
dependancy tree. This may change in the future as we hopefully move
to cascading profiles, so currently do all the dependancy checking
yourself. Secondly, when packages are emerged inside the build
enviornment they are emerged into a subdirectory of that enviornment
using the ROOT enviornment variable. This has problems of it's own
which I will not discuss here.

A simple embedded spec file might look something like this:

subarch: x86
version_stamp: embedded
target: embedded
rel_type: embedded
rel_version: 1.4
snapshot: embedded
source_subpath: default-x86-1.4/stage1-x86-1.4

embedded/runscript: scripts/initrd.sh
embedded/use:
static
links
-devfs
initrd
embedded/rm:
/usr/share/doc
/usr/share/man
/var/db/pkg
/var/edb
embedded/packages:
sys-apps/baselayout-lite
=sys-apps/busybox-0.60.5-r2

The top portion of the file looks similar to a standard catalyst
file, that specifies the starting stage and what kind of profile you
are building. The other lines represent:

embedded/runscript: This specifies a script to be run after the bulid
process is complete. Included with catalyst, is this script
initrd.sh which puts the system into an ext2 filesystem and gzip's
it.

embedded/use: Specifies all the use variables for this build.

embedded/rm: Tells catalyst which directories to remove after
building is complete. Great for getting rid of include headers and
man pages.

embedded/packages: Specifies which packages and package versions to
install on the image

---------

Well that's most of what I had lying around in terms of
documentation. It is definatly far from complete, but suggestions and
comments are welcome. Eventually this should make it to guide xml!