Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347097
b: refs/heads/master
c: d890f51
h: refs/heads/master
i:
  347095: 7beba75
v: v3
  • Loading branch information
Josh Boyer authored and Rusty Russell committed Dec 14, 2012
1 parent 8a4ec96 commit 296e878
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71eac70257b469bd43737232bce0fd960caebee1
refs/heads/master: d890f510c8e45aaf33b8737f211ea05aecb8b460
6 changes: 6 additions & 0 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,12 @@ _modinst_post: _modinst_
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
$(call cmd,depmod)

ifeq ($(CONFIG_MODULE_SIG), y)
PHONY += modules_sign
modules_sign:
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
endif

else # CONFIG_MODULES

# Modules not configured
Expand Down
32 changes: 32 additions & 0 deletions trunk/scripts/Makefile.modsign
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ==========================================================================
# Signing modules
# ==========================================================================

PHONY := __modsign
__modsign:

include scripts/Kbuild.include

__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))

PHONY += $(modules)
__modsign: $(modules)
@:

quiet_cmd_sign_ko = SIGN [M] $(2)/$(notdir $@)
cmd_sign_ko = $(mod_sign_cmd) $(2)/$(notdir $@)

# Modules built outside the kernel source tree go into extra by default
INSTALL_MOD_DIR ?= extra
ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))

modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))

$(modules):
$(call cmd,sign_ko,$(MODLIB)/$(modinst_dir))

# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable se we can use it in if_changed and friends.

.PHONY: $(PHONY)

0 comments on commit 296e878

Please sign in to comment.