Commit 3a731d20 authored by Adam Wujek's avatar Adam Wujek

kernel: add versions of used submodules to the kernel module

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 952d547d
KBUILD_EXTRA_SYMBOLS := $(FMC_BUS_ABS)/kernel/Module.symvers
# For this CSM_VERSION, please see ohwr.org/csm documentation
ifdef CONFIG_CSM_VERSION
ccflags-y += -D"CERN_SUPER_MODULE=MODULE_VERSION(\"$(CONFIG_CSM_VERSION)\")"
else
ccflags-y += -DCERN_SUPER_MODULE=""
# add versions of supermodule. It is useful when spec-sw is included as sub-module
# of a bigger project that we want to track
ifdef CONFIG_SUPER_REPO
ifdef CONFIG_SUPER_REPO_VERSION
SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\");
endif
endif
# add versions of used submodules
SUBMODULE_VERSIONS += MODULE_INFO(version_fmc_bus,\"$(FMC_BUS_VERSION)\");
ccflags-y += -DADDITIONAL_VERSIONS="$(SUBMODULE_VERSIONS)"
# The library includes <sdb.h>, so point -I directtly there
# include our header before to avoid conflicts with the kernel
......
......@@ -13,6 +13,9 @@ FMC_BUS_ABS ?= $(abspath $(FMC_BUS) )
GIT_VERSION = $(shell git describe --dirty --long --tags)
export GIT_VERSION
FMC_BUS_VERSION ?= $(shell cd $(FMC_BUS_ABS); git describe --always --dirty --long --tags)
export FMC_BUS_VERSION
all modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) FMC_BUS_ABS=$(FMC_BUS_ABS) modules
......
......@@ -314,4 +314,4 @@ module_exit(spec_exit);
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL");
CERN_SUPER_MODULE;
ADDITIONAL_VERSIONS;
......@@ -226,4 +226,4 @@ void __weak wrn_gpio_exit(struct fmc_device *fmc)
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL");
CERN_SUPER_MODULE;
ADDITIONAL_VERSIONS;
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