Gentoo Archives: gentoo-dev

From: david@×××××××××.com
To: Paul Smith <pausmith@××××××××××××××.com>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] BUILDROOT concept (was Re: [gentoo-dev] ROOT variable)
Date: Mon, 26 Apr 2004 20:02:32
Message-Id: 20040426200014.GB20286@redhate.futuretel.com
In Reply to: Re: [gentoo-dev] BUILDROOT concept (was Re: [gentoo-dev] ROOT variable) by Paul Smith
1 On Mon, Apr 26, 2004 at 12:38:00PM -0400, Paul Smith wrote:
2 > %% david@×××××××××.com writes:
3 >
4 > d> see catalyst snapshots model. Specify whatever custom portage tree
5 > d> you want to your hearts content.
6 >
7 > Catalyst is very interesting, but I feel that the chroot model, which is
8 > what Catalyst is based on, is fundamentally not the correct choice for
9 > cross-compilation setups. As I mentioned in a previous message,
10 > requiring chroot means that you have to figure out a way to put hosted
11 > tools into your target image, including a complete host-based base
12 > operating system with glibc, shells, make, and an entire common command
13 > set since most makefiles invoke many different UNIX commands, and that's
14 > not even mentioning the actual cross-compiler itself.
15 >
16 > Using a chroot model is probably the most expedient way to handle
17 > creating an embedded filesystem FOR THE SAME ARCHITECTURE, but it's not
18 > flexible enough (IMO) to handle creating a completely general embedded
19 > system.
20 >
21
22 what's wrong with having the cross compiler in the chroot, and using
23 ROOT=/tmp/mergeroot to create a target embedded image ?
24
25 then specifying whatever packages you require in the spec file. All
26 the native tools then get installed into /tmp/mergeroot. That
27 directory is tar'd up or put into an ext2 or cramfs.
28
29 Maybe I'm misunderstanding your goals.... but in reviewing your old
30 emails. I see a few basic requirements here(i'm paraphrasing your
31 emails):
32
33 1) produce and store gentoo system images(GSI's from now on ) on an
34 already functioning system. Each with it's own unique portage
35 tree separate from all others.
36
37 2) Each GSI has it's own self contained compilers, linkers, libc,
38 system tools, etc.
39
40 3) Have the ability to specify a non-native architecture(CPU arch,
41 libc, etc) for a GSI(non-native being that the 'functioning system'
42 cannot run the binaries for the GSI natively)
43
44 4) Have the ability to arbitarily install or update packages on the
45 GSI's.
46
47 5) Have the ability to create binary packages during the package
48 compilation in the GSI's.
49
50 And in another email you mentioned you do not like chroot solutions
51 because they confuse you. I agree that managing many chroots would
52 not be an easy task. However with catalyst, a system for building
53 system images, the work is done for you. One merely has to give
54 catalyst a file telling it what to build. For example, a catalyst
55 file for a cross system would be the following:
56
57 subarch: ppc
58 version_stamp: cross-ppc
59 target: stage2
60 rel_type: default
61 rel_version: 2004.0
62 snapshot: custom-ppc-embedded-portage
63 source_subpath: default-x86-2004.0/stage1-x86-2004.0
64
65 catalyst would then do the following:
66
67 *) unpack the native(x86) stage1, chroot into it, and begin building a
68 non-native stage1 with a x86->ppc cross enviornment
69
70 *) build additionally supplied cross packages(libraries for example)
71
72 *) tar up the cross system
73
74 then one can easily create a non-native full system:
75
76 subarch: ppc
77 version_stamp: native-ppc
78 target: stage2
79 rel_type: default
80 rel_version: 2004.0
81 snapshot: custom-ppc-embedded-portage
82 source_subpath: default-x86-2004.0/stage1-cross-ppc-2004.0
83
84 *) catalyst would unpack the cross stage1, chroot into it, and begin
85 building ppc native binaries and producing a native system image
86
87 *) again, additionally building other libraries and executabesl
88 specified in the spec file
89
90 *) tar up(or place in fs image) the resulting native GSI
91
92 It would seem to me, that a system such as this would satisfy all of
93 your requirements.
94
95 --
96 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] BUILDROOT concept (was Re: [gentoo-dev] ROOT variable) Paul Smith <pausmith@××××××××××××××.com>