Gentoo Archives: gentoo-embedded

From: Ned Ludd <solar@g.o>
To: "Peter S. Mazinger" <ps.m@×××.net>
Cc: gentoo-embedded@l.g.o, gentoo-hardened@l.g.o
Subject: [gentoo-embedded] Re: [gentoo-hardened] Re: uclibc base system
Date: Tue, 15 Jun 2004 18:44:26
Message-Id: 1087324822.14667.51.camel@simple
In Reply to: [gentoo-embedded] Re: uclibc base system by "Peter S. Mazinger"
1 On Tue, 2004-06-15 at 12:52, Peter S. Mazinger wrote:
2 > On 15 Jun 2004, Ned Ludd wrote:
3 >
4 > > I've mirrored two more of the files you have sent me to the following
5 > > location so others can get to them.
6 > > http://dev.gentoo.org/~solar/uclibc/peter_mirror/uClibc-0.9.26-cvs-update-20040613.patch.bz2
7 > > http://dev.gentoo.org/~solar/uclibc/peter_mirror/uClibc-0.9.26-patches-1.0.tar.bz2
8 > >
9 > > I've merged a small portion of the app-arch -> sys-apps
10 > > .ebuilds+uclibc/nls diffs last night till I about passed out.
11 > >
12 > > Saving binutils/gcc/uclibc for last.
13 > > All the .ebuilds with use uclibc &&|| in the global context or requiring
14 > > changes to virtual/* or PROVIDE= will likely be the ones that will take
15 > > me/us longer to get in. I want ask SpanKY/vapier to QA those parts.
16 >
17 > The PROVIDE="" statement does not allow following
18 > PROVIDE="somecondition? ( ... )", like [P]DEPEND, it adds faulty entries
19 > to /var/cache/edb/virtuals, that's why I used
20 >
21 > use somecondition && PROVIDE="${PROVIDE} ..."
22
23 Please add yourself to the CC: list for this bug which brings up just
24 this point.
25 http://bugs.gentoo.org/show_bug.cgi?id=32114
26
27 >
28 > For the libtool.m4, ltconfig, acinclude.m4, aclocal.m4, configure,
29 > configure.ac patches we should really put that into probably elibtoolize
30 > (maybe w/ --uclibc?) it is needed too often, and if you do not look deeply
31 > at configure time, you'll end up most of the time building only static
32 > libs, because the tools do not recognize the shared capability.
33 >
34 > Peter
35 >
36 > >
37 > > On Tue, 2004-06-15 at 09:13, Peter S. Mazinger wrote:
38 > > > On 15 Jun 2004, Ned Ludd wrote:
39 > > >
40 > > > > Quite impressive Peter.
41 > > > > I have mirrored your files to
42 > > > > http://dev.gentoo.org/~solar/uclibc/peter_mirror/portage-uclibc-overlay-20040614.tar.bz2
43 > > > > and exploded the tarball to
44 > > > > http://dev.gentoo.org/~solar/uclibc/peter_mirror/portage-uclibc/
45 > > > > then diffed out the .org files and the .ebuilds the ebuild's patch is
46 > > > > here
47 > > > > http://dev.gentoo.org/~solar/uclibc/peter_mirror/portage-uclibc-ebuilds-20040614.patch
48 > > >
49 > > > this is what I really meant, so others can check what changed
50 > > >
51 > > > > and the profile/script data is here
52 > > >
53 > > > the script data is yet untested, I have only removed glibc reference from
54 > > > there
55 > > >
56 > > > > http://dev.gentoo.org/~solar/uclibc/peter_mirror/org-uclibc-20040614.patch
57 > > > > This will be quite a bit of an undertaking I'm hoping mutex, dragonheat
58 > > > > can help with some of these commits.
59 > > > >
60 > > > > How may megs is your resulting stage/images after the initial bootstrap
61 > > > > process?
62 > > >
63 > > > I can't really tell, I do not have managed to build stages (any help
64 > > > appreciated how to do it from tbz2 files), and my env. has left over files
65 > > > from my earlier rpms (wouldn't be relevant if counted)
66 > > >
67 > > > I can tell that the packages/All directory is 58MB (for emerge system) +
68 > > > ccache, catalyst
69 > > >
70 > > > bigger than 1MB are kbd (the keyboard files are next candidates to strip
71 > > > down),miscfiles(although stripped, gzipped), ncurses (although not so
72 > > > many terminfo files, and no additional libs, like menu,panel,form), db4,
73 > > > automake
74 > > > bigger than 2MB are libperl, openssl
75 > > > bigger than 3MB are binutils
76 > > > bigger than 4MB are python
77 > > > bigger than 12MB gcc, perl (13MB)
78 > > >
79 > > > Is there some way to query portage to tell how much the installed stuff
80 > > > is?
81 > > >
82 > > > I haven't checked how much of this is man-pages and info-files, if the
83 > > > binaries are really stripped all of them where possible.
84 > > >
85 > > > I have attached 2 missing files from distfiles (for uClibc)
86 > > >
87 > > > Busybox is not used at all yet.
88 > > >
89 > > > There are some things that have to be decide:
90 > > > 1. will gcc get a c++ use flag?
91 > > > 2. should groff/man/man-pages/info/install-info be in a stage3
92 > > > 3. should ncurses include the full stuff (all libs)
93 > > > 4. I would remove all the *.so handling by scripts, if they are installed
94 > > > in /lib, they really only should be installed directly into /usr/lib.
95 > > > 5. what to do w/ perl (mini/micro-perl are alternatives for the build
96 > > > system (autotools should work w/ it) but not for a full featured one, no
97 > > > support for addons)
98 > > > 6. gettext: as I already said, I would put the *.m4 files into autotools
99 > > > and remove gettext from the stages
100 > > > 7. locale/nls support: the current only usable variant is to have uClibc
101 > > > w/o locale support, and use libintl.{a,h,so} from gettext.
102 > > >
103 > > > Peter
104 > > >
105 > > > > I'm CC: the hardened mailing list as others there may have an interest
106 > > > > in your work as this uses the hardened profile and all :)
107 > > > >
108 > > > > On Mon, 2004-06-14 at 19:25, Peter S. Mazinger wrote:
109 > > > > > Hello!
110 > > > > >
111 > > > > > This is the overlay directory I used parallel to portage (it has to be
112 > > > > > there for now, else the included links won't work), that allowed me to
113 > > > > > build gentoo fully uclibc based (starting from a buildroot config,
114 > > > > > building manually python/portage, running emerge sync ...)
115 > > > > >
116 > > > > > 1. the files directories have only new files and links to the originally
117 > > > > > used (for x86), the digest/Manifest files were needed to rebuild fully
118 > > > > > with these configs as an overlay directory, the links because portage
119 > > > > > can't handle "properly (my opinion)" the overlay directory
120 > > > > >
121 > > > > > 2. the ebuilds can be diffed to the corresponding version (as of emerge
122 > > > > > sync 20040613) to see what I have done
123 > > > > >
124 > > > > > 3. some of the changes are not directly uclibc related, they correct
125 > > > > > typos etc. in the originals, add support to build w/o nls, or strip down
126 > > > > > the package somewhat
127 > > > > >
128 > > > > > 4. the directories profiles, scripts include the original version (*.org)
129 > > > > > of files too, the new ones have to be copied over the original tree, the
130 > > > > > overlay support does not allow to have these files at another location.
131 > > > > >
132 > > > > > 5. distfiles include new patches for binutils-2.14.90/15.91 and gcc-3.3.3
133 > > > > > (these have to be copied to the main distfiles, because again the overlay
134 > > > > > structure does not support it in another location)
135 > > > > >
136 > > > > > 6. I haven't tried yet cascaded profiles, the only profile tested is what
137 > > > > > I delivered.
138 > > > > >
139 > > > > > 7. it builds as it is (haven't tried w/ nls, and that is not really
140 > > > > > correct in uclibc yet), don't enable nls for now
141 > > > > >
142 > > > > > 8. stage building and bootstraping was not tested, because I didn't find
143 > > > > > an "elegant" way to make a stage1/2/3 from .tbz2 files (any help
144 > > > > > appreciated, then I could also provide a stage1)
145 > > > > >
146 > > > > > 9. for now gettext, yacc (replaced by bison -y), ncompress
147 > > > > > (uncompress replaced by gzip), bc, bin86, groff, man[-pages] are not a
148 > > > > > part of an 'emerge system', cracklib got support for gzipped files (so
149 > > > > > miscfiles is much smaller), w/o groff and man-pages it is not a
150 > > > > > requirement to have c++ compiler either (this is not implemented, should
151 > > > > > probably be a flag in gcc, like f77, objc), gnuconfig_update is only
152 > > > > > needed where configure is run directly, not by econf (econf is hacked to
153 > > > > > provide the same functionality, as gnuconfig_update), ncurses does not
154 > > > > > deliver the addon libraries (menu,panel,form). Some told me that gettext
155 > > > > > can't be removed, else autotools won't run, well I think, the .m4 from
156 > > > > > gettext could be added to autotools, and than it should be no problem w/o
157 > > > > > it.
158 > > > > >
159 > > > > > 10. added also my make.conf and package.keywords, to show which versions
160 > > > > > where used, the most is stable stuff, but some have to be ~x86.
161 > > > > >
162 > > > > > 11. mainly the shared libs will have problems, to add support for new
163 > > > > > libs, look at the libtool patches (ltconfig-uclibc for older configures
164 > > > > > and libtool-1.4.3-uclibc for newer ones)
165 > > > > >
166 > > > > > 12. be aware that you have to build the buildroot w/ the same config (and
167 > > > > > patches), as deduced from the uclibc.ebuild (using in both places the
168 > > > > > same cvs too). Do not start from uclibc-0.9.26 stable, because it is not
169 > > > > > binary compatible w/ the current cvs.
170 > > > > >
171 > > > > > 13. hardened stuff: gcc uses pie and ssp, but relro/now are disabled,
172 > > > > > relro is also completely removed from binutils, uclibc does not have
173 > > > > > support for it (any volunteer to add this to the uclibc's ldso?)
174 > > > > >
175 > > > > > 14. CHOST has to be set to *linux-uclibc (not linux-gnu)
176 > > > > >
177 > > > > > Peter
178 > > > >
179 > >
180 --
181 Ned Ludd <solar@g.o>
182 Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer

Attachments

File name MIME type
signature.asc application/pgp-signature