1 # Copyright (C) 2012 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
6 include $(TOPDIR)/rules.mk
7 include $(INCLUDE_DIR)/kernel.mk
9 PKG_NAME:=ltq-vdsl-vr9-mei
13 PKG_BASE_NAME:=drv_mei_cpe
14 PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
16 PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_BASE_NAME)/archive/v$(PKG_VERSION)
17 PKG_MD5SUM:=30570722dc7f19ff2f0228838043f2a2
19 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
21 PKG_CHECK_FORMAT_SECURITY:=0
23 include $(INCLUDE_DIR)/package.mk
25 define KernelPackage/ltq-vdsl-vr9-mei
26 TITLE:=mei driver for vdsl
28 SUBMENU:=Network Devices
29 DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos
30 FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
31 AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
34 define KernelPackage/ltq-vdsl-vr9-mei/description
35 Lantiq MEI CPE Kernel Module Driver
39 define Package/ltq-vdsl-mei_test
42 TITLE:=Lantiq mei driver test tool
43 URL:=http://www.lantiq.com/
44 DEPENDS:=@TARGET_lantiq_xrx200
47 define Package/ltq-vdsl-mei_test/description
48 Userland tool to directly control the mei driver, this is only needed
49 for test and development purposes.
53 #DEBUG=-DDEBUG_PRINT=1
59 --enable-kernelincl="$(LINUX_DIR)/include" \
62 --with-lines-per-device=1 \
64 --enable-error_print \
65 --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
66 --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
67 --enable-add_drv_cflags="$(DEBUG) -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -DMEI_EXPORT_INTERNAL_API=1 -DMEI_SUPPORT_DSM=0 -fno-pic -mno-abicalls -mlong-calls -O2 -g0" \
69 --enable-kernelbuild="$(LINUX_DIR)" \
70 --enable-drv_test_appl=yes \
73 define Build/InstallDev
74 $(INSTALL_DIR) $(1)/usr/include/vdsl
75 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_intern.h $(1)/usr/include/vdsl/
76 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_atm_ptm_intern.h $(1)/usr/include/vdsl/
77 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_interface.h $(1)/usr/include/vdsl
78 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_config.h $(1)/usr/include/vdsl/
79 $(CP) $(PKG_BUILD_DIR)/src/cmv_message_format.h $(1)/usr/include/vdsl/
82 $(eval $(call KernelPackage,ltq-vdsl-vr9-mei))
84 define Package/ltq-vdsl-mei_test/install
85 $(INSTALL_DIR) $(1)/bin
86 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin
89 $(eval $(call BuildPackage,ltq-vdsl-mei_test))