2 # Copyright (C) 2007 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 define KernelPackage
/p54
/Default
22 SUBMENU
:=Wireless Drivers
23 TITLE
:=Prism Wireless Support
(mac80211
)
24 DEPENDS
:=+kmod-mac80211 @
!TARGET_atheros @
!TARGET_uml
27 define KernelPackage
/p54-common
28 $(call KernelPackage
/p54
/Default
)
30 DEPENDS
+= @PCI_SUPPORT||USB_SUPPORT
31 FILES
:=$(PKG_BUILD_DIR
)/p54common.
$(LINUX_KMOD_SUFFIX
)
32 AUTOLOAD
:=$(call AutoLoad
,30,p54common
)
35 define KernelPackage
/p54-pci
36 $(call KernelPackage
/p54
/Default
)
38 DEPENDS
+= @PCI_SUPPORT
+kmod-p54-common
39 FILES
:=$(PKG_BUILD_DIR
)/p54pci.
$(LINUX_KMOD_SUFFIX
)
40 AUTOLOAD
:=$(call AutoLoad
,31,p54pci
)
43 define KernelPackage
/p54-usb
44 $(call KernelPackage
/p54
/Default
)
46 DEPENDS
+= @USB_SUPPORT
+kmod-usb-core
+kmod-p54-common
47 FILES
:=$(PKG_BUILD_DIR
)/p54usb.
$(LINUX_KMOD_SUFFIX
)
48 AUTOLOAD
:=$(call AutoLoad
,31,p54usb
)
51 define KernelPackage
/p54
/description
52 Kernel module for Prism54 chipsets
(mac80211
)
55 $(STAMP_PREPARED
): $(DL_DIR
)/$(PKG_FWP54_NAME
)
57 $(DL_DIR
)/$(PKG_FWP54_NAME
):
58 $(SCRIPT_DIR
)/download.pl
"$(DL_DIR)" "$(PKG_FWP54_NAME)" "$(PKG_FWP54_MD5SUM)" $(PKG_FWP54_URL
)
63 ifneq ($(CONFIG_PACKAGE_kmod-p54-pci
),)
64 PKG_EXTRA_KCONFIG
+= CONFIG_P54_PCI
=m
66 ifneq ($(CONFIG_PACKAGE_kmod-p54-usb
),)
67 PKG_EXTRA_KCONFIG
+= CONFIG_P54_USB
=m
71 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=m
,%,$(filter %=m
,$(PKG_EXTRA_KCONFIG
)))) \
72 $(patsubst CONFIG_
%, -DCONFIG_
%=1, $(patsubst %=y
,%,$(filter %=y
,$(PKG_EXTRA_KCONFIG
)))) \
75 ARCH
="$(LINUX_KARCH)" \
76 CROSS_COMPILE
="$(TARGET_CROSS)" \
77 SUBDIRS
="$(PKG_BUILD_DIR)" \
78 EXTRA_CFLAGS
="$(EXTRA_CFLAGS)" \
79 LINUXINCLUDE
="-I$(STAGING_DIR)/usr/include/mac80211 -I$(LINUX_DIR)/include -include linux/autoconf.h" \
82 ifneq ($(findstring 2.6.23,$(LINUX_VERSION
)),)
84 mkdir
-p
$(PKG_BUILD_DIR
)
85 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
86 $(CP
) $(DL_DIR
)/$(PKG_FWP54_NAME
) $(PKG_BUILD_DIR
)
89 define Build
/Configure
93 $(MAKE
) -C
"$(LINUX_DIR)" \
98 override CONFIG_PACKAGE_kmod-p54-common
=
99 override CONFIG_PACKAGE_kmod-p54-pci
=
100 override CONFIG_PACKAGE_kmod-p54-usb
=
103 define KernelPackage
/p54-pci
/install
104 $(INSTALL_DIR
) $(1)/lib
/firmware
105 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/2.7.0.0.arm
$(1)/lib
/firmware
/isl3886
108 define KernelPackage
/p54-usb
/install
109 $(INSTALL_DIR
) $(1)/lib
/firmware
110 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/2.7.0.0.arm
$(1)/lib
/firmware
/isl3886
114 $(eval
$(call KernelPackage
,p54-common
))
115 $(eval
$(call KernelPackage
,p54-pci
))
116 $(eval
$(call KernelPackage
,p54-usb
))