Commit 7c9c02e8 authored by Juan David González Cobas's avatar Juan David González Cobas Committed by Alessandro Rubini

build: add git describe info as modinfo

For traceability purposes, we include commit descriptions
as MODULE_VERSION information in drivers that are deployed
in CERN control system.

Ideally, the commit description should be added to all the
binary blobs installed, but the kernel module is critical
in this connection, as it is crucial to trace back quickly
the whereabouts of installed .ko sources.
parent b87bf2d3
......@@ -6,8 +6,12 @@ export FMC_DRV
KBUILD_EXTRA_SYMBOLS := $(FMC_DRV)/Module.symvers
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
ccflags-y += -I$M/include -I$(FMC_DRV)/include
ccflags-y += $(WR_NIC_CFLAGS)
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
# this is a bad hack. Sometimes we are a submodule, and wr-nic can
# only compile with recent versions, so let the caller disable it
......
......@@ -210,4 +210,5 @@ static void __exit spec_exit(void)
module_init(spec_init);
module_exit(spec_exit);
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL");
......@@ -214,4 +214,5 @@ void __weak wrn_gpio_exit(struct fmc_device *fmc)
{
}
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL");
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