1 # Copyright (C) 2012 OpenWrt.org
2 # Copyright (C) 2015-2016 Lantiq Beteiligungs GmbH & Co KG.
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/kernel.mk
10 PKG_NAME
:=ltq-vdsl-vr11-mei
13 PKG_BASE_NAME
:=dsl_cpe_mei
16 UGW_BASENAME
=$(PKG_BASE_NAME
)-ugw_
$(UGW_VERSION
)
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
:=337614473d50ed64de010adaed99a16103e08eea8fc67fe9d6caf155bea33d1d
21 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(UGW_BASENAME
)
22 PKG_LICENSE
:=GPL-2.0 BSD-2-Clause
23 PKG_LICENSE_FILES
:=LICENSE
24 PKG_EXTMOD_SUBDIRS
:=src
28 PKG_BUILD_FLAGS
:=no-mold
30 include $(INCLUDE_DIR
)/package.mk
32 define KernelPackage
/ltq-vdsl-vr11-mei
33 TITLE
:=mei driver for vdsl
35 SUBMENU
:=Network Devices
36 DEPENDS
:=@TARGET_ipq40xx
+kmod-ltq-ifxos
+kmod-vrx518_tc
37 FILES
:=$(PKG_BUILD_DIR
)/src
/drv_mei_cpe.ko
38 AUTOLOAD
:=$(call AutoLoad
,50,drv_mei_cpe
)
41 define KernelPackage
/ltq-vdsl-vr11-mei
/description
42 Lantiq MEI CPE Kernel Module Driver
46 define Package
/ltq-vdsl-vr11-mei-test
49 TITLE
:=Lantiq mei driver
test tool
50 URL
:=http
://www.lantiq.com
/
51 DEPENDS
:=@TARGET_ipq40xx
+kmod-ltq-vdsl-vr11-mei
54 define Package
/ltq-vdsl-vr11-mei-test
/description
55 Userland tool to directly control the mei driver
, this is only needed
56 for
test and development purposes.
60 $(KERNEL_MAKE_FLAGS
) \
63 # ltq-vdsl-app uses a header provided by the MEI driver which has some
65 # Define the conditionals here to have the same view on both sides. If you
66 # change them, you need to change them for the ltq-vdsl-app as well
68 -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE
=1 \
69 -DMEI_SUPPORT_DEBUG_STREAMS
=1 \
70 -DMEI_SUPPORT_OPTIMIZED_FW_DL
=1
73 # -DMEI_SUPPORT_OPTIMIZED_FW_DL=0 \
74 # -DIRQ_POLLING_FORCE=99
77 --enable-debug-logger-support
=no
78 # --enable-debug-stream-support=no
80 # This looks weird, but it's necessary to address the right device.
81 # (pdev->dev.parent instead of pdev->dev)
86 --enable-kernelincl
="$(LINUX_DIR)/include" \
87 --enable-device
=vr11 \
89 --enable-error_print \
90 --enable-ifxos-include
="-I$(STAGING_DIR)/usr/include/ifxos/" \
91 --enable-ifxos-library
="-L$(STAGING_DIR)/usr/lib" \
92 --enable-add_drv_cflags
="$(MEI_DRV_CFLAGS)" \
94 --enable-kernelbuild
="$(LINUX_DIR)" \
95 --enable-drv_test_appl
=yes \
98 define Build
/InstallDev
99 $(INSTALL_DIR
) $(1)/usr
/include/vdsl
100 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_api_intern.h
$(1)/usr
/include/vdsl
/
101 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_api_atm_ptm_intern.h
$(1)/usr
/include/vdsl
/
102 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_interface.h
$(1)/usr
/include/vdsl
103 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_config.h
$(1)/usr
/include/vdsl
/
104 $(CP
) $(PKG_BUILD_DIR
)/src
/cmv_message_format.h
$(1)/usr
/include/vdsl
/
107 $(eval
$(call KernelPackage
,ltq-vdsl-vr11-mei
))
109 define Package
/ltq-vdsl-vr11-mei-test
/install
110 $(INSTALL_DIR
) $(1)/bin
111 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mei_cpe_drv_test
$(1)/bin
114 $(eval
$(call BuildPackage
,ltq-vdsl-vr11-mei-test
))