Gentoo Archives: gentoo-embedded

From: Christopher Harvey <chris@××××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] generating root file systems
Date: Wed, 13 Jul 2011 14:06:47
Message-Id: f901e56acfc5a3956f920b2fc06eb041@basementcode.com
In Reply to: Re: [gentoo-embedded] generating root file systems by Ed W
1 On Wed, 13 Jul 2011 11:54:40 +0100, Ed W wrote:
2 > On 07/07/2011 16:27, Christopher Harvey wrote:
3 >> I was wondering if there was any interest in adding a script that
4 >> could
5 >> generate a bootable linux filesystem from a cross compiled target
6 >> directory.
7 >
8 > I would be happy to work with you on this - however, I also saw on
9 > Planet Gentoo something about a gentoaster project - possibly
10 > related?
11 > http://hexxeh.net/?p=328117725
12 possibly, but I don't understand the whole web based thing.
13 >
14 > What I have is a very simple portage-a-like to support the case that
15 > I
16 > have several stages to my script.
17 >
18 > - Mounting all necessary sources
19 > - Building a base system
20 > - Copying base to target ready to be imaged
21 > - Image
22 > - Unmount
23 >
24 > Additionally I am trying a packaging system using aufs + squashfs, so
25 > I
26 > am building more than one target image and the whole gets stacked
27 > together at the end
28 >
29 > The scripting is fairly simple, but I guess this could develop into
30 > some
31 > best practices..?
32 yeah my script is a mess, but I still think it useful because it gets
33 all the basic steps down which I know would help some people.
34 >
35 > Arguably this is re-inventing catalyst, but speaking from
36 > inexperience,
37 > catalyst appears to work best when the ebuilds are perfect and need
38 > to
39 > micro patching - for embedded builds some flexibility is very
40 > helpful.
41 Well, catalyst was designed to build a gentoo image. I want to build
42 embedded images that have nothing gentoo specific about them. No
43 portage, no python, no eselect or anything else like that.
44 >
45 > Patching ebuilds in mind: I have been experimenting with
46 > /etc/portage/patches and also the bashrc for broad patching, eg where
47 > some long standing patch or config customisation is necessary (eg
48 > delete
49 > some openrc file which makes no sense, or customise some udev config,
50 > etc)
51 I've never heard of that file, '/etc/portage/patches', and can't find
52 it in man portage.
53 >
54 > I guess if we could get this well written up then it would encourage
55 > others to look at gentoo for embedded development? At the moment
56 > it's
57 > very powerful, but I sense there is a steep learning curve while you
58 > develop your own build environment?
59 >
60 > How do you think we should proceed?
61 There always is a learning curve for embedded and it will be impossible
62 to support every single configuration for every single board. Basically
63 my plan was to try to logically split all the steps in making a
64 filesystem image and put them into a clear well documented bash script,
65 then let users tweak it by calling hooks at each step. Hopefully after a
66 while if people start adding steps and options it would support most
67 base filesystem images people want to boot a machine with.
68
69 I can drop what a have so far into a git repo and we can go from there
70 taking the best from each of our scripts. Do you want to make the repo
71 or should I?
72 >
73 > Ed W
74
75 -Chris

Replies

Subject Author
Re: [gentoo-embedded] generating root file systems Ed W <lists@××××××××××.com>