1 |
hey everyone, |
2 |
I know i've been lurking as of late, but i'm going to try and get some |
3 |
more time to put into gentoo soon. For now I thought i'd actually |
4 |
submit some documentation pieces I've been saying I'd submit for a |
5 |
long time ;-) |
6 |
|
7 |
About 6 months ago I submitted some patches to catalyst that lets you |
8 |
perform basic tasks to get a minimal gentoo image. I didn't submit |
9 |
any documentation, but I did submit a simple spec file. |
10 |
|
11 |
I'm not sure if this is enough for people or not, but I'll explain |
12 |
things further here. |
13 |
|
14 |
Make sure you have read all the catalyst information thoroughly before |
15 |
you read this. |
16 |
|
17 |
Using Catalyst for Embedded System Building |
18 |
|
19 |
Catalyst spec files for livecd's and stages are almost identical to |
20 |
the embedded spec files. |
21 |
|
22 |
The immediate difference is that there is no dependancy checking for |
23 |
embedded spec files. The decision was made to not calculate |
24 |
dependancies because the 'embedded' ebuilds don't have a real |
25 |
dependancy tree. This may change in the future as we hopefully move |
26 |
to cascading profiles, so currently do all the dependancy checking |
27 |
yourself. Secondly, when packages are emerged inside the build |
28 |
enviornment they are emerged into a subdirectory of that enviornment |
29 |
using the ROOT enviornment variable. This has problems of it's own |
30 |
which I will not discuss here. |
31 |
|
32 |
A simple embedded spec file might look something like this: |
33 |
|
34 |
subarch: x86 |
35 |
version_stamp: embedded |
36 |
target: embedded |
37 |
rel_type: embedded |
38 |
rel_version: 1.4 |
39 |
snapshot: embedded |
40 |
source_subpath: default-x86-1.4/stage1-x86-1.4 |
41 |
|
42 |
embedded/runscript: scripts/initrd.sh |
43 |
embedded/use: |
44 |
static |
45 |
links |
46 |
-devfs |
47 |
initrd |
48 |
embedded/rm: |
49 |
/usr/share/doc |
50 |
/usr/share/man |
51 |
/var/db/pkg |
52 |
/var/edb |
53 |
embedded/packages: |
54 |
sys-apps/baselayout-lite |
55 |
=sys-apps/busybox-0.60.5-r2 |
56 |
|
57 |
The top portion of the file looks similar to a standard catalyst |
58 |
file, that specifies the starting stage and what kind of profile you |
59 |
are building. The other lines represent: |
60 |
|
61 |
embedded/runscript: This specifies a script to be run after the bulid |
62 |
process is complete. Included with catalyst, is this script |
63 |
initrd.sh which puts the system into an ext2 filesystem and gzip's |
64 |
it. |
65 |
|
66 |
embedded/use: Specifies all the use variables for this build. |
67 |
|
68 |
embedded/rm: Tells catalyst which directories to remove after |
69 |
building is complete. Great for getting rid of include headers and |
70 |
man pages. |
71 |
|
72 |
embedded/packages: Specifies which packages and package versions to |
73 |
install on the image |
74 |
|
75 |
--------- |
76 |
|
77 |
Well that's most of what I had lying around in terms of |
78 |
documentation. It is definatly far from complete, but suggestions and |
79 |
comments are welcome. Eventually this should make it to guide xml! |