kbuild: improved modversioning support for external modules
With following patch a second option is enabled to obtain symbol information from a second external module when a external module is build. The recommended approach is to use a common kbuild file but that may be impractical in certain cases. With this patch one can copy over a Module.symvers from one external module to make symbols (and symbol versions) available for another external module. Updated documentation in Documentation/kbuild/modules.txt Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
@@ -39,7 +39,8 @@ include .config
|
||||
include scripts/Kbuild.include
|
||||
include scripts/Makefile.lib
|
||||
|
||||
symverfile := $(objtree)/Module.symvers
|
||||
kernelsymfile := $(objtree)/Module.symvers
|
||||
modulesymfile := $(KBUILD_EXTMOD)/Modules.symvers
|
||||
|
||||
# Step 1), find all modules listed in $(MODVERDIR)/
|
||||
__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
|
||||
@@ -54,7 +55,9 @@ quiet_cmd_modpost = MODPOST
|
||||
cmd_modpost = scripts/mod/modpost \
|
||||
$(if $(CONFIG_MODVERSIONS),-m) \
|
||||
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
|
||||
$(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
|
||||
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
|
||||
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
|
||||
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
|
||||
$(filter-out FORCE,$^)
|
||||
|
||||
.PHONY: __modpost
|
||||
|
Reference in New Issue
Block a user