From: Luis R. Rodriguez Date: Fri, 11 Dec 2009 01:09:57 +0000 (-0800) Subject: Let this thing build without requiring CONFIG_BT=m X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=258eba4959dd0c90260497a753029ec62063688e;p=openwrt%2Fstaging%2Fblogic.git Let this thing build without requiring CONFIG_BT=m The Bluetooth port is separate from the Wireless port so don't require CONFIG_BT=m to build this. We can do the same for wireless but for now this at least lets Ubuntu users build this thing -- Ubuntu currently ships with CONFIG_BT=y from 2.6.27..2.6.31. If we want to let compat-blutooth be available to Ubuntu users on Ubuntu Lucid this config option will need to be revised. The CONFIG_BT just builds net/bluetooth/bluetooth.c, that's all -- so it seems worth it. Fedora is shipping with CONFIG_BT=m , not sure about other distributions. This also fixes some final touches to get the build going again which I missed in my previous patches. ./scripts/drivers-select is likely very busted now. We'll need to fix this. Signed-off-by: Luis R. Rodriguez --- diff --git a/Makefile b/Makefile index 2cccf3853560..55806d78b5d9 100644 --- a/Makefile +++ b/Makefile @@ -17,21 +17,20 @@ ifneq ($(KERNELRELEASE),) include $(M)/$(COMPAT_CONFIG) -NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/net/compat.h $(CFLAGS) +NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/linux/compat.h $(CFLAGS) -obj-y := \ - compat/ \ - net/rfkill/ - net/bluetooth/ \ - net/wireless/ net/mac80211/ +obj-y := compat/ -obj-m += \ - drivers/ssb/ \ - drivers/misc/eeprom/ \ - drivers/net/ \ - drivers/net/usb/ \ - drivers/net/wireless/ \ - drivers/bluetooth/ +obj-$(COMPAT_RFKILL) += net/rfkill/ +obj-$(CONFIG_COMPAT_BT) += net/bluetooth/ +obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/ + +obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ +obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/ drivers/misc/eeprom/ + +obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/ +obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/ +obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/ else diff --git a/config.mk b/config.mk index 6f3faf4a0779..6c73dd1a66d3 100644 --- a/config.mk +++ b/config.mk @@ -15,12 +15,28 @@ else include $(KLIB_BUILD)/.config endif +# These both are needed by compat-wireless || compat-bluetooth so enable them + CONFIG_COMPAT_RFKILL=y + ifeq ($(CONFIG_MAC80211),y) $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular") +else + CONFIG_COMPAT_WIRELESS=y + CONFIG_COMPAT_WIRELESS_MODULES=m + CONFIG_COMPAT_VAR_MODULES=m +# We could technically separate these but not yet, we only have b44 +# Note that we don't intend on backporting network drivers that +# use Multiqueue as that was a pain to backport to kernels older than +# 2.6.27. But -- we could just disable those drivers from kernels +# older than 2.6.27 + CONFIG_COMPAT_NETWORK_MODULES=m endif ifeq ($(CONFIG_BT),y) -$(error "ERROR: your kernel has CONFIG_BT=y, you should have it CONFIG_BT=m if you want to use compat bluetooth.") +# we'll ignore compiling bluetooth +else +CONFIG_COMPAT_BT=y +CONFIG_COMPAT_BLUETOOTH_MODULES=m endif # We will warn when you don't have MQ support or NET_SCHED enabled. diff --git a/patches/98-add-compat-wireless.patch b/patches/98-add-compat-wireless.patch index 84f75d1d0695..05a45cedfa02 100644 --- a/patches/98-add-compat-wireless.patch +++ b/patches/98-add-compat-wireless.patch @@ -24,7 +24,7 @@ added compat.h also for ssb, I forget. /* remove once we remove the wext stuff */ #include #include -+#include ++#include /* diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index 3a9dafbeb9bd..ec5bd1cc0943 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -222,7 +222,7 @@ COMPAT="compat" mkdir -p $COMPAT echo "Copying $GIT_COMPAT_TREE/ files..." cp $GIT_COMPAT_TREE/compat/*.c $COMPAT/ -cp $GIT_COMPAT_TREE/Makefile $COMPAT/ +cp $GIT_COMPAT_TREE/compat/Makefile $COMPAT/ cp $GIT_COMPAT_TREE/include/linux/*.h include/linux/ rm -f $COMPAT/*.mod.c