build: auto copy kernel vermagic

This commit is contained in:
jjm2473 2022-09-07 13:36:41 +08:00
parent 2387d1a6f4
commit cacd0ef198
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@
/package/feeds
/package/openwrt-packages
/*.patch
/.vermagic
key-build*
*.orig
*.rej

View File

@ -106,7 +106,7 @@ define Kernel/Configure/Default
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
}
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | mkhash md5 > $(LINUX_DIR)/.vermagic
[ -f $(TOPDIR)/.vermagic ] && cat $(TOPDIR)/.vermagic > $(LINUX_DIR)/.vermagic || grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | mkhash md5 > $(LINUX_DIR)/.vermagic
endef
define Kernel/Configure/Initramfs