Files
patronageos/scripts/build_kernel.sh
2025-12-09 22:06:11 -07:00

18 lines
672 B
Bash
Executable File

#!/bin/bash
set -e
cd "$(dirname "$0")"
cd ..
mkdir -p ./dependencies
rootdir=$(dirname "$0")
dir=./$(dirname "$0")
cd dependencies
[[ -d ./linux ]] || git clone --depth 5 https://github.com/gregkh/linux.git ./linux
cd "$(dirname "$0")"
cd ..
echo $PWD
cp ./config/kernel_options.json ./dependencies/linux/kernel_options.json
cat ./config/build_containerfile | /usr/bin/podman build --volume /lib/modules:/lib/modules:z -f - -t patronagekernel:latest .
nice -n 20 /usr/bin/podman run -it --volume /lib/modules:/lib/modules:z --volume ./dependencies/linux:/linux patronagekernel:latest
mkdir -p ./outputs/
cp ./dependencies/linux/arch/x86_64/boot/bzImage ./outputs/bzImage