lantiq: Allow PKG_ASLR_PIE for DSL and voice drivers
[oweals/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:=4
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_LICENSE:=GPL-2.0 BSD-2-Clause
23 PKG_LICENSE_FILES:=LICENSE
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define KernelPackage/ltq-vdsl-vr9-mei
28   TITLE:=mei driver for vdsl
29   SECTION:=sys
30   SUBMENU:=Network Devices
31   DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos
32   FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
33   AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
34 endef
35
36 define KernelPackage/ltq-vdsl-vr9-mei/description
37         Lantiq MEI CPE Kernel Module Driver
38 endef
39
40
41 define Package/ltq-vdsl-mei_test
42   SECTION:=net
43   CATEGORY:=Network
44   TITLE:=Lantiq mei driver test tool
45   URL:=http://www.lantiq.com/
46   DEPENDS:=@TARGET_lantiq_xrx200
47 endef
48
49 define Package/ltq-vdsl-mei_test/description
50         Userland tool to directly control the mei driver, this is only needed
51         for test and development purposes.
52 endef
53
54 MAKE_FLAGS += \
55         SHELL="$(BASH)"
56
57 CONFIGURE_ARGS += \
58         --enable-kernelincl="$(LINUX_DIR)/include" \
59         --enable-device=vr9 \
60         --with-max-device=1 \
61         --with-lines-per-device=1 \
62         --enable-debug \
63         --enable-error_print \
64         --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
65         --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
66         --enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1" \
67         --enable-linux-26 \
68         --enable-kernelbuild="$(LINUX_DIR)" \
69         --enable-drv_test_appl=yes \
70         ARCH=$(LINUX_KARCH)
71
72 define Build/InstallDev
73         $(INSTALL_DIR) $(1)/usr/include/vdsl
74         $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_intern.h $(1)/usr/include/vdsl/
75         $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_atm_ptm_intern.h $(1)/usr/include/vdsl/
76         $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_interface.h $(1)/usr/include/vdsl
77         $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_config.h $(1)/usr/include/vdsl/
78         $(CP) $(PKG_BUILD_DIR)/src/cmv_message_format.h $(1)/usr/include/vdsl/
79 endef
80
81 $(eval $(call KernelPackage,ltq-vdsl-vr9-mei))
82
83 define Package/ltq-vdsl-mei_test/install
84         $(INSTALL_DIR) $(1)/bin
85         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin
86 endef
87
88 $(eval $(call BuildPackage,ltq-vdsl-mei_test))