Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright (C) 2012 OpenWrt.org
  2. # Copyright (C) 2015 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.4.8.5
  10. PKG_RELEASE:=1
  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_MD5SUM:=78bf61dbc3421123c6716b874a930759
  16. PKG_FIXUP:=autoreconf
  17. PKG_FLAGS:=nonshared
  18. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  19. PKG_USE_MIPS16:=0
  20. include $(INCLUDE_DIR)/package.mk
  21. define KernelPackage/ltq-vdsl-vr9-mei
  22. TITLE:=mei driver for vdsl
  23. SECTION:=sys
  24. SUBMENU:=Network Devices
  25. DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos
  26. FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
  27. AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
  28. endef
  29. define KernelPackage/ltq-vdsl-vr9-mei/description
  30. Lantiq MEI CPE Kernel Module Driver
  31. endef
  32. define Package/ltq-vdsl-mei_test
  33. SECTION:=net
  34. CATEGORY:=Network
  35. TITLE:=Lantiq mei driver test tool
  36. URL:=http://www.lantiq.com/
  37. DEPENDS:=@TARGET_lantiq_xrx200
  38. endef
  39. define Package/ltq-vdsl-mei_test/description
  40. Userland tool to directly control the mei driver, this is only needed
  41. for test and development purposes.
  42. endef
  43. MAKE_FLAGS += \
  44. SHELL="$(BASH)"
  45. CONFIGURE_ARGS += \
  46. --enable-kernelincl="$(LINUX_DIR)/include" \
  47. --enable-device=vr9 \
  48. --with-max-device=1 \
  49. --with-lines-per-device=1 \
  50. --enable-debug \
  51. --enable-error_print \
  52. --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
  53. --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
  54. --enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -fno-pic -mlong-calls -O2 -g0" \
  55. --enable-linux-26 \
  56. --enable-kernelbuild="$(LINUX_DIR)" \
  57. --enable-drv_test_appl=yes \
  58. ARCH=$(LINUX_KARCH)
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include/vdsl
  61. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_intern.h $(1)/usr/include/vdsl/
  62. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_atm_ptm_intern.h $(1)/usr/include/vdsl/
  63. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_interface.h $(1)/usr/include/vdsl
  64. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_config.h $(1)/usr/include/vdsl/
  65. $(CP) $(PKG_BUILD_DIR)/src/cmv_message_format.h $(1)/usr/include/vdsl/
  66. endef
  67. $(eval $(call KernelPackage,ltq-vdsl-vr9-mei))
  68. define Package/ltq-vdsl-mei_test/install
  69. $(INSTALL_DIR) $(1)/bin
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin
  71. endef
  72. $(eval $(call BuildPackage,ltq-vdsl-mei_test))