Add support for driver-select to enable older kernels
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 11 Jan 2010 18:25:41 +0000 (10:25 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 11 Jan 2010 18:38:16 +0000 (10:38 -0800)
compat-wireless currently works as a whole down to 2.6.25.
The excemption to this is ar9170 which cannot yet be backported
due to the urb anchor poisoning which we haven't figured out
how to back port (not sure if its even possible). Sometimes
though we want to push backports down even further. In those
cases we don't want to have to force ourselves to port
the entire package down but maybe just a single driver.

For that we add support for through the files

enable-old-kernels/enable-2.6.2x.patch

Force the patch to be applied on the driver select
for your driver. We now enable ath5k and ath9k on
2.6.24.

Careful -- if you run driver-select on ath5k or ath9k
make sure to do:

git checkout config.mk
git checkout Makefile
git checkout scripts/gen-compat-autoconf.sh

before commiting something on your git tree if
you are developing. Unless of course you know what
you are doing.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
enable-older-kernels/README [new file with mode: 0644]
enable-older-kernels/enable-2.6.21.patch [new file with mode: 0644]
enable-older-kernels/enable-2.6.22.patch [new file with mode: 0644]
enable-older-kernels/enable-2.6.23.patch [new file with mode: 0644]
enable-older-kernels/enable-2.6.24.patch [new file with mode: 0644]
scripts/driver-select

diff --git a/enable-older-kernels/README b/enable-older-kernels/README
new file mode 100644 (file)
index 0000000..2069ce4
--- /dev/null
@@ -0,0 +1,12 @@
+compat-wireless as a whole aims to always be compiled and used with the
+oldest stable kernel supported by kernel.org. This will be the oldest
+stable kernel on the 2.6. series listed on the kernel.org front page.
+Sometimes we'll go even beyond that.
+
+Backporting compat-wireless involves backporting some subsystems but
+at times we may want to support compiling only certain drivers on older
+kernels since its easier to backport some subsystems. Such is the case
+with PCI drivers. This directly exists to allow developers enable
+compilation of compat-wireless on older drivers using ./scripts/driver-select
+Upon selection of a driver a patch from this directly will be applied to
+allow further compilation of one driver onto even older kernels.
diff --git a/enable-older-kernels/enable-2.6.21.patch b/enable-older-kernels/enable-2.6.21.patch
new file mode 100644 (file)
index 0000000..413ad10
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/config.mk        2010-01-11 10:27:53.000000000 -0800
++++ b/config.mk        2010-01-11 10:32:49.000000000 -0800
+@@ -51,8 +51,8 @@
+ COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
+ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
+-ifdef CONFIG_COMPAT_KERNEL_25
+-$(error "ERROR: compat-wireless by default supports kernels >= 2.6.25, try enabling only one driver though"
++ifdef CONFIG_COMPAT_WIRELESS_21
++$(error "ERROR: compat-wireless for selected driver requires a kernel >= 2.6.21")
+ endif
+ ifeq ($(CONFIG_CFG80211),y)
+diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
+index 6c7cae7..bb2ea6d 100755
+--- a/scripts/gen-compat-autoconf.sh
++++ b/scripts/gen-compat-autoconf.sh
+@@ -11,7 +11,7 @@
+ # This indicates which is the oldest kernel we support
+ # Update this if you are adding support for older kernels.
+-OLDEST_KERNEL_SUPPORTED="2.6.25"
++OLDEST_KERNEL_SUPPORTED="2.6.21"
+ COMPAT_RELEASE="compat-release"
+ KERNEL_RELEASE="git-describe"
+ MULT_DEP_FILE=".compat_pivot_dep"
diff --git a/enable-older-kernels/enable-2.6.22.patch b/enable-older-kernels/enable-2.6.22.patch
new file mode 100644 (file)
index 0000000..0c6643b
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/config.mk        2010-01-11 10:27:53.000000000 -0800
++++ b/config.mk        2010-01-11 10:32:49.000000000 -0800
+@@ -51,8 +51,8 @@
+ COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
+ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
+-ifdef CONFIG_COMPAT_KERNEL_25
+-$(error "ERROR: compat-wireless by default supports kernels >= 2.6.25, try enabling only one driver though"
++ifdef CONFIG_COMPAT_WIRELESS_22
++$(error "ERROR: compat-wireless for selected driver requires a kernel >= 2.6.22")
+ endif
+ ifeq ($(CONFIG_CFG80211),y)
+diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
+index 6c7cae7..bb2ea6d 100755
+--- a/scripts/gen-compat-autoconf.sh
++++ b/scripts/gen-compat-autoconf.sh
+@@ -11,7 +11,7 @@
+ # This indicates which is the oldest kernel we support
+ # Update this if you are adding support for older kernels.
+-OLDEST_KERNEL_SUPPORTED="2.6.25"
++OLDEST_KERNEL_SUPPORTED="2.6.22"
+ COMPAT_RELEASE="compat-release"
+ KERNEL_RELEASE="git-describe"
+ MULT_DEP_FILE=".compat_pivot_dep"
diff --git a/enable-older-kernels/enable-2.6.23.patch b/enable-older-kernels/enable-2.6.23.patch
new file mode 100644 (file)
index 0000000..30ce900
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/config.mk        2010-01-11 10:27:53.000000000 -0800
++++ b/config.mk        2010-01-11 10:32:49.000000000 -0800
+@@ -51,8 +51,8 @@
+ COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
+ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
+-ifdef CONFIG_COMPAT_KERNEL_25
+-$(error "ERROR: compat-wireless by default supports kernels >= 2.6.25, try enabling only one driver though"
++ifdef CONFIG_COMPAT_WIRELESS_23
++$(error "ERROR: compat-wireless for selected driver requires a kernel >= 2.6.23")
+ endif
+ ifeq ($(CONFIG_CFG80211),y)
+diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
+index 6c7cae7..bb2ea6d 100755
+--- a/scripts/gen-compat-autoconf.sh
++++ b/scripts/gen-compat-autoconf.sh
+@@ -11,7 +11,7 @@
+ # This indicates which is the oldest kernel we support
+ # Update this if you are adding support for older kernels.
+-OLDEST_KERNEL_SUPPORTED="2.6.25"
++OLDEST_KERNEL_SUPPORTED="2.6.23"
+ COMPAT_RELEASE="compat-release"
+ KERNEL_RELEASE="git-describe"
+ MULT_DEP_FILE=".compat_pivot_dep"
diff --git a/enable-older-kernels/enable-2.6.24.patch b/enable-older-kernels/enable-2.6.24.patch
new file mode 100644 (file)
index 0000000..9e71d80
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/config.mk        2010-01-11 10:27:53.000000000 -0800
++++ b/config.mk        2010-01-11 10:32:49.000000000 -0800
+@@ -51,8 +51,8 @@
+ COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
+ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
+-ifdef CONFIG_COMPAT_KERNEL_25
+-$(error "ERROR: compat-wireless by default supports kernels >= 2.6.25, try enabling only one driver though"
++ifdef CONFIG_COMPAT_WIRELESS_24
++$(error "ERROR: compat-wireless for selected driver requires a kernel >= 2.6.24")
+ endif
+ ifeq ($(CONFIG_CFG80211),y)
+diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
+index 6c7cae7..bb2ea6d 100755
+--- a/scripts/gen-compat-autoconf.sh
++++ b/scripts/gen-compat-autoconf.sh
+@@ -11,7 +11,7 @@
+ # This indicates which is the oldest kernel we support
+ # Update this if you are adding support for older kernels.
+-OLDEST_KERNEL_SUPPORTED="2.6.25"
++OLDEST_KERNEL_SUPPORTED="2.6.24"
+ COMPAT_RELEASE="compat-release"
+ KERNEL_RELEASE="git-describe"
+ MULT_DEP_FILE=".compat_pivot_dep"
index 0ed7703af078f893ba2f59f473dc0d0e6c20d313..6e2edb1aa3527f6fda408ce71737d46c84b43c63 100755 (executable)
@@ -235,10 +235,12 @@ case $1 in
        ath5k)
                select_driver           CONFIG_ATH_COMMON
                select_ath_driver       CONFIG_ATH5K
+               patch -p1 < enable-older-kernels/enable-2.6.24.patch
                ;;
        ath9k)
                select_driver           CONFIG_ATH_COMMON
                select_ath9k_driver
+               patch -p1 < enable-older-kernels/enable-2.6.24.patch
                ;;
        ar9170)
                select_driver           CONFIG_ATH_COMMON