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-vr9-mei
14 PKG_BASE_NAME
:=drv_mei_cpe
15 PKG_SOURCE
:=$(PKG_BASE_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_BASE_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_URL
:=@OPENWRT
18 PKG_HASH
:=94f6904364348b7f74087e721968abc28b2564fb9bd8899aa930d36490387662
21 PKG_MAINTAINER
:=John Crispin
<john@phrozen.org
>
22 PKG_LICENSE
:=GPL-2.0 BSD-2-Clause
23 PKG_LICENSE_FILES
:=LICENSE
24 PKG_EXTMOD_SUBDIRS
:=src
26 include $(INCLUDE_DIR
)/package.mk
28 define KernelPackage
/ltq-vdsl-vr9-mei
29 TITLE
:=mei driver for vdsl
31 SUBMENU
:=Network Devices
32 DEPENDS
:=@TARGET_lantiq_xrx200
+kmod-ltq-ifxos
+kmod-ltq-vectoring
33 FILES
:=$(PKG_BUILD_DIR
)/src
/drv_mei_cpe.ko
34 AUTOLOAD
:=$(call AutoLoad
,50,drv_mei_cpe
)
37 define KernelPackage
/ltq-vdsl-vr9-mei
/description
38 Lantiq MEI CPE Kernel Module Driver
42 define Package
/ltq-vdsl-mei-test
45 TITLE
:=Lantiq mei driver
test tool
46 URL
:=http
://www.lantiq.com
/
47 DEPENDS
:=@TARGET_lantiq_xrx200
50 define Package
/ltq-vdsl-mei-test
/description
51 Userland tool to directly control the mei driver
, this is only needed
52 for
test and development purposes.
56 $(KERNEL_MAKE_FLAGS
) \
59 # ltq-vdsl-app uses a header provided by the MEI driver which has some
61 # Define the conditionals here to have the same view on both sides. If you
62 # change them, you need to change them for the ltq-vdsl-app as well
64 -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE
=1 \
65 -DMEI_SUPPORT_DEBUG_STREAMS
=1 \
66 -DMEI_SUPPORT_OPTIMIZED_FW_DL
=1
69 --enable-kernelincl
="$(LINUX_DIR)/include" \
72 --with-lines-per-device
=1 \
74 --enable-error_print \
75 --enable-ifxos-include
="-I$(STAGING_DIR)/usr/include/ifxos/" \
76 --enable-ifxos-library
="-L$(STAGING_DIR)/usr/lib" \
77 --enable-add_drv_cflags
="$(MEI_DRV_CFLAGS)" \
79 --enable-kernelbuild
="$(LINUX_DIR)" \
80 --enable-drv_test_appl
=yes \
83 define Build
/InstallDev
84 $(INSTALL_DIR
) $(1)/usr
/include/vdsl
85 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_api_intern.h
$(1)/usr
/include/vdsl
/
86 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_api_atm_ptm_intern.h
$(1)/usr
/include/vdsl
/
87 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_interface.h
$(1)/usr
/include/vdsl
88 $(CP
) $(PKG_BUILD_DIR
)/src
/drv_mei_cpe_config.h
$(1)/usr
/include/vdsl
/
89 $(CP
) $(PKG_BUILD_DIR
)/src
/cmv_message_format.h
$(1)/usr
/include/vdsl
/
92 $(eval
$(call KernelPackage
,ltq-vdsl-vr9-mei
))
94 define Package
/ltq-vdsl-mei-test
/install
95 $(INSTALL_DIR
) $(1)/bin
96 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/mei_cpe_drv_test
$(1)/bin
99 $(eval
$(call BuildPackage
,ltq-vdsl-mei-test
))