[openwrt/openwrt] toolchain: kernel-headers: fix check target for external Git trees

LEDE Commits lede-commits at lists.infradead.org
Sat Apr 27 00:16:17 PDT 2024


ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c3372266ba2b809310804f414f1042a51299200d

commit c3372266ba2b809310804f414f1042a51299200d
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Thu Jul 20 15:48:39 2023 +0200

    toolchain: kernel-headers: fix check target for external Git trees
    
    Executing following command currently fails:
    
     $ make toolchain/kernel-headers/{download,check} V=sc FIXUP=1
     ...
     include/kernel-version.mk:11: *** Missing kernel version/hash file for . Please create include/kernel-.  Stop.
    
    So lets fix it by adding the necessary missing KERNEL_PATCHVER variable.
    
    That additional kernel-build.mk include is needed to add another set of
    missing variables:
    
     $ make toolchain/kernel-headers/{download,check} V=sc FIXUP=1
     ...
     Makefile:115: *** ERROR: Unknown pack format for file tmp/dl/.  Stop.
    
    Fixes: 0765466a42f4 ("kernel: split kernel version to dedicated files")
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
    (cherry picked from commit 6b7f1ffbad732c5e1818f9387c02dda109c2748b)
---
 toolchain/kernel-headers/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index cd25f8a6de..6942006325 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -24,7 +24,10 @@ ifneq ($(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
   PKG_SOURCE_VERSION:=$(call qstrip,$(CONFIG_KERNEL_GIT_REF))
   PKG_MIRROR_HASH:=$(call qstrip,$(CONFIG_KERNEL_GIT_MIRROR_HASH))
 ifdef CHECK
+  PLATFORM_DIR:=$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(BOARD) $(TOPDIR)/target/linux/$(BOARD)))
+  include $(PLATFORM_DIR)/Makefile
   include $(INCLUDE_DIR)/kernel-version.mk
+  include $(INCLUDE_DIR)/kernel-build.mk
   PKG_VERSION:=$(LINUX_VERSION)
 else
   PKG_SOURCE:=$(LINUX_SOURCE)




More information about the lede-commits mailing list