[package] base-files: save the connect time of interfaces in uci state
[openwrt/svn-archive/archive.git] / package / ar7-atm / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=sangam_atm
12
13 ifeq ($(CONFIG_AR7_ATM_FW_VERSION_705),y)
14 PKG_VERSION:=D7.05.01.00
15 PKG_MD5SUM:=42ee465be5cfbe9476fc25deb260d450
16 PKG_RELEASE:=R1
17 PATCH_DIR:=patches-$(PKG_VERSION)
18 endif
19
20 ifeq ($(CONFIG_AR7_ATM_FW_VERSION_704),y)
21 PKG_VERSION:=D7.04.03.00
22 PKG_MD5SUM:=3d76004e46f09e88931f91670cb420ad
23 PKG_RELEASE:=R1
24 PATCH_DIR:=patches-$(PKG_VERSION)
25 endif
26
27 ifeq ($(CONFIG_AR7_ATM_FW_VERSION_703),y)
28 PKG_VERSION:=D7.03.01.00
29 PKG_MD5SUM:=bc6e9c6adb1be25820c7ee661de8ca7d
30 PKG_RELEASE:=R2
31 PATCH_DIR:=patches-D7.04.03.00
32 endif
33
34 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.bz2
35 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
36
37 include $(INCLUDE_DIR)/package.mk
38
39 define KernelPackage/sangam-atm/Default
40 SUBMENU:=Network Devices
41 DEPENDS:=@TARGET_ar7 +kmod-atm
42 TITLE:=AR7 ADSL driver
43 FILES:=$(PKG_BUILD_DIR)/tiatm.ko
44 AUTOLOAD:=$(call AutoLoad,50,tiatm)
45 MENU:=1
46 endef
47
48 define KernelPackage/sangam-atm/config
49 source "$(SOURCE)/Config.in"
50 endef
51
52 define KernelPackage/sangam-atm-annex-a
53 $(call KernelPackage/sangam-atm/Default)
54 TITLE+= (Annex A, ADSL over POTS)
55 endef
56
57 define KernelPackage/sangam-atm-annex-a/description
58 The AR7 ADSL driver for Annex A (ADSL over POTS).
59 endef
60
61 define KernelPackage/sangam-atm-annex-a/config
62 $(call KernelPackage/sangam-atm/config)
63 endef
64
65 define KernelPackage/sangam-atm-annex-b
66 $(call KernelPackage/sangam-atm/Default)
67 TITLE+= (Annex B, ADSL over ISDN)
68 endef
69
70 define KernelPackage/sangam-atm-annex-b/description
71 The AR7 ADSL driver for Annex B (ADSL over ISDN).
72 endef
73
74 define KernelPackage/sangam-atm-annex-a/config
75 $(call KernelPackage/sangam-atm/config)
76 endef
77
78 define Build/Compile
79 $(MAKE) -C "$(LINUX_DIR)" \
80 CROSS_COMPILE="$(TARGET_CROSS)" \
81 ARCH="$(LINUX_KARCH)" \
82 SUBDIRS="$(PKG_BUILD_DIR)" \
83 modules
84 endef
85
86 define KernelPackage/sangam-atm-annex-a/install
87 mkdir -p $(1)/lib/firmware
88 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700mp.bin $(1)/lib/firmware/
89 ln -sf ar0700mp.bin $(1)/lib/firmware/ar0700xx.bin
90 endef
91
92 define KernelPackage/sangam-atm-annex-b/install
93 mkdir -p $(1)/lib/firmware
94 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700db.bin $(1)/lib/firmware/
95 ln -sf ar0700db.bin $(1)/lib/firmware/ar0700xx.bin
96 endef
97
98 $(eval $(call KernelPackage,sangam-atm-annex-a))
99 $(eval $(call KernelPackage,sangam-atm-annex-b))