diff mbox series

[14/20,WIP] build: update quilt references to use $(LINUX_SRC_DIR)

Message ID 73ef6e218d0835160597976ab499e92afa373c76.1700010293.git.ehem+openwrt@m5p.com
State Not Applicable
Delegated to: Petr Štetiar
Headers show
Series Kernel build fixups, split object directory off (partial WIP) | expand

Commit Message

Elliott Mitchell Nov. 12, 2023, 6:51 a.m. UTC
Quilt is for handling patches, therefore needs to modify
$(LINUX_SRC_DIR).

Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
---
 include/kernel-build.mk    |  2 +-
 include/kernel-defaults.mk |  2 +-
 include/quilt.mk           | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 5b332258f8..19284caa94 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -10,7 +10,7 @@  ifneq ($(DUMP),1)
 endif
 
 KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
-STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
+STAMP_PREPARED=$(LINUX_SRC_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
 STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
 include $(INCLUDE_DIR)/download.mk
 include $(INCLUDE_DIR)/quilt.mk
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 10cd83712a..b7a3f484e1 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -25,7 +25,7 @@  ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
 	$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
     ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
 	$(Kernel/Patch)
-	$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
+	$(if $(QUILT),touch $(LINUX_SRC_DIR)/.quilt_used)
     endif
   endef
 else
diff --git a/include/quilt.mk b/include/quilt.mk
index a58390f6c5..ac37672c95 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -3,7 +3,7 @@ 
 # Copyright (C) 2007-2020 OpenWrt.org
 
 ifeq ($(TARGET_BUILD),1)
-  PKG_BUILD_DIR:=$(LINUX_DIR)
+  PKG_BUILD_DIR:=$(LINUX_SRC_DIR)
 endif
 
 ifneq ($(filter host-refresh refresh,$(MAKECMDGOALS)),)
@@ -92,17 +92,17 @@  endef
 
 kernel_files=$(foreach fdir,$(GENERIC_FILES_DIR) $(FILES_DIR),$(fdir)/.)
 define Kernel/Patch/Default
-	$(if $(QUILT),rm -rf $(LINUX_DIR)/patches; mkdir -p $(LINUX_DIR)/patches)
-	$(if $(kernel_files),$(CP) $(kernel_files) $(LINUX_DIR)/)
-	find $(LINUX_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
+	$(if $(QUILT),rm -rf $(LINUX_SRC_DIR)/patches; mkdir -p $(LINUX_SRC_DIR)/patches)
+	$(if $(kernel_files),$(CP) $(kernel_files) $(LINUX_SRC_DIR)/)
+	find $(LINUX_SRC_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
 	if [ -d $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER)) ]; then \
 		echo "generic patches directory is present. please move your patches to the pending directory" ; \
 		exit 1; \
 	fi
-	$(call PatchDir,$(LINUX_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
-	$(call PatchDir,$(LINUX_DIR),$(GENERIC_PATCH_DIR),generic/)
-	$(call PatchDir,$(LINUX_DIR),$(GENERIC_HACK_DIR),generic-hack/)
-	$(call PatchDir,$(LINUX_DIR),$(PATCH_DIR),platform/)
+	$(call PatchDir,$(LINUX_SRC_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
+	$(call PatchDir,$(LINUX_SRC_DIR),$(GENERIC_PATCH_DIR),generic/)
+	$(call PatchDir,$(LINUX_SRC_DIR),$(GENERIC_HACK_DIR),generic-hack/)
+	$(call PatchDir,$(LINUX_SRC_DIR),$(PATCH_DIR),platform/)
 endef
 
 define Quilt/RefreshDir