Commit f53f2e10 authored by Tim Gardner's avatar Tim Gardner

UBUNTU: [Debian] Re-sign modules after debug objcopy

BugLink: http://bugs.launchpad.net/bugs/1253155

Adding a GNU debug link to a module ELF destroys the
module signature, so re-sign the module file after the objcopy.

objcopy --add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module $(pkgdir)/$$module;
scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODSECKEY) $(MODPUBKEY) $(pkgdir)/$$module;
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 464a8a56
...@@ -60,6 +60,9 @@ install-%: instfile = $(call custom_override,install_file,$*) ...@@ -60,6 +60,9 @@ install-%: instfile = $(call custom_override,install_file,$*)
install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$* install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
install-%: target_flavour = $* install-%: target_flavour = $*
install-%: dtb_files = $(dtb_files_$*) install-%: dtb_files = $(dtb_files_$*)
install-%: CONFIG_MODULE_SIG_HASH=sha512
install-%: MODSECKEY=$(builddir)/build-$*/signing_key.priv
install-%: MODPUBKEY=$(builddir)/build-$*/signing_key.x509
install-%: checks-% install-%: checks-%
@echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile) @echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile)
dh_testdir dh_testdir
...@@ -218,6 +221,8 @@ ifneq ($(skipdbg),true) ...@@ -218,6 +221,8 @@ ifneq ($(skipdbg),true)
$(CROSS_COMPILE)objcopy \ $(CROSS_COMPILE)objcopy \
--add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module \ --add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module \
$(pkgdir)/$$module; \ $(pkgdir)/$$module; \
scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODSECKEY) $(MODPUBKEY) \
$(pkgdir)/$$module; \
fi; \ fi; \
done done
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/build rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/build
......
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