commit 4cb21c9961c4b1ead73ade2e9c0c932e6f96c0bf
parent d0af3f2af01db24930bc0a24fc782788d7f5efce
Author: parazyd <parazyd@dyne.org>
Date: Sat, 21 Nov 2020 16:01:36 +0100
Support automatic patching of the kernel source tree before building.
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/config.mk b/config.mk
@@ -18,6 +18,10 @@ ROOTCREDENTIALS = root:uwu
# Linux kernel version
KERNEL_SRC = linux-5.8.18
+# Path to a kernel patch to apply in the mainline source tree.
+# Safe to leave unset.
+KERNEL_PATCH =
+
# Alpine Linux version
ALPINE_MAJ = 3.12
ALPINE_VER = 3.12.1
diff --git a/kernel.mk b/kernel.mk
@@ -23,6 +23,9 @@ $(KERNEL_SRC): $(KERNEL_TAR) $(KERNEL_SIG)
gpg --no-default-keyring --keyring=./verification_keyring.gpg \
--verify $(KERNEL_SIG)
tar xf $(KERNEL_SRC).tar
+ifneq ($(KERNEL_PATCH),)
+ ( cd $(KERNEL_SRC) && patch -p1 < $(KERNEL_PATCH) )
+endif
$(KERNEL_CFG): $(KERNEL_SRC)
cp -f uwu_pizero_defconfig $(KERNEL_SRC)/arch/arm/configs/