2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_FWP54_NAME
:=2.7.0.0.arm
16 PKG_FWP54_URL
:=http
://prism54.org
/firmware
17 PKG_FWP54_MD5SUM
:=09f9da7ea757173c9de1a0322a1f9782
19 include $(INCLUDE_DIR
)/package.mk
21 # XXX: remove @!TARGET_* later when we have PCI & USB support properly detected on all targets
23 define KernelPackage
/p54
/Default
24 SUBMENU
:=Wireless Drivers
25 TITLE
:=Prism Wireless Support
(mac80211
)
26 DEPENDS
:=+kmod-mac80211 @
!TARGET_ar7 @
!TARGET_atheros @
!TARGET_uml
29 define KernelPackage
/p54-common
30 $(call KernelPackage
/p54
/Default
)
32 DEPENDS
+= @PCI_SUPPORT||USB_SUPPORT
33 FILES
:=$(PKG_BUILD_DIR
)/p54common.
$(LINUX_KMOD_SUFFIX
)
34 AUTOLOAD
:=$(call AutoLoad
,30,p54common
)
37 define KernelPackage
/p54-pci
38 $(call KernelPackage
/p54
/Default
)
40 DEPENDS
+= @PCI_SUPPORT
+kmod-p54-common
41 FILES
:=$(PKG_BUILD_DIR
)/p54pci.
$(LINUX_KMOD_SUFFIX
)
42 AUTOLOAD
:=$(call AutoLoad
,31,p54pci
)
45 define KernelPackage
/p54-usb
46 $(call KernelPackage
/p54
/Default
)
48 DEPENDS
+= @USB_SUPPORT
+kmod-usb-core
+kmod-p54-common
49 FILES
:=$(PKG_BUILD_DIR
)/p54usb.
$(LINUX_KMOD_SUFFIX
)
50 AUTOLOAD
:=$(call AutoLoad
,31,p54usb
)
53 define KernelPackage
/p54
/description
54 Kernel module for Prism54 chipsets
(mac80211
)
57 $(STAMP_PREPARED
): $(DL_DIR
)/$(PKG_FWP54_NAME
)
59 $(DL_DIR
)/$(PKG_FWP54_NAME
):
60 $(SCRIPT_DIR
)/download.pl
"$(DL_DIR)" "$(PKG_FWP54_NAME)" "$(PKG_FWP54_MD5SUM)" $(PKG_FWP54_URL
)
65 ifneq ($(CONFIG_PACKAGE_kmod-p54-pci
),)
66 PKG_EXTRA_KCONFIG
+= CONFIG_P54_PCI
=m
68 ifneq ($(CONFIG_PACKAGE_kmod-p54-usb
),)
69 PKG_EXTRA_KCONFIG
+= CONFIG_P54_USB
=m
73 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=m
,%,$(filter %=m
,$(PKG_EXTRA_KCONFIG
)))) \
74 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=y
,%,$(filter %=y
,$(PKG_EXTRA_KCONFIG
)))) \
77 ARCH
="$(LINUX_KARCH)" \
78 CROSS_COMPILE
="$(TARGET_CROSS)" \
79 SUBDIRS
="$(PKG_BUILD_DIR)" \
80 EXTRA_CFLAGS
="$(EXTRA_CFLAGS)" \
81 LINUXINCLUDE
="-I$(STAGING_DIR)/usr/include/mac80211 -I$(LINUX_DIR)/include -include linux/autoconf.h" \
84 ifneq ($(findstring 2.6.23,$(LINUX_VERSION
)),)
86 mkdir
-p
$(PKG_BUILD_DIR
)
87 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
88 $(CP
) $(DL_DIR
)/$(PKG_FWP54_NAME
) $(PKG_BUILD_DIR
)
91 define Build
/Configure
95 $(MAKE
) -C
"$(LINUX_DIR)" \
100 override CONFIG_PACKAGE_kmod-p54-common
=
101 override CONFIG_PACKAGE_kmod-p54-pci
=
102 override CONFIG_PACKAGE_kmod-p54-usb
=
105 define KernelPackage
/p54-pci
/install
106 $(INSTALL_DIR
) $(1)/lib
/firmware
107 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/2.7.0.0.arm
$(1)/lib
/firmware
/isl3886
110 define KernelPackage
/p54-usb
/install
111 $(INSTALL_DIR
) $(1)/lib
/firmware
112 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/2.7.0.0.arm
$(1)/lib
/firmware
/isl3886
116 $(eval
$(call KernelPackage
,p54-common
))
117 $(eval
$(call KernelPackage
,p54-pci
))
118 $(eval
$(call KernelPackage
,p54-usb
))