build the kernel in the container.

This commit is contained in:
Matt Knoop
2025-11-23 11:36:55 -07:00
parent 26645cc10d
commit 3a77b4a3cd

View File

@@ -3,11 +3,9 @@ set -e
cd "$(dirname "$0")"
dir=$(dirname "$0")
echo $dir
#mkdir -p /tmp/linux
[[ -d ./linux ]] || git clone --depth 1 https://github.com/torvalds/linux.git ./linux
cat ./build_containerfile | /usr/bin/podman build --volume /lib/modules:/lib/modules:z -f - -t patronagekernel:latest .
#rsync -av ./linux /mnt/tmpfs
#nice -n 20 /usr/bin/podman run -it --volume /lib/modules:/lib/modules:z --volume ./linux:/linux patronagekernel:latest
nice -n 20 /usr/bin/podman run -it --volume /lib/modules:/lib/modules:z --volume ./linux:/linux patronagekernel:latest
cd $dir
rm -rf initram/
mkdir -p initram
@@ -28,5 +26,4 @@ chmod +x $dir/initram/init
cd $dir/initram/
echo $dir
find . -print0 | cpio --null -ov --format=newc | gzip -9 > $dir/initramfs.cpio.gz
echo "created iniramfs"