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
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\"" \
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
#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");
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;
}