imagebuilder: clean KDIR_TMP before building
[openwrt/openwrt.git] / include / kernel-version.mk
index a6a3d18b442b4b0b3e3e5fcd57ac3d657ed97c5e..1edb01df278571cdcfc527d461fc0976f55cf682 100644 (file)
@@ -6,11 +6,12 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .159
-LINUX_VERSION-5.10 = .81
+KERNEL_DETAILS_FILE=$(INCLUDE_DIR)/kernel-$(KERNEL_PATCHVER)
+ifeq ($(wildcard $(KERNEL_DETAILS_FILE)),)
+  $(error Missing kernel version/hash file for $(KERNEL_PATCHVER). Please create $(KERNEL_DETAILS_FILE))
+endif
 
-LINUX_KERNEL_HASH-5.4.159 = d718325f4eab325dce4f82b88418f68ba130864118229539541331e0a4478643
-LINUX_KERNEL_HASH-5.10.81 = a2e1686132c4598c0adfdf52acbf1ab4bb327b2398badef346a0eff849da5adb
+include $(KERNEL_DETAILS_FILE)
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))