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
12 PKG_RELEASE
:=$(AUTORELEASE
)
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
29 include $(INCLUDE_DIR
)/package.mk
31 define KernelPackage
/ltq-vdsl-vr11-mei
32 TITLE
:=mei driver for vdsl
34 SUBMENU
:=Network Devices
35 DEPENDS
:=@TARGET_ipq40xx
+kmod-ltq-ifxos
+kmod-vrx518_tc
36 FILES
:=$(PKG_BUILD_DIR
)/src
/drv_mei_cpe.ko
37 AUTOLOAD
:=$(call AutoLoad
,50,drv_mei_cpe
)
40 define KernelPackage
/ltq-vdsl-vr11-mei
/description
41 Lantiq MEI CPE Kernel Module Driver
45 define Package
/ltq-vdsl-vr11-mei-test
48 TITLE
:=Lantiq mei driver
test tool
49 URL
:=http
://www.lantiq.com
/
50 DEPENDS
:=@TARGET_ipq40xx
+kmod-ltq-vdsl-vr11-mei
53 define Package
/ltq-vdsl-vr11-mei-test
/description
54 Userland tool to directly control the mei driver
, this is only needed
55 for
test and development purposes.
59 $(KERNEL_MAKE_FLAGS
) \
62 # ltq-vdsl-app uses a header provided by the MEI driver which has some
64 # Define the conditionals here to have the same view on both sides. If you
65 # change them, you need to change them for the ltq-vdsl-app as well
67 -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE
=1 \
68 -DMEI_SUPPORT_DEBUG_STREAMS
=1 \
69 -DMEI_SUPPORT_OPTIMIZED_FW_DL
=1
72 # -DMEI_SUPPORT_OPTIMIZED_FW_DL=0 \
73 # -DIRQ_POLLING_FORCE=99
76 --enable-debug-logger-support
=no
77 # --enable-debug-stream-support=no
79 # This looks weird, but it's necessary to address the right device.
80 # (pdev->dev.parent instead of pdev->dev)
85 --enable-kernelincl
="$(LINUX_DIR)/include" \
86 --enable-device
=vr11 \
88 --enable-error_print \
89 --enable-ifxos-include
="-I$(STAGING_DIR)/usr/include/ifxos/" \
90 --enable-ifxos-library
="-L$(STAGING_DIR)/usr/lib" \
91 --enable-add_drv_cflags
="$(MEI_DRV_CFLAGS)" \
93 --enable-kernelbuild
="$(LINUX_DIR)" \
94 --enable-drv_test_appl
=yes \
97 define Build
/InstallDev
98 $(INSTALL_DIR
) $(1)/usr
/include/vdsl
99 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_api_intern.h
$(1)/usr
/include/vdsl
/
100 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_api_atm_ptm_intern.h
$(1)/usr
/include/vdsl
/
101 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_interface.h
$(1)/usr
/include/vdsl
102 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_config.h
$(1)/usr
/include/vdsl
/
103 $(CP
) $(PKG_BUILD_DIR
)/src
/cmv_message_format.h
$(1)/usr
/include/vdsl
/
106 $(eval
$(call KernelPackage
,ltq-vdsl-vr11-mei
))
108 define Package
/ltq-vdsl-vr11-mei-test
/install
109 $(INSTALL_DIR
) $(1)/bin
110 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mei_cpe_drv_test
$(1)/bin
113 $(eval
$(call BuildPackage
,ltq-vdsl-vr11-mei-test
))