11f96d744a4dafd131f34c597db519fb2d7bc135
[openwrt/staging/nbd.git] / package / kernel / lantiq / ltq-vdsl-vr11 / Makefile
1 # Copyright (C) 2012 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
11 PKG_VERSION:=4.23.1
12 PKG_RELEASE:=2
13 PKG_BASE_NAME:=dsl_cpe_api
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:=5e8bbab841d67dc16e329d9b3774f6db4189dd1d01f575d0e921ccf2c426dd9f
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(UGW_BASENAME)
22 PKG_LICENSE:=GPL-2.0 BSD-2-Clause
23 PKG_LICENSE_FILES:=LICENSE
24
25 PKG_FIXUP:=autoreconf
26 PKG_BUILD_FLAGS:=no-mold
27
28 include $(INCLUDE_DIR)/package.mk
29
30 # TODO this driver depends on the vrx518 dsl firmware, add this dependency if
31 # that ever gets a compatible license
32 define KernelPackage/ltq-vdsl-vr11
33 TITLE:=vdsl driver
34 SECTION:=sys
35 SUBMENU:=Network Devices
36 DEPENDS:=@TARGET_ipq40xx +kmod-ltq-vdsl-vr11-mei
37 FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko
38 AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api)
39 endef
40
41 define Package/ltq-vdsl-vr11/description
42 This package contains the Lantiq DSL CPE API driver.
43
44 Supported Devices:
45 - VRX500 Family
46 endef
47
48 MAKE_FLAGS += \
49 $(KERNEL_MAKE_FLAGS) \
50 SHELL="$(BASH)"
51
52 CONFIGURE_ARGS += \
53 --enable-add-drv-cflags="" \
54 --enable-add_ext_drv_cflags="-DDSL_DRV_ATM_PTM_INTERFACE_ENABLE=1" \
55 --enable-debug-logger-support=no
56
57 CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
58 --enable-vrx \
59 --enable-vrx-device=vr11 \
60 --enable-ifxos \
61 --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
62 --enable-driver-include="-I$(STAGING_DIR)/usr/include/vdsl" \
63 --enable-linux-26 \
64 --enable-kernelbuild="$(LINUX_DIR)" \
65 --enable-debug-prints=no \
66 ARCH=$(LINUX_KARCH)
67
68 CONFIGURE_ARGS += \
69 --enable-model=full \
70 --enable-dsl-ceoc=no
71 #CONFIGURE_ARGS += --enable-model=lite
72 #CONFIGURE_ARGS += --enable-model=footprint
73 #CONFIGURE_ARGS += --enable-model=typical
74 #CONFIGURE_ARGS += --enable-model=debug
75
76 define Build/InstallDev
77 $(INSTALL_DIR) $(1)/usr/include/drv_vdsl_cpe_api
78 $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe*.h $(1)/usr/include/drv_vdsl_cpe_api/
79 endef
80
81 $(eval $(call KernelPackage,ltq-vdsl-vr11))