2 # Copyright (C) 2009 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
12 PKG_NAME
:=ifxmips-dsl-api
13 PKG_BASE_NAME
:=drv_dsl_cpe_api_danube
15 PKG_SOURCE
:=$(PKG_BASE_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/drv_dsl_cpe_api-
$(PKG_VERSION
)
17 PKG_SOURCE_URL
:=http
://mirror2.openwrt.org
/sources
/
18 PKG_MD5SUM
:=c45bc531c1ed2ac80f68fb986b63bb87
20 FW_BASE_NAME
:=dsl_danube_firmware_adsl
21 FW_A_VER
:=02.04.04.00.00.01
22 FW_B_VER
:=02.04.01.07.00.02
25 FW_A_MD5
:=f717db3067a0049a26e233ab11238710
26 FW_B_MD5
:=349de7cd20368f4ac9b7e8322114a512
28 include $(INCLUDE_DIR
)/package.mk
30 define KernelPackage
/ifxmips-dsl-api
32 CATEGORY
:=Kernel modules
33 SUBMENU
:=Network Devices
34 TITLE
:=DSL CPE API driver
35 URL
:=http
://www.infineon.com
/
36 MAINTAINER
:=Infineon Technologies AG
/ Lantiq
/ blogic@openwrt.org
37 DEPENDS
:=@TARGET_ifxmips @BROKEN
38 FILES
:=$(PKG_BUILD_DIR
)/src
/mei
/ifxmips_mei.
$(LINUX_KMOD_SUFFIX
) \
39 $(PKG_BUILD_DIR
)/src
/drv_dsl_cpe_api.
$(LINUX_KMOD_SUFFIX
) \
40 $(PKG_BUILD_DIR
)/src
/mei
/ifxmips_atm.
$(LINUX_KMOD_SUFFIX
)
41 AUTOLOAD
:=$(call AutoLoad
,50,ifxmips_mei drv_dsl_cpe_api ifxmips_atm
)
44 define KernelPackage
/ifxmips-dsl-api
/description
45 Infineon DSL CPE API for Amazon SE
, Danube and Vinax.
47 This package contains the DSL CPE API driver for Amazon SE
& Danube.
53 This package was kindly contributed to openwrt by Infineon
/Lantiq
56 define KernelPackage
/ifxmips-dsl-api
/config
57 source
"$(SOURCE)/Config.in"
60 ifeq ($(CONFIG_IFXMIPS_DSL_FIRMWARE
),y
)
61 FW_FILE
:=arcor_A800_452CPW_FW_1.02
.206(20081201).bin
62 define Download
/firmware
63 URL
:=http
://www.arcor.de
/hilfe
/files
/pdf
/
65 MD5SUM
:=19d9af4e369287a0f0abaed415cdac10
67 $(eval
$(call Download
,firmware
))
71 define Download
/annex-a
72 FILE
:=$(FW_BASE_NAME
)_a-
$(FW_A_VER
).
tar.gz
73 URL
:=http
://mirror2.openwrt.org
/sources
/
76 $(eval
$(call Download
,annex-a
))
78 define Download
/annex-b
79 FILE
:=$(FW_BASE_NAME
)_b-
$(FW_B_VER
).
tar.gz
80 URL
:=http
://mirror2.openwrt.org
/sources
/
83 $(eval
$(call Download
,annex-b
))
87 IFX_DSL_LINES_PER_DEVICE
=1
88 IFX_DSL_CHANNELS_PER_LINE
=1
90 CONFIGURE_ARGS
+= --enable-kernel-include
="$(LINUX_DIR)/include" \
91 --with-max-device
="$(IFX_DSL_MAX_DEVICE)" \
92 --with-lines-per-device
="$(IFX_DSL_LINES_PER_DEVICE)" \
93 --with-channels-per-line
="$(IFX_DSL_CHANNELS_PER_LINE)" \
95 --enable-add-drv-cflags
="-DMODULE" \
96 --disable-dsl-delt-static \
100 --enable-dsl-pm-total \
101 --enable-dsl-pm-history \
102 --enable-dsl-pm-showtime \
103 --enable-dsl-pm-channel-counters \
104 --enable-dsl-pm-datapath-counters \
105 --enable-dsl-pm-line-counters \
106 --enable-dsl-pm-channel-thresholds \
107 --enable-dsl-pm-datapath-thresholds \
108 --enable-dsl-pm-line-thresholds \
109 --enable-dsl-pm-optional-parameters \
111 --enable-kernelbuild
="$(LINUX_DIR)" \
114 EXTRA_CFLAGS
= -fno-pic
-mno-abicalls
-mlong-calls
-G
0
116 ifeq ($(CONFIG_IFXMIPS_DSL_DEBUG
),y
)
119 --enable-debug-prints
=yes
120 EXTRA_CFLAGS
+= -DDEBUG
125 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/src
/mei
/
126 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/src
/mei
/
128 ifeq ($(CONFIG_IFXMIPS_DSL_FIRMWARE
),)
129 $(TAR
) -C
$(PKG_BUILD_DIR
) -xzf
$(DL_DIR
)/$(FW_BASE_NAME
)_a-
$(FW_A_VER
).
tar.gz
130 $(TAR
) -C
$(PKG_BUILD_DIR
) -xzf
$(DL_DIR
)/$(FW_BASE_NAME
)_b-
$(FW_B_VER
).
tar.gz
134 define Build
/Configure
135 (cd
$(PKG_BUILD_DIR
); aclocal
&& autoconf
&& automake
)
136 $(call Build
/Configure
/Default
)
141 ARCH
=mips CROSS_COMPILE
="$(KERNEL_CROSS)" \
142 $(MAKE
) M
=$(PKG_BUILD_DIR
)/src
/mei
/ V
=1 modules
143 $(call Build
/Compile
/Default
)
146 define 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
160 define KernelPackage
/ifxmips-dsl-api
/install
161 $(INSTALL_DIR
) $(1)/lib
/firmware
/
162 ifeq ($(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
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
170 $(eval
$(call KernelPackage
,ifxmips-dsl-api
))