Makefile 2.6 KB

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