[adm5120] add board specific UART registration
[openwrt.git] / package / p54 / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=p54
13 PKG_RELEASE:=1
14
15 PKG_FWP54_NAME:=2.7.0.0.arm
16 PKG_FWP54_URL:=http://prism54.org/firmware
17 PKG_FWP54_MD5SUM:=09f9da7ea757173c9de1a0322a1f9782
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define KernelPackage/p54/Default
22 SUBMENU:=Wireless Drivers
23 TITLE:=Prism Wireless Support (mac80211)
24 DEPENDS:=+kmod-mac80211 @BROKEN
25 endef
26
27 define KernelPackage/p54-common
28 $(call KernelPackage/p54/Default)
29 TITLE+= (COMMON)
30 DEPENDS+= @PCI_SUPPORT||USB_SUPPORT
31 FILES:=$(PKG_BUILD_DIR)/p54common.$(LINUX_KMOD_SUFFIX)
32 AUTOLOAD:=$(call AutoLoad,30,p54common)
33 endef
34
35 define KernelPackage/p54-pci
36 $(call KernelPackage/p54/Default)
37 TITLE+= (PCI)
38 DEPENDS+= @PCI_SUPPORT +kmod-p54-common
39 FILES:=$(PKG_BUILD_DIR)/p54pci.$(LINUX_KMOD_SUFFIX)
40 AUTOLOAD:=$(call AutoLoad,31,p54pci)
41 endef
42
43 define KernelPackage/p54-usb
44 $(call KernelPackage/p54/Default)
45 TITLE+= (USB)
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)
49 endef
50
51 define KernelPackage/p54/description
52 Kernel module for Prism54 chipsets (mac80211)
53 endef
54
55 $(STAMP_PREPARED): $(DL_DIR)/$(PKG_FWP54_NAME)
56
57 $(DL_DIR)/$(PKG_FWP54_NAME):
58 $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_FWP54_NAME)" "$(PKG_FWP54_MD5SUM)" $(PKG_FWP54_URL)
59
60 PKG_EXTRA_KCONFIG:= \
61 CONFIG_P54_COMMON=m \
62
63 ifneq ($(CONFIG_PACKAGE_kmod-p54-pci),)
64 PKG_EXTRA_KCONFIG+= CONFIG_P54_PCI=m
65 endif
66 ifneq ($(CONFIG_PACKAGE_kmod-p54-usb),)
67 PKG_EXTRA_KCONFIG+= CONFIG_P54_USB=m
68 endif
69
70 EXTRA_CFLAGS:= \
71 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
72 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
73
74 MAKE_OPTS:= \
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" \
80 $(PKG_EXTRA_KCONFIG)
81
82 ifneq ($(findstring 2.6.23,$(LINUX_VERSION)),)
83 define Build/Prepare
84 mkdir -p $(PKG_BUILD_DIR)
85 $(CP) ./src/* $(PKG_BUILD_DIR)/
86 $(CP) $(DL_DIR)/$(PKG_FWP54_NAME) $(PKG_BUILD_DIR)
87 endef
88
89 define Build/Configure
90 endef
91
92 define Build/Compile
93 $(MAKE) -C "$(LINUX_DIR)" \
94 $(MAKE_OPTS) \
95 modules
96 endef
97 else
98 override CONFIG_PACKAGE_kmod-p54-common=
99 override CONFIG_PACKAGE_kmod-p54-pci=
100 override CONFIG_PACKAGE_kmod-p54-usb=
101 endif
102
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
106 endef
107
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
111 endef
112
113
114 $(eval $(call KernelPackage,p54-common))
115 $(eval $(call KernelPackage,p54-pci))
116 $(eval $(call KernelPackage,p54-usb))
This page took 0.04989 seconds and 5 git commands to generate.