bcm43xx-mac80211 fixes: * make build depends on in-kernel mac80211 support * rework kconfig hack
SVN-Revision: 8544
This commit is contained in:
parent
c19dbc7cde
commit
437ad838dd
1 changed files with 40 additions and 24 deletions
|
@ -15,43 +15,59 @@ PKG_RELEASE:=1
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
ifeq ($(DUMP),)
|
||||||
# This horrible, horrible hack is because I can't work out ow to add
|
include $(LINUX_DIR)/.config
|
||||||
# CONFIG_* definitions to a kernel config from an external module dir.
|
endif
|
||||||
# It should come from a proper configuration based on the Kconfig in the src
|
|
||||||
# directory.
|
|
||||||
MAKE_CONFIGS=CONFIG_BCM43XX_MAC80211=m CONFIG_BCM43XX_MAC80211_PCI=y \
|
|
||||||
CONFIG_BCM43XX_MAC80211_DEBUG=y CONFIG_BCM43XX_MAC80211_DMA=y \
|
|
||||||
CONFIG_BCM43XX_MAC80211_PIO=y CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y
|
|
||||||
|
|
||||||
BUILDFLAGS+=$(patsubst CONFIG_%, -DCONFIG_%, $(MAKE_CONFIGS))
|
|
||||||
|
|
||||||
define KernelPackage/bcm43xx-mac80211
|
define KernelPackage/bcm43xx-mac80211
|
||||||
|
SUBMENU:=Wireless Drivers
|
||||||
TITLE:=Broadcom 43xx wireless support
|
TITLE:=Broadcom 43xx wireless support
|
||||||
DESCRIPTION:=Kernel module for Broadcom 43xx wireless support (mac80211)
|
DESCRIPTION:=Kernel module for Broadcom 43xx wireless support (mac80211)
|
||||||
VERSION:=$(PKG_RELEASE)+$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)
|
VERSION:=$(PKG_RELEASE)+$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)
|
||||||
DEPENDS:=@LINUX_2_6_BRCM47XX +kmod-mac80211
|
DEPENDS:=@LINUX_2_6_BRCM47XX +kmod-mac80211
|
||||||
SUBMENU:=Wireless Drivers
|
KCONFIG:=CONFIG_MAC80211
|
||||||
ifneq ($(KERNEL_PATCHVER),2.6.21)
|
FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
|
||||||
# AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
|
# AUTOLOAD:=$(call AutoLoad,30,bcm43xx-mac80211)
|
||||||
FILES:=$(PKG_BUILD_DIR)/bcm43xx-mac80211.$(LINUX_KMOD_SUFFIX)
|
|
||||||
endif
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_MAC80211),)
|
||||||
|
|
||||||
|
PKG_EXTRA_KCONFIG:= \
|
||||||
|
CONFIG_BCM43XX_MAC80211=m \
|
||||||
|
CONFIG_BCM43XX_MAC80211_PCI=y \
|
||||||
|
CONFIG_BCM43XX_MAC80211_DEBUG=y \
|
||||||
|
CONFIG_BCM43XX_MAC80211_DMA=y \
|
||||||
|
CONFIG_BCM43XX_MAC80211_PIO=y \
|
||||||
|
CONFIG_BCM43XX_MAC80211_DMA_AND_PIO_MODE=y \
|
||||||
|
|
||||||
|
PKG_EXTRA_CFLAGS:= \
|
||||||
|
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||||
|
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
|
||||||
|
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
|
||||||
|
|
||||||
|
define Build/Compile/it
|
||||||
|
$(MAKE) -C "$(LINUX_DIR)" \
|
||||||
|
ARCH="$(LINUX_KARCH)" \
|
||||||
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
|
SUBDIRS="$(PKG_BUILD_DIR)" \
|
||||||
|
$(PKG_EXTRA_KCONFIG) \
|
||||||
|
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \
|
||||||
|
V="$(V)" \
|
||||||
|
modules
|
||||||
|
endef
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
mkdir -p $(PKG_BUILD_DIR)
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
$(CP) ./src/bcm43xx/* $(PKG_BUILD_DIR)/
|
$(CP) ./src/bcm43xx/* $(PKG_BUILD_DIR)/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(KERNEL_PATCHVER),2.6.21)
|
define Build/Configure
|
||||||
define Build/Compile
|
endef
|
||||||
$(MAKE) $(MAKE_CONFIGS) -C "$(LINUX_DIR)" \
|
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
define Build/Compile
|
||||||
ARCH="$(LINUX_KARCH)" \
|
$(call Build/Compile/it)
|
||||||
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
endef
|
||||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
|
||||||
modules
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,bcm43xx-mac80211))
|
$(eval $(call KernelPackage,bcm43xx-mac80211))
|
||||||
|
|
Loading…
Reference in a new issue