Makefile 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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:=1
  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_USE_MIPS16:=0
  18. PKG_CHECK_FORMAT_SECURITY:=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. EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0
  74. define Build/InstallDev
  75. $(INSTALL_DIR) $(1)/usr/include/adsl
  76. $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_*.h $(1)/usr/include/adsl/
  77. endef
  78. $(eval $(call KernelPackage,ltq-adsl-danube))
  79. $(eval $(call KernelPackage,ltq-adsl-ase))
  80. $(eval $(call KernelPackage,ltq-adsl-ar9))