logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/
commit: a98fccdb1efb0a8053c2798e9dd802e356a7bf99
parent 983c12d1f8c7c956bbe14319b7d41989f4c72b83
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  7 Apr 2026 09:55:32 +0200

extras: use upstream samurai instead of muon's internal fork

Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
X-Contrib-Policy: CONTRIBUTING.md 2026-03-12

Diffstat:

Mextras-build-all.sh6+++---
Mextras/git.sh4++--
Mextras/iproute2.sh4++--
Mextras/muon-stage1.sh18++++++++++++++----
Mextras/muon-stage2.sh9++++++---
Mextras/pkgconf.sh4++--
Mmake-root.sh3+++
7 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/extras-build-all.sh b/extras-build-all.sh @@ -11,9 +11,9 @@ set -ex /extras/samurai.sh -/extras/muon-stage1.sh -/extras/pkgconf.sh -/extras/muon-stage2.sh # libpkgconf +/extras/muon-stage1.sh # samurai +/extras/pkgconf.sh # muon-stage1 +/extras/muon-stage2.sh # samurai muon-stage1 libpkgconf /extras/iproute2.sh # muon-stage2 diff --git a/extras/git.sh b/extras/git.sh @@ -33,7 +33,7 @@ muon setup \ -Dgettext=disabled \ build -muon -C build samu -muon -C build install +samu -C build +samu -C build install cd - diff --git a/extras/iproute2.sh b/extras/iproute2.sh @@ -32,7 +32,7 @@ muon setup \ -Dprefix=/usr \ build || die -muon -C build samu -muon -C build install +samu -C build +samu -C build install cd - diff --git a/extras/muon-stage1.sh b/extras/muon-stage1.sh @@ -1,14 +1,24 @@ #!/bin/sh set -ex +command -v samu || die "Run /extras/samurai.sh" + cd /extras/muon-*/ -export CC_LD=$CC +export CC_LD="$CC" CFLAGS="${CFLAGS} -DBOOTSTRAP_NO_SAMU" ./bootstrap.sh bootstrap -./bootstrap/muon-bootstrap setup -Dbuildtype=debugoptimized -Dprefix=/usr build -./bootstrap/muon-bootstrap -C build samu -./bootstrap/muon-bootstrap -C build install +./bootstrap/muon-bootstrap setup \ + -Dbuildtype=debugoptimized \ + -Dprefix=/usr \ + -Dlibcurl=disabled \ + -Dlibarchive=disabled \ + -Dsamurai=disabled \ + -Dlibpkgconf=disabled \ + build + +samu -C build +samu -C build install cd - diff --git a/extras/muon-stage2.sh b/extras/muon-stage2.sh @@ -6,25 +6,28 @@ die() { exit 1 } +command -v samu || die "Run /extras/samurai.sh" command -v muon || die "Run /extras/muon-stage1.sh" pkg-config --exists libpkgconf || die "Run /extras/pkgconf.sh" cd /extras/muon-*/ -export CC_LD=$CC +export CC_LD="$CC" CFLAGS="${CFLAGS} -DBOOTSTRAP_NO_SAMU" # needs to re-bootstrap to get a muon which uses libpkgconf ./bootstrap.sh bootstrap +# stage2 enables libpkgconf ./bootstrap/muon-bootstrap setup \ -Dbuildtype=debugoptimized \ -Dprefix=/usr \ -Dlibcurl=disabled \ -Dlibarchive=disabled \ + -Dsamurai=disabled \ -Dlibpkgconf=enabled \ build -./bootstrap/muon-bootstrap -C build samu -./bootstrap/muon-bootstrap -C build install +samu -C build +samu -C build install cd - diff --git a/extras/pkgconf.sh b/extras/pkgconf.sh @@ -21,8 +21,8 @@ export CC_LD="tcc" export MAKE="pdpmake" muon setup -Dbuildtype=debugoptimized -Dprefix=/usr -Dtests=disabled build -muon -C build samu -muon -C build install +samu -C build +samu -C build install ln -sf pkgconf /usr/bin/pkg-config diff --git a/make-root.sh b/make-root.sh @@ -135,6 +135,9 @@ if ! test "${EXCLUDE_EXTRAS:+y}" = "y"; then cp "${WORKDIR}"/extras/iproute2/meson.build ./extras/iproute2-*/ || die + # use upstream samurai instead + rm -r ./extras/muon-*/src/external/samurai ./extras/muon-*/include/external/samurai || die + mkdir -p ./distfiles for i in $extra_distfiles do