- Aboriginal builds a simple cross compiler, basically the same thing musl-cross does.
- Aboriginal builds a statically linked native compiler (not actually Canadian, iirc, as target and host are the same) along with make, basically the same thing meroot does now.
- Aboriginal builds a rootfs and kernel for the target, meroot builds a busybox rootfs with a few extra tools.
- Aboriginal combines the rootfs, kernel, and native compiler with a bunch of other special scripts and QEMU things to make a bootable system that can build things, which isn't really needed if you're going to boot in or chroot if the arch is close enough.
- Use musl-cross to create a cross compiler.
- Build a busybox based rootfs using embedded clfs method.
- Expand musl-cross to create a native compiler and make taking clues from Aboriginal, install into rootfs. (Will this gcc delete the /lib/ld symlink issue?)
- Chroot in and make sure things work.
- PROFIT? (too many steps)
To try first:
- Static busybox rootfs, then chroot in and play. (CHECK!)
- Static binutils, GCC, make, and m4 into rootfs, then chroot in and play. (CHECK!)
- In chroot, build dynamic musl. (CHECK!)
- In chroot, bootstrap pkgsrc, which needs gawk it seems... (CHECK!)
- In chroot, build stuff from pkgsrc (like gawk, m4, make, gcc, and anything else)
- In chroot, delete non-pkgsrc m4, make, gcc, gawk, binutils.
mount -t proc proc /tmp/meroot/proc
mount --rbind /dev /tmp/meroot/dev
cp /etc/resolv.conf /tmp/meroot/etc/
source /etc/profile
- Build and install dynamically linked musl
./configure --prefix=/ --includedir=/usr/include
- Build and install gawk
./configure --prefix=/usr
- Get a tarball of pkgsrc and bootstrap it. Use
bmake
for pkgsrc things. - Pkgsrc install gawk, gcc, m4, binutils
- Maybe rebuild busybox dynamically?
- Build and install dynamic musl
wget http://www.musl-libc.org/releases/musl-1.1.6.tar.gz
, unpack, then./configure --prefix=/ --includedir=/usr/include && make && make install
- Build and install zlib
wget http://zlib.net/zlib-1.2.8.tar.gz
, unpack, then./configure --prefix=/usr && make && make install
- (NEEDED?) Build and install perl5
wget http://www.cpan.org/src/5.0/perl-5.20.1.tar.gz
, unpack, ensure there's no config.sh file around, thensh Configure -Dcc=gcc -Dprefix=/usr -s && make && make install
- (NEEDED?) Build and install ncurses
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
, unpack, then./configure --prefix=/usr --with-shared && make && make install
- (FAILS TO BUILD)
wget http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.23.tar.xz
, unpack, then./configure --prefix=/usr --with-zlib --disable-nls
- Build and install libarchive
wget http://libarchive.org/downloads/libarchive-3.1.2.tar.gz
, unpack, then./configure --prefix=/usr && make && make install
- musl
- tar-1.13
- zlib?
- gzip
- profit?
- core-utils
But, once you have all this, when you try to install the musl package, then at some point (due to how slackware packages don't package up symlinks, their creation happens in the doinst script) more steps have to happen but the musl symlink from /lib/ld to /lib/libc.so is gone so anything which is dynamically linked can't run, which means the symlinks can't be made (ln is from coreutils and is dynamically linked for me right now) or a bunch of other stuff can't happen. This is fun...
So, to fix we have 2 choices:
- Static link everything above (tar, gzip, core-utils)
- Rewrite some parts of pkgtools to use what busybox (or maybe toybox?) provides (mainly it's the fancy
ls --time-style=long-iso
, thegzip -9c
along withbzip2 -9c
which try to get maximal compression and I think sometar
options as newer than tar-1.13 is unstable?).
For 2, this is easy to solve for gzip and bzip2, and I think tar from busybox is probably fine. The ls --time-style
part I think just makes ls output in a standard format, since ls likes to be human readable with dates so the following cuts may get offset if the date format isn't consistent. Busybox ls -e
will output a consistent date format but is not in coreutils version of ls
, so check which one is being used and then adapt.
These steps probably aren't actually needed. It seems that bmake got installed into pkgsrc /usr/pkg/bin somehow.
If a pkgsrc Makefile has any .include <BLAH>
it seems that gnu make is barfing with Makefile:3: *** missing separator. Stop.
errors. This seems odd...
Apparently bmake is needed, but bmake's make install
requires bash, which is annoying...... Maybe in the bootstrap? So maybe my whole "let's build bmake" adventure is for naught?
2. Build and install bash 2.05b ./configure --prefix=/usr --disable-bash-malloc --disable-readline
3. Build and install make (this time without any special exclusions) ./configure --prefix=/usr
4. Build and install bmake ./configure --prefix=/usr
then follow the bootstrapping, then make install
(needs bash)