hostapd: Allow rsn_preauth configuration
[openwrt.git] / package / lqdsl / 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:=lqdsl
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_LANTIQ_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/lqdsl
38 SECTION:=sys
39 CATEGORY:=Kernel modules
40 SUBMENU:=Network Devices
41 TITLE:=Lantiq dsl driver
42 URL:=http://www.lantiq.com/
43 MAINTAINER:=Lantiq
44 DEPENDS:=@TARGET_lantiq_xway +kmod-atm
45 FILES:=$(PKG_BUILD_DIR)/src/mei/lantiq_mei.ko \
46 $(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko \
47 $(PKG_BUILD_DIR)/src/mei/lantiq_atm.ko
48 AUTOLOAD:=$(call AutoLoad,50,lantiq_mei drv_dsl_cpe_api lantiq_atm)
49 endef
50
51 define KernelPackage/lqdsl/description
52 Infineon DSL CPE API for Amazon SE, Danube and Vinax.
53
54 This package contains the DSL CPE API driver for Amazon SE & Danube.
55
56 Supported Devices:
57 - Amazon SE
58 - Danube
59 endef
60
61 define KernelPackage/lqdsl/config
62 source "$(SOURCE)/Config.in"
63 endef
64
65 define Download/annex-a
66 FILE:=$(FW_BASE_NAME)_a-$(FW_A_VER).tar.gz
67 URL:=http://mirror2.openwrt.org/sources/
68 MD5SUM:=$(FW_A_MD5)
69 endef
70 $(eval $(call Download,annex-a))
71
72 define Download/annex-b
73 FILE:=$(FW_BASE_NAME)_b-$(FW_B_VER).tar.gz
74 URL:=http://mirror2.openwrt.org/sources/
75 MD5SUM:=$(FW_B_MD5)
76 endef
77 $(eval $(call Download,annex-b))
78
79 IFX_DSL_MAX_DEVICE=1
80 IFX_DSL_LINES_PER_DEVICE=1
81 IFX_DSL_CHANNELS_PER_LINE=1
82
83 CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
84 --with-max-device="$(IFX_DSL_MAX_DEVICE)" \
85 --with-lines-per-device="$(IFX_DSL_LINES_PER_DEVICE)" \
86 --with-channels-per-line="$(IFX_DSL_CHANNELS_PER_LINE)" \
87 --enable-danube \
88 --enable-add-drv-cflags="-DMODULE" \
89 --disable-dsl-delt-static \
90 --disable-adsl-led \
91 --enable-dsl-ceoc \
92 --enable-dsl-pm \
93 --enable-dsl-pm-total \
94 --enable-dsl-pm-history \
95 --enable-dsl-pm-showtime \
96 --enable-dsl-pm-channel-counters \
97 --enable-dsl-pm-datapath-counters \
98 --enable-dsl-pm-line-counters \
99 --enable-dsl-pm-channel-thresholds \
100 --enable-dsl-pm-datapath-thresholds \
101 --enable-dsl-pm-line-thresholds \
102 --enable-dsl-pm-optional-parameters \
103 --enable-linux-26 \
104 --enable-kernelbuild="$(LINUX_DIR)" \
105 ARCH=$(LINUX_KARCH)
106
107 EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0
108
109 ifeq ($(CONFIG_LANTIQ_DSL_DEBUG),y)
110 CONFIGURE_ARGS += \
111 --enable-debug=yes \
112 --enable-debug-prints=yes
113 EXTRA_CFLAGS += -DDEBUG
114 endif
115
116 define Build/Prepare
117 $(PKG_UNPACK)
118 $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/mei/
119 $(CP) ./src/* $(PKG_BUILD_DIR)/src/mei/
120 $(Build/Patch)
121 ifeq ($(CONFIG_LANTIQ_DSL_FIRMWARE),)
122 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(FW_BASE_NAME)_a-$(FW_A_VER).tar.gz
123 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(FW_BASE_NAME)_b-$(FW_B_VER).tar.gz
124 endif
125 endef
126
127 define Build/Configure
128 (cd $(PKG_BUILD_DIR); aclocal && autoconf && automake)
129 $(call Build/Configure/Default)
130 endef
131
132 define Build/Compile
133 cd $(LINUX_DIR); \
134 ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
135 $(MAKE) M=$(PKG_BUILD_DIR)/src/mei/ V=1 modules
136 $(call Build/Compile/Default)
137 endef
138
139 define Build/InstallDev
140 $(INSTALL_DIR) $(1)/usr/include
141 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api.h $(1)/usr/include
142 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_ioctl.h $(1)/usr/include
143 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_adslmib.h $(1)/usr/include
144 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_adslmib_ioctl.h $(1)/usr/include
145 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_g997.h $(1)/usr/include
146 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_types.h $(1)/usr/include
147 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_pm.h $(1)/usr/include
148 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_api_error.h $(1)/usr/include
149 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_danube_ctx.h $(1)/usr/include
150 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_cmv_danube.h $(1)/usr/include
151 endef
152
153 define KernelPackage/lqdsl/install
154 $(INSTALL_DIR) $(1)/lib/firmware/
155 $(CP) $(PKG_BUILD_DIR)/$(FW_BASE_NAME)_$(if $(CONFIG_LANTIQ_ANNEX_A),a_$(FW_A_FILE_VER),b_$(FW_B_FILE_VER)).bin $(1)/lib/firmware/ModemHWE.bin
156 endef
157
158 $(eval $(call KernelPackage,lqdsl))
This page took 0.061207 seconds and 5 git commands to generate.