Gentoo Archives: gentoo-musl

From: Stuart Longland <stuartl@×××××××××××××××.au>
To: gentoo-musl@l.g.o
Subject: Re: [gentoo-musl] Building musl stage3 images for i486/i586?
Date: Sat, 25 Feb 2017 20:32:53
Message-Id: 58B1E9E3.5080100@longlandclan.id.au
In Reply to: Re: [gentoo-musl] Building musl stage3 images for i486/i586? by Stuart Longland
1 On 25/02/17 13:43, Stuart Longland wrote:
2 > I'm just giving this a try now. I've basically reverse-engineered what
3 > it was configuring and put those into my own scripts. I'll see how this
4 > goes.
5
6 Okay, the trick to doing this seems to be:
7
8 1. Use the existing i686 stages with Catalyst to build a i686 stage 1
9 tarball.
10
11 Spec file:
12 ---
13 subarch: i686
14 version_stamp: 20170121
15 snapshot: 20170121
16 target: stage1
17 rel_type: musl-SEED
18 profile: hardened/linux/musl/x86
19 source_subpath: stage3-i686-musl-vanilla-20161104
20 portage_overlay: /var/lib/layman/musl
21 portage_confdir: /path/to/releng/tools-musl/portage.i686.vanilla
22 chost: i686-gentoo-linux-musl
23 ---
24
25 2. Unpack the stage 1, bind-mount, chroot in, set the profile symlink
26 and proceed with the
27 https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable -- do
28 `binutils`, `gcc` and `musl` separately in that order.
29
30 This will hiccup after emerging `gcc` as /etc/init.d/functions.sh does
31 not exist, I copied this into the chroot from the host, and was able to
32 then run `gcc-config`, clean up, re-build `musl` then `libtool`, then
33 run the libtool fixer script.
34
35 functions.sh of course needs some other libraries to print messages, so
36 you'll get errors about eerror/emsg, etc not being found, but it'll
37 still go through the motions and set up gcc for you.
38
39 3. Run /usr/portage/scripts/bootstrap.sh script (this dug up some old
40 braincells for me; haven't done Gentoo from stage 1 by hand in years!)
41 4. Run `emerge -e world` as described
42 5. Exit, unmount and tar your chroot up; there's your initial stage 3.
43
44 Now run catalyst with the shiny new stage 3 seeds you just produced.
45 --
46 Stuart Longland (aka Redhatter, VK4MSL)
47
48 I haven't lost my mind...
49 ...it's backed up on a tape somewhere.

Replies

Subject Author
Re: [gentoo-musl] Building musl stage3 images for i486/i586? Felix Janda <felix.janda@××××××.de>