lanodan,
@lanodan@queer.hacktivis.me avatar

Heh, of course GNU sed would itself depend on sed to build.

lanodan,
@lanodan@queer.hacktivis.me avatar

By the way, for context of the bunch of bootstrapping posts of the last few days: https://hacktivis.me/git/bootstrap-initrd/file/README.md.html

As said there still very experimental and unlikely to generate on your machine (host being gentoo-musl if you're curious, once that's more settled I'll try to gain a bit of independence from that).

lanodan,
@lanodan@queer.hacktivis.me avatar

Feels kind of weird to be doing a bootstrapping environment for fun while NixOS seems to be "tumbling down".

lanodan,
@lanodan@queer.hacktivis.me avatar

Managed to only have tcc+musl as binary seed, as I expected to eventually achieve, current sizes with grabbing them from gentoo-musl:

27M     /tmp/initramfs-tcc.cpio
4.5M    /tmp/initramfs-tcc.cpio.xz

That include the sources, which are all unpacked, tar nor any decompressors are bootstrapped yet.
Likely could get even smaller with grabbing Alpine packages (-O2 -ggdb doesn't yields the smallest binaries), and it's with both libc.so and libc.a from musl for now.

lanodan,
@lanodan@queer.hacktivis.me avatar

bzip2: C compiler + make; Done
zlib, gzip, xz: Need to improve my utilities for their autoconf setup

I guess that means I might also provide bz2 archives for some of my stuff.

lanodan,
@lanodan@queer.hacktivis.me avatar

Got zlib (with 3+ patches, 2 for it's configure script) and pigz.
Kind of funny that it's easier to bootstrap pigz (cc + make + zlib) than gzip (Like I'd need to get a diff implementation so it's configure script is happy…).

Now I guess I need a tar implementation and I should be very close to just being able to bootstrap a regular distro.

35M     /tmp/initramfs-tcc.cpio<br></br>6.5M    /tmp/initramfs-tcc.cpio.xz<br></br>
lanodan,
@lanodan@queer.hacktivis.me avatar

Switched to APKs from Alpine edge for the binary seed and added a SHA512SUM of the distfiles which are now fetched. Alpine edge is of course not a stable thing but at least it now means it's not just built for my machines and probably should work for other architectures as well.

Also even for me it's a great change because straight up unpacking the APKs with tar(1) is a pretty nice time saver.

Here's the repository URL again now that other people should be able to play with it: https://hacktivis.me/git/bootstrap-initrd/

And if you're too lazy or somehow it doesn't builds, here the current initrd:

initramfs-tcc.cpio.xz

lanodan,
@lanodan@queer.hacktivis.me avatar
+ cat /proc/uptime
9.38 2.99
+ echo Done bootstrapping!

Less than 10s on my laptop (AMD Ryzen 5 PRO 3500U) while running in QEMU, neat. (And with 3 wasted seconds to to "checking for wait3 that fills in rusage..." in bmake configure script)

lanodan,
@lanodan@queer.hacktivis.me avatar

Figured I could try yeeting libc.a (9.1MB) since no static executables are built while bootstrapping, went from 11MB total to 1.2MB total.
Binary seed that's small enough it could fit on a 1.44MB floppy? Heck yeah!

lanodan,
@lanodan@queer.hacktivis.me avatar

Heh, adapted the script for multiple architectures and x86_32 works with 128MB of RAM, while somehow on x86_64 it OOMs before even reaching init (which to be fair is tcc).

(none)# df -h
Filesystem                          Total       Used  Available Use% Mountpoint
rootfs                           42.20MiB   34.73MiB    7.46MiB  83% /
devtmpfs                         42.20MiB    0.00B     42.20MiB   0% /dev
(none)# uname -a
Linux (none) 6.6.29-0-lts #1-Alpine SMP PREEMPT_DYNAMIC Mon, 29 Apr 2024 08:10:40 +0000 i686
(none)# grep MemTotal /proc/meminfo
MemTotal:         110948 kB

xarvos,
@xarvos@outerheaven.club avatar

@lanodan i use the sed to build the sed

lanodan,
@lanodan@queer.hacktivis.me avatar

By the way, minised while trivial to build isn't complete enough for autohell.

nachtrabe,
@nachtrabe@bae.st avatar

@lanodan

How do you mean complete?

lanodan,
@lanodan@queer.hacktivis.me avatar

@nachtrabe minised entirely lacks the -i option for example.
And not sure how but I end up with sed: can't open ^ *+ when ./configure tries to check for functions.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • PowerRangers
  • DreamBathrooms
  • tacticalgear
  • magazineikmin
  • vwfavf
  • Youngstown
  • ngwrru68w68
  • ethstaker
  • slotface
  • rosin
  • mdbf
  • thenastyranch
  • kavyap
  • modclub
  • provamag3
  • Durango
  • cubers
  • osvaldo12
  • GTA5RPClips
  • everett
  • khanakhh
  • InstantRegret
  • Leos
  • tester
  • normalnudes
  • cisconetworking
  • anitta
  • megavids
  • All magazines