1 |
On Wed, 2007-03-14 at 19:23 +0100, Christopher Friedt wrote: |
2 |
> I may have already mentioned this once, but I don't see any harm in |
3 |
> doing it again. |
4 |
> |
5 |
> Have any of you used Kuroo ? This is a similar idea - although not |
6 |
> nearly as far along - for managing embedded system builds with portage. |
7 |
> |
8 |
> Are there any developer libraries for interfacing with Portage that are |
9 |
> fairly available - [Java, C, C#, ... I've really never used python] |
10 |
> |
11 |
> ******** |
12 |
> |
13 |
> As an gentoo user & embedded developer, I can see the massive benefits |
14 |
> to both general purpose package management, as well as build automation |
15 |
> for embedded systems, through the use of portage & emerge. |
16 |
> |
17 |
> Portage has a major advantage and should really be asserting itself more |
18 |
> in the world of embedded package management. The crossdev utility is by |
19 |
> far an excellent piece of work - I use it for practically every |
20 |
> toolchain now. |
21 |
> |
22 |
> However, there are a few questions that I've been asked several times - |
23 |
> (mostly by my boss), such as - |
24 |
> |
25 |
> i) why not just use OpenWRT, which will generage a filesystem image, |
26 |
> download your sources, _and_ build a kernel automatically... |
27 |
> |
28 |
> ii) why not use that thing from openembedded.org ? ... same idea as above... |
29 |
> |
30 |
> Why not? because I think that portage is clearly better, the source is |
31 |
> more current, dependencies are better resolved, more flexible, etc. |
32 |
> |
33 |
> |
34 |
> What appears to be a constant theme, in terms of what the 'competition' |
35 |
> has on gentoo-embedded, is an easy-to-use build system. |
36 |
> |
37 |
> |
38 |
> |
39 |
> The good news is, I've actually done some extensive work on this! |
40 |
> |
41 |
> I've been working on a _single_bash_script_ that is exceeding 2000+ |
42 |
> lines of code. What it does, is interactively help the user set up a |
43 |
> buildroot and manage portage overlays for different targets. That is, a |
44 |
> stage1 filesystem, a local portage tree, a cross-toolchain, etc. |
45 |
> |
46 |
> The reasons for this are: |
47 |
> |
48 |
> 1) portability across linux vendors (i.e. the developer does not need to |
49 |
> run gentoo natively, only needs to chroot to get the advantages of portage) |
50 |
> |
51 |
> 2) separability from the main os - none of the host |
52 |
> /etc/portage/package.* files are not adjusted - so there is practically |
53 |
> nothing changed at all on the host machine except for the addition of a |
54 |
> new buildroot directory. |
55 |
> |
56 |
> 3) extensibility - I'm seriously considering developing user interfaces, |
57 |
> libraries, etc, all to make this _more_developer_friendly_ ... even a |
58 |
> context free grammar for all possible buildroot / configuration |
59 |
> operations. Likely any extensions to this will be done either in C |
60 |
> (libs), Java, or C# ... maybe even an extension of some kind for |
61 |
> Eclipse. This could be somewhat similar to Kuroo |
62 |
> |
63 |
> 4) enables embedded developers to simply manage their embedded devices |
64 |
> using a portage overlay, in a very portable way. |
65 |
> |
66 |
> 5) easy generation of a root filesystem |
67 |
> |
68 |
> |
69 |
> By basically mounting or systematically copying/destroying key portage / |
70 |
> crossdev / configuration files to the chroot upon chroot (mount -n -o |
71 |
> bind, etc). This (will / has) enabled the same buildroot to be used for |
72 |
> _several_ configurations (portage overlays), targets (with versioned |
73 |
> toolchains), as well as developer and stable profiles. I'm working in a |
74 |
> way to automate compressed configuration backups as well, organized by |
75 |
> date. Hopefully, this will all be SVN friendly too - except for device |
76 |
> nodes of course :P |
77 |
> |
78 |
> The user is interactively prompted to select a target / toolchain, etc, |
79 |
> these are all selected based on __tested__ compilations on each |
80 |
> architecture using crossdev - a sort of build matrix like that from Dan |
81 |
> Kegel. |
82 |
> |
83 |
> There is a list of toolchains for each architecture that were cleanly |
84 |
> built using crossdev. I've only done a fraction of the build automations |
85 |
> for X86, and it took something like 2 days. |
86 |
> |
87 |
> What's really interesting about this script, is that i've made the |
88 |
> script copy itself to the chroot, upon every chroot, but with a |
89 |
> different name. So when the program chroots, it actually calls itself |
90 |
> upon transition with |
91 |
> |
92 |
> LIST=of \ |
93 |
> ENVIRONMENT=variables \ |
94 |
> chroot ${DIR} ${PROG2_NAME} |
95 |
> |
96 |
> which allows for a somewhat 'seamless' routine carryover - that is if |
97 |
> the program needs to install a toolchain, it will pass certain |
98 |
> environment variables once it moves to the chroot, etc. |
99 |
> |
100 |
> I think that this could be a pretty good addition to the embedded |
101 |
> development utilities for gentoo. |
102 |
> |
103 |
> |
104 |
> Please inform me if you have any interest in this project at all, I |
105 |
> would be very happy to have any assistance or input. |
106 |
> |
107 |
> |
108 |
> ~/Chris |
109 |
|
110 |
Your project seems very similar to that of the former GNAP (sadly the |
111 |
old GNAP developer is no longer with us) |
112 |
http://www.gentoo.org/proj/en/base/embedded/gnap.xml |
113 |
|
114 |
Anyway your goals are inline with ours for the most part.. So you may |
115 |
want to consider becoming an embedded developer for gentoo. If that is |
116 |
something that interests you come join us on irc in #gentoo-embedded on |
117 |
irc.gentoo.org (point at this thread and work with us for better |
118 |
integration) with portage/gentoo itself. |
119 |
|
120 |
-- |
121 |
Ned Ludd <solar@g.o> |
122 |
Gentoo Linux |
123 |
|
124 |
-- |
125 |
gentoo-embedded@g.o mailing list |