Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Copyright (C) 2011 OpenWrt.org
  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. PKG_NAME:=ltq-adsl
  10. PKG_VERSION:=3.24.4.4
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=drv_dsl_cpe_api_danube-$(PKG_VERSION).tar.gz
  13. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-dsl-$(BUILD_VARIANT)/drv_dsl_cpe_api-$(PKG_VERSION)
  14. PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
  15. PKG_HASH:=eb2ed59715d3bf4e8a1460bbbe2f1660039e0a9f9d72afb1b2b16590094eb33c
  16. PKG_MAINTAINER:=John Crispin <john@phrozen.org>
  17. PKG_CHECK_FORMAT_SECURITY:=0
  18. PKG_ASLR_PIE:=0
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. define KernelPackage/ltq-adsl-template
  22. SECTION:=sys
  23. CATEGORY:=Kernel modules
  24. SUBMENU:=Network Devices
  25. TITLE:=adsl driver for $(1)
  26. URL:=http://www.lantiq.com/
  27. VARIANT:=$(1)
  28. DEPENDS:=@$(2) +kmod-ltq-adsl-$(1)-mei
  29. FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko
  30. AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api)
  31. endef
  32. KernelPackage/ltq-adsl-danube=$(call KernelPackage/ltq-adsl-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
  33. KernelPackage/ltq-adsl-ar9=$(call KernelPackage/ltq-adsl-template,ar9,TARGET_lantiq_xway)
  34. KernelPackage/ltq-adsl-ase=$(call KernelPackage/ltq-adsl-template,ase,TARGET_lantiq_ase)
  35. define KernelPackage/ltq-dsl/config
  36. source "$(SOURCE)/Config.in"
  37. endef
  38. IFX_DSL_MAX_DEVICE=1
  39. IFX_DSL_LINES_PER_DEVICE=1
  40. IFX_DSL_CHANNELS_PER_LINE=1
  41. CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
  42. --with-max-device="$(IFX_DSL_MAX_DEVICE)" \
  43. --with-lines-per-device="$(IFX_DSL_LINES_PER_DEVICE)" \
  44. --with-channels-per-line="$(IFX_DSL_CHANNELS_PER_LINE)" \
  45. --disable-dsl-delt-static \
  46. --disable-adsl-led \
  47. --enable-dsl-ceoc \
  48. --enable-dsl-pm \
  49. --enable-dsl-pm-total \
  50. --enable-dsl-pm-history \
  51. --enable-dsl-pm-showtime \
  52. --enable-dsl-pm-channel-counters \
  53. --enable-dsl-pm-datapath-counters \
  54. --enable-dsl-pm-line-counters \
  55. --enable-dsl-pm-channel-thresholds \
  56. --enable-dsl-pm-datapath-thresholds \
  57. --enable-dsl-pm-line-thresholds \
  58. --enable-dsl-pm-optional-parameters \
  59. --enable-linux-26 \
  60. --enable-kernelbuild="$(LINUX_DIR)" \
  61. ARCH=$(LINUX_KARCH)
  62. CONFIG_TAG_danube:=DANUBE
  63. CONFIG_TAG_ase:=AMAZON_SE
  64. CONFIG_TAG_ar9:=AR9
  65. CONFIGURE_ARGS += --enable-add-drv-cflags="-DMODULE -DCONFIG_$(CONFIG_TAG_$(BUILD_VARIANT))"
  66. CONFIGURE_ARGS += --enable-danube
  67. ifeq ($(CONFIG_LANTIQ_DSL_DEBUG),y)
  68. CONFIGURE_ARGS += \
  69. --enable-debug=yes \
  70. --enable-debug-prints=yes
  71. EXTRA_CFLAGS += -DDEBUG
  72. endif
  73. define Build/InstallDev
  74. $(INSTALL_DIR) $(1)/usr/include/adsl
  75. $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_*.h $(1)/usr/include/adsl/
  76. endef
  77. $(eval $(call KernelPackage,ltq-adsl-danube))
  78. $(eval $(call KernelPackage,ltq-adsl-ase))
  79. $(eval $(call KernelPackage,ltq-adsl-ar9))