96bbc98c706edfb5c919eee86504d732b11ada91
[openwrt/openwrt.git] / package / kernel / lantiq / ltq-vdsl-mei / 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-vr9-mei
11 PKG_VERSION:=1.5.17.6
12 PKG_RELEASE:=3
13
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:=http://mirror2.openwrt.org/sources
18 PKG_HASH:=94f6904364348b7f74087e721968abc28b2564fb9bd8899aa930d36490387662
19 PKG_FIXUP:=autoreconf
20 PKG_FLAGS:=nonshared
21 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
22 PKG_USE_MIPS16:=0
23 PKG_LICENSE:=GPL-2.0 BSD-2-Clause
24 PKG_LICENSE_FILES:=LICENSE
25
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define KernelPackage/ltq-vdsl-vr9-mei
30 TITLE:=mei driver for vdsl
31 SECTION:=sys
32 SUBMENU:=Network Devices
33 DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos
34 FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
35 AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
36 endef
37
38 define KernelPackage/ltq-vdsl-vr9-mei/description
39 Lantiq MEI CPE Kernel Module Driver
40 endef
41
42
43 define Package/ltq-vdsl-mei_test
44 SECTION:=net
45 CATEGORY:=Network
46 TITLE:=Lantiq mei driver test tool
47 URL:=http://www.lantiq.com/
48 DEPENDS:=@TARGET_lantiq_xrx200
49 endef
50
51 define Package/ltq-vdsl-mei_test/description
52 Userland tool to directly control the mei driver, this is only needed
53 for test and development purposes.
54 endef
55
56 MAKE_FLAGS += \
57 SHELL="$(BASH)"
58
59 CONFIGURE_ARGS += \
60 --enable-kernelincl="$(LINUX_DIR)/include" \
61 --enable-device=vr9 \
62 --with-max-device=1 \
63 --with-lines-per-device=1 \
64 --enable-debug \
65 --enable-error_print \
66 --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
67 --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
68 --enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -fno-pic -mlong-calls -O2 -g0" \
69 --enable-linux-26 \
70 --enable-kernelbuild="$(LINUX_DIR)" \
71 --enable-drv_test_appl=yes \
72 ARCH=$(LINUX_KARCH)
73
74 define Build/InstallDev
75 $(INSTALL_DIR) $(1)/usr/include/vdsl
76 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_intern.h $(1)/usr/include/vdsl/
77 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_atm_ptm_intern.h $(1)/usr/include/vdsl/
78 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_interface.h $(1)/usr/include/vdsl
79 $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_config.h $(1)/usr/include/vdsl/
80 $(CP) $(PKG_BUILD_DIR)/src/cmv_message_format.h $(1)/usr/include/vdsl/
81 endef
82
83 $(eval $(call KernelPackage,ltq-vdsl-vr9-mei))
84
85 define Package/ltq-vdsl-mei_test/install
86 $(INSTALL_DIR) $(1)/bin
87 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin
88 endef
89
90 $(eval $(call BuildPackage,ltq-vdsl-mei_test))