source: branches/backfire/package/ifxmips-dsl-api/Makefile @ 21549

Last change on this file since 21549 was 21549, checked in by nico, 7 years ago

[backfire] merge r21547 - add PKG_RELEASE var to packages lacking one

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