generic: rtl8366: rename vlanmc and vlan4k related structures an functions
[openwrt.git] / package / ifxmips-dsl-api / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # ralph / blogic
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=ifxmips-dsl-api
13 PKG_BASE_NAME:=drv_dsl_cpe_api_danube
14 PKG_VERSION:=3.24.4.4
15 PKG_RELEASE:=2
16 PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
17 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/drv_dsl_cpe_api-$(PKG_VERSION)
18 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
19 PKG_MD5SUM:=c45bc531c1ed2ac80f68fb986b63bb87
20
21 ifeq ($(DUMP),)
22 STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_IFXMIPS_DSL_' $(TOPDIR)/.config | md5s)
23 endif
24
25 FW_BASE_NAME:=dsl_danube_firmware_adsl
26 FW_A_VER:=02.04.04.00.00.01
27 FW_B_VER:=02.04.01.07.00.02
28 FW_A_FILE_VER:=244001
29 FW_B_FILE_VER:=241702
30 FW_A_MD5:=f717db3067a0049a26e233ab11238710
31 FW_B_MD5:=349de7cd20368f4ac9b7e8322114a512
32
33 PATCH_DIR ?= ./patches$(if $(wildcard ./patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
34
35 include $(INCLUDE_DIR)/package.mk
36
37 define KernelPackage/ifxmips-dsl-api
38 SECTION:=sys
39 CATEGORY:=Kernel modules
40 SUBMENU:=Network Devices
41 TITLE:=DSL CPE API driver
42 URL:=http://www.infineon.com/
43 MAINTAINER:=Infineon Technologies AG / Lantiq / John Crispin <blogic@openwrt.org>
44 DEPENDS:=@TARGET_ifxmips +kmod-atm @BROKEN
45 FILES:=$(PKG_BUILD_DIR)/src/mei/ifxmips_mei.$(LINUX_KMOD_SUFFIX) \
46 $(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.$(LINUX_KMOD_SUFFIX) \
47 $(PKG_BUILD_DIR)/src/mei/ifxmips_atm.$(LINUX_KMOD_SUFFIX)
48 AUTOLOAD:=$(call AutoLoad,50,ifxmips_mei drv_dsl_cpe_api ifxmips_atm)
49 MENU:=1
50 endef
51
52 define KernelPackage/ifxmips-dsl-api/description
53 Infineon DSL CPE API for Amazon SE, Danube and Vinax.
54
55 This package contains the DSL CPE API driver for Amazon SE & Danube.
56
57 Supported Devices:
58 - Amazon SE
59 - Danube
60
61 This package was kindly contributed to openwrt by Infineon/Lantiq
62 endef
63
64 define KernelPackage/ifxmips-dsl-api/config
65 source "$(SOURCE)/Config.in"
66 endef
67
68 ifeq ($(CONFIG_IFXMIPS_DSL_FIRMWARE),y)
69 FW_FILE:=arcor_A800_452CPW_FW_1.02.206(20081201).bin
70 define Download/firmware
71 URL:=http://www.arcor.de/hilfe/files/pdf/
72 FILE=$(FW_FILE)
73 MD5SUM:=19d9af4e369287a0f0abaed415cdac10
74 endef
75 $(eval $(call Download,firmware))
76
77 else
78
79 define Download/annex-a
80 FILE:=$(FW_BASE_NAME)_a-$(FW_A_VER).tar.gz
81 URL:=http://mirror2.openwrt.org/sources/
82 MD5SUM:=$(FW_A_MD5)
83 endef
84 $(eval $(call Download,annex-a))
85
86 define Download/annex-b
87 FILE:=$(FW_BASE_NAME)_b-$(FW_B_VER).tar.gz
88 URL:=http://mirror2.openwrt.org/sources/
89 MD5SUM:=$(FW_B_MD5)
90 endef
91 $(eval $(call Download,annex-b))
92 endif
93
94 IFX_DSL_MAX_DEVICE=1
95 IFX_DSL_LINES_PER_DEVICE=1
96 IFX_DSL_CHANNELS_PER_LINE=1
97
98 CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
99 --with-max-device="$(IFX_DSL_MAX_DEVICE)" \
100 --with-lines-per-device="$(IFX_DSL_LINES_PER_DEVICE)" \
101 --with-channels-per-line="$(IFX_DSL_CHANNELS_PER_LINE)" \
102 --enable-danube \
103 --enable-add-drv-cflags="-DMODULE" \
104 --disable-dsl-delt-static \
105 --disable-adsl-led \
106 --enable-dsl-ceoc \
107 --enable-dsl-pm \
108 --enable-dsl-pm-total \
109 --enable-dsl-pm-history \
110 --enable-dsl-pm-showtime \
111 --enable-dsl-pm-channel-counters \
112 --enable-dsl-pm-datapath-counters \
113 --enable-dsl-pm-line-counters \
114 --enable-dsl-pm-channel-thresholds \
115 --enable-dsl-pm-datapath-thresholds \
116 --enable-dsl-pm-line-thresholds \
117 --enable-dsl-pm-optional-parameters \
118 --enable-linux-26 \
119 --enable-kernelbuild="$(LINUX_DIR)" \
120 ARCH=$(LINUX_KARCH)
121
122 EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0
123
124 ifeq ($(CONFIG_IFXMIPS_DSL_DEBUG),y)
125 CONFIGURE_ARGS += \
126 --enable-debug=yes \
127 --enable-debug-prints=yes
128 EXTRA_CFLAGS += -DDEBUG
129 endif
130
131 define Build/Prepare
132 $(PKG_UNPACK)
133 $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/mei/
134 $(CP) ./src/* $(PKG_BUILD_DIR)/src/mei/
135 $(Build/Patch)
136 ifeq ($(CONFIG_IFXMIPS_DSL_FIRMWARE),)
137 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(FW_BASE_NAME)_a-$(FW_A_VER).tar.gz
138 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(FW_BASE_NAME)_b-$(FW_B_VER).tar.gz
139 endif
140 endef
141
142 define Build/Configure
143 (cd $(PKG_BUILD_DIR); aclocal && autoconf && automake)
144 $(call Build/Configure/Default)
145 endef
146
147 define Build/Compile
148 cd $(LINUX_DIR); \
149 ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
150 $(MAKE) M=$(PKG_BUILD_DIR)/src/mei/ V=1 modules
151 $(call Build/Compile/Default)
152 endef
153
154 define Build/InstallDev
155 $(INSTALL_DIR) $(1)/usr/include
156 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api.h $(1)/usr/include
157 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_ioctl.h $(1)/usr/include
158 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_adslmib.h $(1)/usr/include
159 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_adslmib_ioctl.h $(1)/usr/include
160 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_g997.h $(1)/usr/include
161 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_types.h $(1)/usr/include
162 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_pm.h $(1)/usr/include
163 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_error.h $(1)/usr/include
164 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_danube_ctx.h $(1)/usr/include
165 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_cmv_danube.h $(1)/usr/include
166 endef
167
168 define KernelPackage/ifxmips-dsl-api/install
169 $(INSTALL_DIR) $(1)/lib/firmware/
170 ifeq ($(CONFIG_IFXMIPS_DSL_FIRMWARE),y)
171 $(PLATFORM_DIR)/extract.sh $(DL_DIR) '$(FW_FILE)'
172 $(CP) $(DL_DIR)/dsl_$(if $(CONFIG_IFXMIPS_ANNEX_A),a,b).bin $(1)/lib/firmware/ModemHWE.bin
173 else
174 $(CP) $(PKG_BUILD_DIR)/$(FW_BASE_NAME)_$(if $(CONFIG_IFXMIPS_ANNEX_A),a_$(FW_A_FILE_VER),b_$(FW_B_FILE_VER)).bin $(1)/lib/firmware/ModemHWE.bin
175 endif
176 endef
177
178 $(eval $(call KernelPackage,ifxmips-dsl-api))
This page took 0.053634 seconds and 5 git commands to generate.