Commit e7795122 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 ab23167f
......@@ -15,8 +15,10 @@ fmc-y += fmc-sdb.o
fmc-y += fru-parse.o
fmc-y += fmc-dump.o
# The library includes <sdb.h>, si point -I directtly there
ccflags-y += -I$M/include/linux
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
# The library includes <sdb.h>, so point -I directtly there
ccflags-y += -I$M/include/linux -DGIT_VERSION=\"$(GIT_VERSION)\"
fmc-y += ../sdb-lib/access.o
fmc-y += ../sdb-lib/glue.o
......
......@@ -194,4 +194,5 @@ static void fc_exit(void)
module_init(fc_init);
module_exit(fc_exit);
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL");
......@@ -293,4 +293,5 @@ static void fmc_exit(void)
module_init(fmc_init);
module_exit(fmc_exit);
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL");
......@@ -346,4 +346,5 @@ static void ff_exit(void)
module_init(ff_init);
module_exit(ff_exit);
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL and additional rights");
......@@ -98,4 +98,5 @@ static void t_exit(void)
module_init(t_init);
module_exit(t_exit);
MODULE_VERSION(GIT_VERSION);
MODULE_LICENSE("GPL and additional rights"); /* public domain */
......@@ -173,4 +173,5 @@ static void fwe_exit(void)
module_init(fwe_init);
module_exit(fwe_exit);
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