I know what I am doing. Trust me.
Signed-off-by: RouxAntoine <antoinroux@hotmail.fr>
This commit is contained in:
parent
1ed7f4f155
commit
77e8c07dc0
@ -13,15 +13,15 @@ use-ubuntu: ../out/ubuntu-22.04.ext4 ../out/ubuntu-22.04.id_rsa
|
|||||||
use-kernel: ../out/vmlinux-5.10.204
|
use-kernel: ../out/vmlinux-5.10.204
|
||||||
ln -fs $< ../out/vmlinux
|
ln -fs $< ../out/vmlinux
|
||||||
|
|
||||||
use-kernel-custom: ../out/vmvmlinux-custom
|
use-kernel-custom: ../out/vmlinux-5.11
|
||||||
ln -fs $< ../out/vmlinux
|
ln -fs $< ../out/vmlinux
|
||||||
|
|
||||||
../out/vmlinux-5.10.204:
|
../out/vmlinux-5.10.204:
|
||||||
wget -O $@ https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.7/$(ARCH)/vmlinux-5.10.204
|
wget -O $@ https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.7/$(ARCH)/vmlinux-5.10.204
|
||||||
|
|
||||||
CONFIG_FILE=$(wildcard ./kernel-config/*.config)
|
CONFIG_FILE=$(wildcard ./kernel-config/*.config)
|
||||||
../out/vmvmlinux-custom: ./kernel.sh $(CONFIG_FILE)
|
../out/vmlinux-5.11: ./kernel.sh $(CONFIG_FILE)
|
||||||
bash ./kernel.sh
|
bash ./kernel.sh 5.11
|
||||||
|
|
||||||
../out/arch-rootfs.ext4: ./arch-rootfs.sh
|
../out/arch-rootfs.ext4: ./arch-rootfs.sh
|
||||||
bash ./arch-rootfs.sh
|
bash ./arch-rootfs.sh
|
||||||
|
@ -4,18 +4,20 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
KERNEL_VERSION=v5.11
|
KERNEL_VERSION=$1
|
||||||
WD=../out
|
WD=../out
|
||||||
|
NPROC=4
|
||||||
|
|
||||||
## Install build tools
|
## Install build tools
|
||||||
# pacman -Syu base-devel bc pahole --ignore linux-firmware
|
# pacman -Syu base-devel bc pahole --ignore linux-firmware
|
||||||
|
# disabling CONFIG_DEBUG_INFO_BTF so no pahole required
|
||||||
|
|
||||||
sudo rm -rf "$WD"/linux
|
sudo rm -rf "$WD"/linux
|
||||||
## Get kernel source
|
## Get kernel source
|
||||||
git clone --depth 1 --branch $KERNEL_VERSION https://github.com/torvalds/linux.git "$WD"/linux
|
git clone --depth 1 --branch v$KERNEL_VERSION https://github.com/torvalds/linux.git "$WD"/linux
|
||||||
|
|
||||||
## Get Archlinux kernel config
|
## Get Archlinux kernel config
|
||||||
curl -o "$WD"/linux/.config https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/2db49d4fbcda88d76a4c236ccb5a7986715d70ba/config
|
curl -o "$WD"/linux/.config https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/5.11.16.arch1-1/config?ref_type=tags
|
||||||
|
|
||||||
CONFIG_PATH="$WD"/linux/.config
|
CONFIG_PATH="$WD"/linux/.config
|
||||||
|
|
||||||
@ -34,6 +36,7 @@ sed 's/\(.*\)VIDEO\(.*\)=y/\1VIDEO\2=n/g' -i "$CONFIG_PATH"
|
|||||||
# sed 's/\(.*\)PCI\(.*\)=y/\1PCI\2=n/g' -i "$CONFIG_PATH"
|
# sed 's/\(.*\)PCI\(.*\)=y/\1PCI\2=n/g' -i "$CONFIG_PATH"
|
||||||
sed 's/\(.*\)WLAN\(.*\)=y/\1WLAN\2=n/g' -i "$CONFIG_PATH"
|
sed 's/\(.*\)WLAN\(.*\)=y/\1WLAN\2=n/g' -i "$CONFIG_PATH"
|
||||||
sed 's/\(.*\)DRM\(.*\)=y/\1DRM\2=n/g' -i "$CONFIG_PATH"
|
sed 's/\(.*\)DRM\(.*\)=y/\1DRM\2=n/g' -i "$CONFIG_PATH"
|
||||||
|
sed 's/\(.*\)BTF\(.*\)=y/\1BTF\2=n/g' -i "$CONFIG_PATH"
|
||||||
|
|
||||||
cat kernel-config/virtio.config >> "$CONFIG_PATH"
|
cat kernel-config/virtio.config >> "$CONFIG_PATH"
|
||||||
cat kernel-config/fs.config >> "$CONFIG_PATH"
|
cat kernel-config/fs.config >> "$CONFIG_PATH"
|
||||||
@ -42,6 +45,9 @@ cat kernel-config/net.config >> "$CONFIG_PATH"
|
|||||||
## Add KVM guest support
|
## Add KVM guest support
|
||||||
make -C "$WD"/linux/ kvm_guest.config
|
make -C "$WD"/linux/ kvm_guest.config
|
||||||
|
|
||||||
#make -j$(nproc)
|
make -j$NPROC EXTRA_CFLAGS=-Wno-error=use-after-free
|
||||||
#
|
#make -j$NPROC WERROR=0
|
||||||
#./scripts/extract-vmlinux ./arch/x86_64/boot/bzImage > "$WD"/vmlinux-$KERNEL_VERSION.bin
|
|
||||||
|
cp ./vmlinux "$WD"/vmlinux-$KERNEL_VERSION
|
||||||
|
|
||||||
|
sudo rm -rf "$WD"/linux
|
||||||
|
Loading…
Reference in New Issue
Block a user