additional bash programming to support a json configuration file.

still working on kernel options for proper networking.
This commit is contained in:
Matt Knoop
2026-01-05 15:05:11 -07:00
parent 46382e3c6d
commit d26067b2fa
28 changed files with 10234 additions and 0 deletions

30
scripts/build_initramfs.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
set -e
cd "$(dirname "$0")"
cd ..
echo $PWD
echo "cleaning filesystem and creating initram directories"
rm -rf ./dependencies/initram/
mkdir -p ./outputs/
mkdir -p ./dependencies/
mkdir -p ./dependencies/initram/
mkdir -p ./dependencies/initram/{bin,dev,etc,lib,proc,sbin,sys,tmp,usr}
mkdir -p ./dependencies/initram/usr/{bin,sbin}
mkdir -p ./dependencies/initram/etc/{bin,sbin}
mkdir -p ./dependencies/initram/lib/modules/
echo "installing busybox"
cp ./busybox ./dependencies/initram/bin/
chmod +x ./dependencies/initram/bin/busybox
chmod 4755 ./dependencies/initram/bin/busybox
./dependencies/initram/bin/busybox --install -s "./dependencies/initram/bin/"
cp ./config/init.sh ./dependencies/initram/init
chmod +x ./dependencies/initram/init
#chmod 4755 ./dependencies/initram/bin/init
echo "copying kernel"
cp ./dependencies/linux/arch/x86_64/boot/bzImage ./outputs/bzImage
cd ./dependencies/initram/
find ./bin -type f -name "*" -exec chmod +x {} +
find . -print0 | cpio --null -o --format=newc --owner root:root | zstd -19 > ../../outputs/initramfs.cpio.gz
echo "created initramfs."