Skip to content

Commit 25ff08a

Browse files
Torsten Hilbrichmasahir0y
authored andcommitted
kbuild: Fix signing issue for external modules
When running the sign script the kernel is within the source directory of external modules. This caused issues when the kernel uses relative paths, like: make[5]: Entering directory '/build/client/devel/kernel/work/linux-2.6' make[6]: Entering directory '/build/client/devel/addmodules/vtx/work/vtx' INSTALL /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko SIGN /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko /bin/sh: 1: scripts/sign-file: not found DEPMOD /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+ Working around it by using absolute pathes here. Fixes: 13b2548 ("kbuild: change working directory to external module directory with M=") Signed-off-by: Torsten Hilbrich <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 3b7f793 commit 25ff08a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/Makefile.modinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ else
105105
sig-key := $(CONFIG_MODULE_SIG_KEY)
106106
endif
107107
quiet_cmd_sign = SIGN $@
108-
cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) "$(sig-key)" certs/signing_key.x509 $@ \
108+
cmd_sign = $(objtree)/scripts/sign-file $(CONFIG_MODULE_SIG_HASH) "$(sig-key)" $(objtree)/certs/signing_key.x509 $@ \
109109
$(if $(KBUILD_EXTMOD),|| true)
110110

111111
ifeq ($(sign-only),)

0 commit comments

Comments
 (0)