]> git.openfabrics.org - ~emulex/tmp/compat/.git/commitdiff
compat: add COMPAT_BASE tag
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Thu, 17 May 2012 02:29:24 +0000 (19:29 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Thu, 17 May 2012 02:30:36 +0000 (19:30 -0700)
I'm going to start adding tags to compat.git. This tag will
also be printed upon loading of the compat module. This is
useful to annotating what release of compat.git was used
exactly.

Moving forward the goal will be to try to add a tag only
once a full version of linux-next.git with a respective
date tag from that release has been addressed for backporting.

Right now the only consumer of compat.git that I am aware of
is compat-wireless (soon to be renamed to compat-drivers) so
what this means in practice is I will only add a tag to
compat.git once ckmake is used to verify compilation against
all supported kernels. This means there are two tasks when
backporting:

  * compat.git work
  * compat-wireless.git work

The compat.git work will likely be finished first than the
compat-wireless.git work. Older compat.git versions should
work with newer versions of tags from compat-wireless.git,
however, I may still add tags to compat.git to annotate
that that release (even if no changes were made) has also
been used and tested.

Every single release of compat.git and compat-wireless.git
that has a tag means that that tag has been tested with
ckmake to cross compile against all supported kernels.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
Makefile
compat/main.c

index 8775294ca6a6faa9d31f2065fd1ad97d2d57548f..05a7d7250ecaa5365e0b4f0dc0c635573cc1252e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@ export COMPAT_BASE_TREE := "linux-next.git"
 export COMPAT_BASE_TREE_VERSION := "next-20100517"
 export COMPAT_VERSION := $(shell git describe)
 
+# This is used to annotate what version of
+# compat.git was used.
+export COMPAT_BASE := $(shell git describe)
+
 # to check config and compat autoconf
 export COMPAT_CONFIG=$(PWD)/.config
 export COMPAT_AUTOCONF=$(PWD)/include/linux/compat_autoconf.h
@@ -33,6 +37,7 @@ else
 NOSTDINC_FLAGS := -I$(M)/include/ \
        -include $(M)/include/linux/compat-2.6.h \
        $(CFLAGS) \
+       -DCOMPAT_BASE="\"$(COMPAT_BASE)\"" \
        -DCOMPAT_BASE_TREE="\"$(COMPAT_BASE_TREE)\"" \
        -DCOMPAT_BASE_TREE_VERSION="\"$(COMPAT_BASE_TREE_VERSION)\"" \
        -DCOMPAT_PROJECT="\"Generic kernel\"" \
index e04cc88a7c06999ac686f46a4f865760af8687b5..9141858ad23a5e2ef59f8df643b659093a4d2b6b 100644 (file)
@@ -4,6 +4,10 @@ MODULE_AUTHOR("Luis R. Rodriguez");
 MODULE_DESCRIPTION("Kernel compatibility module");
 MODULE_LICENSE("GPL");
 
+#ifndef COMPAT_BASE
+#error "You need a COMPAT_BASE"
+#endif
+
 #ifndef COMPAT_BASE_TREE
 #error "You need a COMPAT_BASE_TREE"
 #endif
@@ -16,10 +20,15 @@ MODULE_LICENSE("GPL");
 #error "You need a COMPAT_VERSION"
 #endif
 
+static char *compat_base = COMPAT_BASE;
 static char *compat_base_tree = COMPAT_BASE_TREE;
 static char *compat_base_tree_version = COMPAT_BASE_TREE_VERSION;
 static char *compat_version = COMPAT_VERSION;
 
+module_param(compat_base, charp, 0400);
+MODULE_PARM_DESC(compat_base_tree,
+                "The upstream verion of compat.git used");
+
 module_param(compat_base_tree, charp, 0400);
 MODULE_PARM_DESC(compat_base_tree,
                 "The upstream tree used as base for this backport");
@@ -52,6 +61,8 @@ static int __init compat_init(void)
        printk(KERN_INFO "Backport based on "
               COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION
               "\n");
+       printk(KERN_INFO "compat.git: "
+              COMPAT_BASE_TREE "\n");
 
         return 0;
 }