remove scripts that are no longer used.
This commit is contained in:
30
build.sh
Normal file → Executable file
30
build.sh
Normal file → Executable file
@@ -1,29 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
dir=$(dirname "$0")
|
||||
echo $dir
|
||||
cd $dir
|
||||
mkdir -p ./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
|
||||
rm -rf initram/
|
||||
mkdir -p initram
|
||||
mkdir -p initram/{bin,dev,etc,lib,proc,sbin,sys,tmp,usr}
|
||||
mkdir -p initram/usr/{bin,sbin}
|
||||
mkdir -p initram/etc/{bin,sbin}
|
||||
mkdir -p initram/lib/modules/
|
||||
cp busybox ./initram/bin/
|
||||
cp ./linux/drivers/block/nbd.ko initram/lib/modules/
|
||||
cp ./linux/modules.builtin initram/lib/modules/
|
||||
cp ./linux/modules.order initram/lib/modules/
|
||||
cd initram/bin/
|
||||
chmod +x busybox
|
||||
busybox --install -s "$(dirname "$0")/initram/bin/"
|
||||
printf '%s\n' "#!/bin/busybox sh" "/bin/busybox mount -t devtmpfs devtmpfs /dev" "/bin/busybox mount -t proc none /proc" "/bin/busybox mount -t sysfs none /sys" "ln -s /lib/modules/ /lib/modules/6.17.0-g98906f9d850e" "depmod -a" "/bin/busybox modprobe nbd max_part=2" "exec /bin/busybox sh" > $dir/initram/init
|
||||
chmod +x $dir/initram/init
|
||||
cd $dir/initram/
|
||||
find .
|
||||
find . -print0 | cpio --null -ov --format=newc | gzip -9 > $dir/initramfs.cpio.gz
|
||||
./build_kernel.sh
|
||||
sudo ./create_image.sh
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
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}
|
||||
mkdir -p initram/usr/{bin,sbin}
|
||||
mkdir -p initram/etc/{bin,sbin}
|
||||
mkdir -p initram/lib/modules/
|
||||
cp busybox ./initram/bin/
|
||||
cp /mnt/tmpfs/linux/drivers/block/nbd.ko initram/lib/modules/
|
||||
cp /mnt/tmpfs/linux/modules.builtin initram/lib/modules/
|
||||
cp /mnt/tmpfs/linux/modules.order initram/lib/modules/
|
||||
cd initram/bin/
|
||||
chmod +x busybox
|
||||
busybox --install -s "$(dirname "$0")/initram/bin/"
|
||||
printf '%s\n' "#!/bin/busybox sh" "/bin/busybox mount -t devtmpfs devtmpfs /dev" "/bin/busybox mount -t proc none /proc" "/bin/busybox mount -t sysfs none /sys" "ln -s /lib/modules/ /lib/modules/6.17.0-g98906f9d850e" "depmod -a" "/bin/busybox modprobe nbd max_part=2" "exec /bin/busybox sh" > "$dir/initram/init"
|
||||
chmod +x $dir/initram/init
|
||||
cd $dir/initram/
|
||||
find . -print0 | cpio --null -ov --format=newc | gzip -9 > $dir/initramfs.cpio.gz
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
cores=$(nproc)
|
||||
divisor=3
|
||||
/usr/bin/make clean && /usr/bin/make -j $((cores/divisor*2))
|
||||
Reference in New Issue
Block a user