diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-04-09 09:41:16 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-04-09 09:54:02 +0200 |
commit | 4627b5df69fac65e35429b3f876748a59c1bb47a (patch) | |
tree | 091fb132a736c4486dce807e979c2737be75688e | |
parent | 5c6fe8e850a74d65a94d674c92ee6147a3db92aa (diff) | |
download | upstream-4627b5df69fac65e35429b3f876748a59c1bb47a.tar.gz upstream-4627b5df69fac65e35429b3f876748a59c1bb47a.tar.bz2 upstream-4627b5df69fac65e35429b3f876748a59c1bb47a.zip |
build: move symvers files to kernel build dir
The symvers files of older kernel versions are incompatible with the ones
from 5.4, so changing the kernel version without running make clean was
causing build failures in kernel module packages.
Fix this by moving the directory, ensuring that symvers files get thrown
away with a kernel version change
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | include/kernel.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/kernel.mk b/include/kernel.mk index 02d0949a72..40aa1a5163 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -138,11 +138,13 @@ endif PKG_EXTMOD_SUBDIRS ?= . +PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers + define populate_module_symvers - @mkdir -p $(PKG_INFO_DIR) - cat /dev/null > $(PKG_INFO_DIR)/$(PKG_NAME).symvers; \ + @mkdir -p $(PKG_SYMVERS_DIR) + cat /dev/null > $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers; \ for subdir in $(PKG_EXTMOD_SUBDIRS); do \ - cat $(PKG_INFO_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \ + cat $(PKG_SYMVERS_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \ done endef @@ -154,7 +156,7 @@ define collect_module_symvers grep -F $$$$realdir $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \ done; \ sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \ - mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_INFO_DIR)/$(PKG_NAME).symvers + mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers endef define KernelPackage/hooks |