logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/make-initrd.git
commit: bac0de3a75c5991f60e7b490fc72a47412e7a64a
parent 7dc2f1c40a13673031f23dc59ee804d6c73ff457
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 30 Apr 2024 11:26:16 +0200

Add pigz-2.8

Diffstat:

MREADME.md6++++++
Minit.sh12++++++++++++
Mmake-root.sh1+
3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -58,6 +58,12 @@ Meanwhile: ### zlib Simple albeit slightly broken `./configure` script (see patches). +### pigz +Simple, needs make + c compiler + zlib. +Note: Might be worth it to de-vendor zopfli. +Meanwhile: +- GNU gzip: ./configure script which requires diff(1) for it's grep sanity check + ## Launching in QEMU ``` $ qemu-system-x86_64 -enable-kvm -cpu host -m 1536 -kernel /boot/vmlinuz-6.6.21-gentoo -initrd /tmp/initramfs-tcc.cpio.xz -append 'init=/init console=ttyS0 panic=1' -nographic -no-reboot diff --git a/init.sh b/init.sh @@ -67,6 +67,16 @@ build_zlib_libs() { bmake install } +build_pigz() { + cd /pigz-*/ + bmake CC=$CC + cp -p pigz /bin + ln -s pigz /bin/unpigz + + ln -s pigz /bin/gzip + ln -s pigz /bin/ungzip +} + set -ex -o pipefail export CC=tcc @@ -110,6 +120,8 @@ build_bzip2 build_zlib_libs +build_pigz + cd / rescueshell diff --git a/make-root.sh b/make-root.sh @@ -14,6 +14,7 @@ tarballs=" loksh-7.3.tar.xz bzip2-1.0.8.tar.gz zlib-1.3.1.tar.xz + pigz-2.8.tar.gz " WORKDIR="$(pwd)" name_base="initramfs-tcc"