Compile-Informationen hinzugef?gt. kernel2.6
authorFlorian Pose <fp@igh-essen.com>
Fri, 16 Dec 2005 14:16:54 +0000
branchkernel2.6
changeset 34 c1e8d61fa395
parent 33 f4171b8aadf8
child 35 ed834aa98f89
Compile-Informationen hinzugef?gt.
drivers/8139too.c
drivers/Makefile
drivers/ec_module.c
--- a/drivers/8139too.c	Fri Dec 16 12:04:59 2005 +0000
+++ b/drivers/8139too.c	Fri Dec 16 14:16:54 2005 +0000
@@ -138,6 +138,13 @@
 #include "ec_master.h"
 #include "ec_module.h"
 
+#define LITERAL(X) #X
+#define STRINGIFY(X) LITERAL(X)
+
+#define COMPILE_INFO "Revision " STRINGIFY(EC_REV) \
+                     ", compiled by " STRINGIFY(EC_USER) \
+                     " at " STRINGIFY(EC_DATE)
+
 /* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
 
 #define RTL8139_DRIVER_NAME   DRV_NAME " Fast Ethernet driver " DRV_VERSION
@@ -642,10 +649,14 @@
 	unsigned long fifo_copy_timeout;
 };
 
+/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
+
 MODULE_AUTHOR ("Wilhelm Hagemeister <hm@igh-essen.com>, Florian Pose <fp@igh-essen.com>");
 MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver with EtherCAT functionality");
 MODULE_LICENSE("GPL");
-MODULE_VERSION(DRV_VERSION);
+MODULE_VERSION(COMPILE_INFO);
+
+/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
 
 module_param(multicast_filter_limit, int, 0);
 module_param_array(media, int, NULL, 0);
@@ -2962,7 +2973,7 @@
 
         /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
 
-        printk(KERN_INFO "Initializing RTL8139-EtherCAT module.\n");
+        printk(KERN_INFO "Initializing RTL8139-EtherCAT module. %s\n", COMPILE_INFO);
 
         EtherCAT_device_init(&rtl_ecat_dev);
         rtl_ecat_dev.isr = rtl8139_interrupt;
--- a/drivers/Makefile	Fri Dec 16 12:04:59 2005 +0000
+++ b/drivers/Makefile	Fri Dec 16 14:16:54 2005 +0000
@@ -20,6 +20,11 @@
 ecat-master-objs := ec_module.o ec_master.o ec_device.o \
 			ec_slave.o ec_command.o ec_types.o
 
+REV = `svnversion $(src)`
+DATE = `date`
+
+EXTRA_CFLAGS = -DEC_REV="$(REV)" -DEC_USER="$(USER)" -DEC_DATE="$(DATE)"
+
 #----------------------------------------------------------------
 
 else
@@ -27,16 +32,13 @@
 #----------------------------------------------------------------
 # Default-Abschnitt
 
-CONFIG_FILE = ../ethercat.conf
-PWD = $(shell pwd)
-
-include $(CONFIG_FILE)
+include ../ethercat.conf
 
 default:
-	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+	$(MAKE) -C $(KERNELDIR) M=`pwd` modules
 
 clean:
-	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
 
 #----------------------------------------------------------------
 
--- a/drivers/ec_module.c	Fri Dec 16 12:04:59 2005 +0000
+++ b/drivers/ec_module.c	Fri Dec 16 14:16:54 2005 +0000
@@ -26,7 +26,14 @@
 
 /******************************************************************************/
 
-#define SUBVERSION_ID "$Id$"
+#define LITERAL(X) #X
+#define STRINGIFY(X) LITERAL(X)
+
+#define COMPILE_INFO "Revision " STRINGIFY(EC_REV) \
+                     ", compiled by " STRINGIFY(EC_USER) \
+                     " at " STRINGIFY(EC_DATE)
+
+/******************************************************************************/
 
 int ecat_master_count = 1;
 EtherCAT_master_t *ecat_masters = NULL;
@@ -37,7 +44,7 @@
 MODULE_AUTHOR ("Wilhelm Hagemeister <hm@igh-essen.com>, Florian Pose <fp@igh-essen.com>");
 MODULE_DESCRIPTION ("EtherCAT master driver module");
 MODULE_LICENSE("GPL");
-MODULE_VERSION(SUBVERSION_ID);
+MODULE_VERSION(COMPILE_INFO);
 
 module_param(ecat_master_count, int, 1);
 MODULE_PARM_DESC(ecat_master_count, "Number of EtherCAT master to initialize.");
@@ -66,7 +73,7 @@
 {
   unsigned int i;
 
-  printk(KERN_ERR "EtherCAT: Master driver %s\n", SUBVERSION_ID);
+  printk(KERN_ERR "EtherCAT: Master driver, %s\n", COMPILE_INFO);
 
   if (ecat_master_count < 1)
   {