logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/
commit: 9e78a714caad8de2fd9e0ae7c54ed0351bb20199
parent 763be039e0abf02fc51af23bb36ad8057db1c1ea
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  4 Feb 2025 18:27:46 +0100

replace xz(-utils) with muxzcat

Allows to avoid GNU make and autotools

Diffstat:

MREADME.md2+-
Mdistfiles.SHA512SUM2+-
Mextras-build-all.sh3++-
Aextras/muxzcat.sh12++++++++++++
Dextras/xz.sh28----------------------------
Mfetch.sh3++-
Mmake-root.sh4++--
7 files changed, 20 insertions(+), 34 deletions(-)

diff --git a/README.md b/README.md @@ -140,7 +140,7 @@ Meanwhile: ### extras as packed tarballs - GNU make: Required by the other extras -- xz: Not for anything yet, but requires working around libtool to build so including it +- muxzcat: To decompress qbe tarball - lua: For oasis - muon: For pkgconf and git without autotools - pkgconf: For iproute2 diff --git a/distfiles.SHA512SUM b/distfiles.SHA512SUM @@ -30,6 +30,7 @@ be193ac93468095cbecd9fbc84ee16b9fc2f5e7f5181b6759669cb180cdd31daf1b094eb9585e1dd d9bdb935847f4c828c3df484b9070c8604816e820f5b171b893e35ac379e4a7ca2e1f1cba84c6ca0cab6a0c53ee617a1942b87999423dc9191e0dfb392858c11 distfiles/musl-libintl-1.2.5-r9.apk.riscv64 c806f85682b45ce2fb81f832de364b03c9f36e93e02f9ed0abd492418bd4d4ec8054c6684da1cafec6d8a92a07c26f3f873cb52aa5b1179e9ea9fa25fb21ed34 distfiles/musl-libintl-1.2.5-r9.apk.x86 3b2d0d4b96aa0181cd8552dfdb5d0f24ea26265a2aad463edc7102850aa4a91898bc7adeae15d852129f710eddeb280a0b770cff02c5af5b6c0082b6df250c58 distfiles/musl-libintl-1.2.5-r9.apk.x86_64 +194c4a7dfd0d0888aae3b25028b8d1e12148de6128053f36c57d0d8b7afc327f28af6a66fabaea5e1d2d2770a26f4baa94d557e9993b4d8f2a9da58cf391150e distfiles/muxzcat-v2b.tar.gz 3be63637bc1689e56d2eac9fa646e8bd89b8c4ccd4ad028a61c7c5d5e9f3490d3c49657488d39a62451b23f0935b81c5ecd812c92cef9e160f7377f4bd4fc711 distfiles/nawk-20250116.tar.gz 934099408667070537c7e92eafd3a63956959a987f08f77f33968b6890142aa07381678381a5fc69033e3c279ca2603ad0507a6c34beba85d87ce38904acd090 distfiles/oksh-oksh-7.6.tar.gz 58faf7472709f12af203afe926830e3f82e21ee987226f2efa9d3744fd2b6727faa9091d7ded1ffb3f3cdb03e7b7278cc01675d86cf2b3796c49aecd24cf993e distfiles/pdpmake-2.0.3.tgz @@ -59,6 +60,5 @@ fc82b5abae6ac546821893343a64238ab1d827fc03f4dfe3e0a18499bc2441cf4f259191ba5ad090 ccb62313eaf2fb149ba3a372ab6a0cccde2fc23e2193843f457b9ed181b832fddb34fe23b18ec3005aefb7d1137fcb440fb57462b9414734f3b1a90183d3db36 distfiles/tiny-curl-8.4.0.tar.gz b78d9adeca16187956fa32ca1743d8e707cba4aa543979243e4abe6a958c5892ef1b26982b45da50724e5af0ee31109d7d05c66751a21c77f06f04b7a56f8001 distfiles/utils-std-0.0.1.tar.gz f09323b4c599ee4e917fd880f21bfc4ed956382eab63fa4ff4d47e63b79b6f3522cd57ae4451720e6bfc5f7e25ba7f194aa667c1d03b6426d360666922294603 distfiles/utils-std-0.0.1.tar.gz.sign -b07b45e18615d1946e9d12157af99b54700d757832a638fccab70549574dcd7f28e69e71cc4c0b9c808959f818e79b668a5ccf108429ea0f40b6125bfd55d274 distfiles/xz-5.6.3.tar.gz e186a8fc01871414574fd5e90e8ce87a45bcf40aa0d7276bd90a301ee8c312be3a0adb580fc2c8b6653fbeeda1ce4dfdd078095a5fc77e70263e5e940414dc54 distfiles/yacc-oyacc-6.6.tar.gz 580677aad97093829090d4b605ac81c50327e74a6c2de0b85dd2e8525553f3ddde17556ea46f8f007f89e435493c9a20bc997d1ef1c1c2c23274528e3c46b94f distfiles/zlib-1.3.1.tar.gz diff --git a/extras-build-all.sh b/extras-build-all.sh @@ -11,11 +11,12 @@ set -ex /extras/tiny-curl.sh +/extras/muxzcat.sh + /extras/git.sh # muon-stage2 tiny-curl /extras/make.sh /extras/e2fsprogs.sh # make -/extras/xz.sh # make /extras/iproute2.sh # make pkgconf diff --git a/extras/muxzcat.sh b/extras/muxzcat.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -ex + +tar xof /distfiles/muxzcat-*.tar.gz +cd muxzcat-*/ + +$CC -std=c90 $CFLAGS -o /usr/bin/muxzcat muxzcat.c +ln -s muxzcat /usr/bin/xzcat +ln -s muxzcat /usr/bin/xzdec + +cd .. +rm -fr muxzcat-*/ diff --git a/extras/xz.sh b/extras/xz.sh @@ -1,28 +0,0 @@ -#!/bin/sh -set -ex - -die() { - echo "die: $@" - exit 1 -} - -# pdpmake: (Makefile:480): recursive macro am__v_lt_ -# pdpmake: (Makefile:451): failed to build 'clean-recursive' exit 1 -# pdpmake: (Makefile:646): failed to build 'clean-recursive' exit 1 -# Works with GNU make and bmake -command -v make || die "Run /extras/make.sh" - -tar xof /distfiles/xz-*.tar.gz -cd xz-*/ - -export LD="tcc" -# --disable-symbol-versions: tcc 0.9.28rc doesn't supports .symver -./configure --prefix=/usr --disable-dependency-tracking --disable-symbol-versions --disable-shared -make clean - -make - -make install INSTALL=install - -cd .. -rm -fr xz-*/ diff --git a/fetch.sh b/fetch.sh @@ -18,6 +18,7 @@ URLS=" https://git.kernel.org/pub/scm/git/git.git/snapshot/git-2.48.1.tar.gz https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.47.1/e2fsprogs-1.47.1.tar.gz https://muon.build/releases/v0.3.1/muon-v0.3.1.tar.gz + https://c9x.me/compile/release/qbe-1.2.tar.xz " WORKDIR="$(dirname "$0")" @@ -66,7 +67,7 @@ fetch_forge https://github.com/onetrueawk/awk/archive nawk 20250116 fetch_forge https://github.com/ibara/oksh/archive/refs/tags oksh oksh-7.6 fetch_forge https://github.com/ibara/yacc/archive/refs/tags yacc oyacc-6.6 fetch_forge https://github.com/pkgconf/pkgconf/archive/refs/tags pkgconf pkgconf-2.3.0 - +fetch_forge https://github.com/pts/muxzcat/archive/refs/tags muxzcat v2b # suckless.org doesn't provides snapshots of sbase (yet?) test -e sbase-b30fb568.tar.gz || curl ${CURL_OPTS} -o sbase-b30fb568.tar.gz https://git.sr.ht/~mcf/sbase/archive/b30fb56804bfed69b45ef0e944d2e029e4d26258.tar.gz diff --git a/make-root.sh b/make-root.sh @@ -26,7 +26,6 @@ local_files=" " distfiles=" make-4.4.1.tar.gz - xz-5.6.3.tar.gz lua-5.4.6.tar.gz pkgconf-pkgconf-2.3.0.tar.gz iproute2-6.12.0.tar.gz @@ -36,6 +35,7 @@ distfiles=" git-2.48.1.tar.gz e2fsprogs-1.47.1.tar.gz muon-v0.3.1.tar.gz + muxzcat-v2b.tar.gz " local_distfiles=" extras-build-all.sh @@ -47,10 +47,10 @@ local_distfiles=" extras/make.sh extras/muon-stage1.sh extras/muon-stage2.sh + extras/muxzcat.sh extras/pkgconf-lite.sh extras/pkgconf.sh extras/tiny-curl.sh - extras/xz.sh " WORKDIR="$(dirname "$0")" WORKDIR="$(realpath "$WORKDIR")"