Update build.sh

This commit is contained in:
2025-10-31 08:55:09 -06:00
parent 8892901369
commit d2e14bfed4

View File

@@ -1,15 +1,12 @@
#!/bin/bash
cd "$(dirname "$0")"
mkdir -p ./linux
#git clone --depth 1 https://github.com/torvalds/linux.git ./linux
git clone --depth 1 https://github.com/torvalds/linux.git ./linux
cat /boot/config-$(uname -r) > ./linux/.config
sed -i 's/CONFIG_SYSTEM_TRUSTED_KEYS=".*"/CONFIG_SYSTEM_TRUSTED_KEYS=""/' ./linux/.config
sed -i 's/CONFIG_SYSTEM_REVOCATION_KEYS=".*"/CONFIG_SYSTEM_REVOCATION_KEYS=""/' ./linux/.config
cat ./containerfile | podman build --volume /lib/modules:/lib/modules:z -f - -t kernelbuild:latest .
nice -n 10 /usr/bin/podman run --volume /lib/modules:/lib/modules:z --volume ./linux:/linux kernelbuild:latest
dir=$(dirname "$0")
echo $dir
cd $dir
rm -rf initram/
mkdir -p initram
mkdir -p initram/{bin,dev,etc,lib,proc,sbin,sys,tmp,usr}