c2448893026f14fbd1d44f3e19288090f8b018c4
[openwrt/openwrt.git] / package / network / config / ltq-vdsl-vr11-app / Makefile
1 # Copyright (C) 2010 OpenWrt.org
2 # Copyright (C) 2015-2016 Lantiq Beteiligungs GmbH & Co KG.
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=ltq-vdsl-vr11-app
11 PKG_VERSION:=4.23.1
12 PKG_RELEASE:=7
13 PKG_BASE_NAME:=dsl_cpe_control
14
15 UGW_VERSION=8.5.2.10
16 UGW_BASENAME=$(PKG_BASE_NAME)-ugw_$(UGW_VERSION)
17
18 PKG_SOURCE:=$(UGW_BASENAME).tar.bz2
19 PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/$(PKG_BASE_NAME)/-/archive/ugw_$(UGW_VERSION)/
20 PKG_HASH:=d21ec74ca30f7f3893a8aa26d2b74ec319652f6b112832efab6f1274c7e5d1fc
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(UGW_BASENAME)
22 PKG_LICENSE:=BSD-2-Clause
23 PKG_LICENSE_FILES:=LICENSE
24
25 PKG_BUILD_DEPENDS:=ltq-vdsl-vr11
26
27 PKG_FLAGS:=nonshared
28 PKG_FIXUP:=autoreconf
29
30 include $(INCLUDE_DIR)/package.mk
31
32 define Package/ltq-vdsl-vr11-app
33 SECTION:=net
34 CATEGORY:=Network
35 TITLE:=Lantiq VDSL userland tool
36 URL:=http://www.lantiq.com/
37 DEPENDS:=@TARGET_ipq40xx +libpthread +librt +libubox +libubus +ltq-dsl-base +kmod-ltq-vdsl-vr11
38 PROVIDES:=ltq-dsl-app
39 endef
40
41 define Package/ltq-vdsl-vr11-app/description
42 Userland tool needed to control Lantiq VDSL CPE
43 endef
44
45 # ltq-vdsl-vr11-app uses a header provided by the MEI driver which has some
46 # conditionals.
47 #
48 # Define them here with the default values they would get in the MEI driver,
49 # have the same view on both sides.
50 #
51 # If you change them, you need to change them for the ltq-vdsl-vr11-app as well
52 VDSL_APP_CFLAGS = \
53 -DMAX_CLI_PIPES=1 \
54 -DMEI_SUPPORT_DEBUG_STREAMS=1 \
55 -DMEI_SUPPORT_OPTIMIZED_FW_DL=1
56
57 CONFIGURE_ARGS += \
58 --enable-debug-logger-support=no
59
60 CONFIGURE_ARGS += \
61 --enable-vrx \
62 --enable-vrx-device=vr11 \
63 --enable-driver-include="-I$(STAGING_DIR)/usr/include/drv_vdsl_cpe_api" \
64 --enable-device-driver-include="-I$(STAGING_DIR)/usr/include/vdsl/" \
65 --enable-ifxos \
66 --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
67 --enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \
68 --enable-add-appl-cflags="$(VDSL_APP_CFLAGS)" \
69 --enable-debug \
70 --disable-dti
71
72 CONFIGURE_ARGS += \
73 --enable-model=full \
74 --enable-dsl-ceoc=no
75 #CONFIGURE_ARGS += --enable-model=lite
76 #CONFIGURE_ARGS += --enable-model=footprint
77 #CONFIGURE_ARGS += --enable-model=typical
78 #CONFIGURE_ARGS += --enable-model=debug
79
80 define Build/Prepare
81 $(call Build/Prepare/Default)
82 $(CP) ../ltq-vdsl-vr9-app/src/src/dsl_cpe_ubus.c $(PKG_BUILD_DIR)/src/
83 endef
84
85 define Package/ltq-vdsl-vr11-app/install
86 $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl
87 $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/
88 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin/vdsl_cpe_control
89 $(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/
90 endef
91
92 $(eval $(call BuildPackage,ltq-vdsl-vr11-app))