compat-wireless: enable compilation of ath9k on >= 2.6.24
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 25 Aug 2010 23:10:22 +0000 (16:10 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 25 Aug 2010 23:36:23 +0000 (16:36 -0700)
commit3913cbf0709ed63239bf2b1cce2ea63e140b5c93
treecdc1e2367712b7b5ff14889e89d3182c38faa5a3
parent1d39e2de3f056ff7e751f7dd4f87be52411421d1
compat-wireless: enable compilation of ath9k on >= 2.6.24

Re-enabling 2.6.23 requires a little bit of more work:

mcgrof@tux ~/devel/compat-wireless-2.6 (git::linux-2.6.36.y)$ make V=1 KLIB=/lib/modules/2.6.23.17-dirty/build KLIB_BUILD=/lib/modules/2.6.23.17-dirty/build
make -C /lib/modules/2.6.23.17-dirty/build M=/home/mcgrof/devel/compat-wireless-2.6 modules
make[1]: Entering directory `/home/mcgrof/linux-2.6-allstable'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo "  ERROR: Kernel configuration is invalid."; \
echo "         include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo "         Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /home/mcgrof/devel/compat-wireless-2.6/.tmp_versions
rm -f /home/mcgrof/devel/compat-wireless-2.6/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/mcgrof/devel/compat-wireless-2.6
make -f scripts/Makefile.build obj=/home/mcgrof/devel/compat-wireless-2.6/compat
  gcc -Wp,-MD,/home/mcgrof/devel/compat-wireless-2.6/compat/.main.o.d -I/home/mcgrof/devel/compat-wireless-2.6/include/ -include /home/mcgrof/devel/compat-wireless-2.6/include/linux/compat-2.6.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2  -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args   -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2  -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args   -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign   -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(main)"  -D"KBUILD_MODNAME=KBUILD_STR(compat)" -c -o /home/mcgrof/devel/compat-wireless-2.6/compat/main.o /home/mcgrof/devel/compat-wireless-2.6/compat/main.c
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:8:2: error: #error "You need a COMPAT_BASE_TREE"
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:12:2: error: #error "You need a COMPAT_BASE_TREE_VERSION"
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:16:2: error: #error "You need a COMPAT_VERSION"
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:19: error: ‘COMPAT_BASE_TREE’ undeclared here (not in a function)
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:20: error: ‘COMPAT_BASE_TREE_VERSION’ undeclared here (not in a function)
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:21: error: ‘COMPAT_VERSION’ undeclared here (not in a function)
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c: In function ‘compat_init’:
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:41: error: expected ‘)’ before ‘COMPAT_PROJECT’
/home/mcgrof/devel/compat-wireless-2.6/compat/main.c:45: error: expected ‘)’ before ‘COMPAT_BASE_TREE’
make[3]: *** [/home/mcgrof/devel/compat-wireless-2.6/compat/main.o] Error 1
make[2]: *** [/home/mcgrof/devel/compat-wireless-2.6/compat] Error 2
make[1]: *** [_module_/home/mcgrof/devel/compat-wireless-2.6] Error 2
make[1]: Leaving directory `/home/mcgrof/linux-2.6-allstable'
make: *** [modules] Error 2

So we need to figure out why this:

CFLAGS += \
        -DCOMPAT_BASE_TREE="\"$(shell cat compat_base_tree)\"" \
        -DCOMPAT_BASE_TREE_VERSION="\"$(shell cat compat_base_tree_version)\"" \
        -DCOMPAT_PROJECT="\"Compat-wireless\"" \
        -DCOMPAT_VERSION="\"$(shell cat compat_version)\""

is not being picked up on 2.6.23 and/or work our way around it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
config.mk
enable-older-kernels/enable-2.6.23.patch
enable-older-kernels/enable-2.6.24.patch
scripts/driver-select
scripts/gen-compat-autoconf.sh