Commit fae0be61 authored by Ben Hutchings's avatar Ben Hutchings

Merge branch 'module_debug_sig' into 'master'

Fix stripped module signatures if CONFIG_DEBUG_INFO

See merge request kernel-team/linux!5
parents 5d952f89 c33c4372
......@@ -435,6 +435,11 @@ ifeq ($(DEBUG),True)
find $(PACKAGE_DIR) -name '*.ko' | sed 's|$(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/||' | while read module ; do \
$(CROSS_COMPILE)objcopy --add-gnu-debuglink=$(DIR)/$$module $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/$$module || exit; \
done
# stripping the modules removes signatures as well - if automated signing is enabled with
# an ephemeral key, re-do the sign step
+if grep -qs '^CONFIG_MODULE_SIG_ALL=y' $(DIR)/.config; then \
$(MAKE_CLEAN) -C $(DIR) modules_sign INSTALL_MOD_PATH='$(CURDIR)'/$(PACKAGE_DIR); \
fi
endif
cp $(DIR)/.config $(PACKAGE_DIR)/boot/config-$(REAL_VERSION)
cp $(DIR)/System.map $(PACKAGE_DIR)/boot/System.map-$(REAL_VERSION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment