Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #
  2. # Copyright (C) 2006-2014 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:=sangam_atm
  10. ifeq ($(CONFIG_AR7_ATM_FW_VERSION_705),y)
  11. PKG_VERSION:=D7.05.01.00
  12. PKG_HASH:=874b5baff92159e99cef0dfb839d6fdc124a46aef7374653064d29d9eee9a3c9
  13. PKG_RELEASE:=R1
  14. PATCH_DIR:=patches-$(PKG_VERSION)
  15. endif
  16. ifeq ($(CONFIG_AR7_ATM_FW_VERSION_704),y)
  17. PKG_VERSION:=D7.04.03.00
  18. PKG_HASH:=af2e203e4c86f9a86cdd07d172897b07e66a25379376e8da4c1b14816f86b58f
  19. PKG_RELEASE:=R1
  20. PATCH_DIR:=patches-$(PKG_VERSION)
  21. endif
  22. ifeq ($(CONFIG_AR7_ATM_FW_VERSION_703),y)
  23. PKG_VERSION:=D7.03.01.00
  24. PKG_HASH:=2d156164ef5abbe10ffb2400ada4cef2035df3ba2b3f866f00bdede489861c4d
  25. PKG_RELEASE:=R2
  26. PATCH_DIR:=patches-D7.04.03.00
  27. endif
  28. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.bz2
  29. PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
  30. PKG_FLAGS:=nonshared
  31. include $(INCLUDE_DIR)/package.mk
  32. define KernelPackage/sangam-atm/Default
  33. SUBMENU:=Network Devices
  34. DEPENDS:=@TARGET_ar7_generic +kmod-atm
  35. TITLE:=AR7 ADSL driver
  36. FILES:=$(PKG_BUILD_DIR)/tiatm.ko
  37. AUTOLOAD:=$(call AutoLoad,50,tiatm)
  38. MAINTAINER:=Florian Fainelli <florian@openwrt.org>
  39. MENU:=1
  40. endef
  41. define KernelPackage/sangam-atm/config
  42. source "$(SOURCE)/Config.in"
  43. endef
  44. define KernelPackage/sangam-atm-annex-a
  45. $(call KernelPackage/sangam-atm/Default)
  46. TITLE+= (Annex A, ADSL over POTS)
  47. endef
  48. define KernelPackage/sangam-atm-annex-a/description
  49. The AR7 ADSL driver for Annex A (ADSL over POTS).
  50. endef
  51. define KernelPackage/sangam-atm-annex-a/config
  52. $(call KernelPackage/sangam-atm/config)
  53. endef
  54. define KernelPackage/sangam-atm-annex-b
  55. $(call KernelPackage/sangam-atm/Default)
  56. TITLE+= (Annex B, ADSL over ISDN)
  57. endef
  58. define KernelPackage/sangam-atm-annex-b/description
  59. The AR7 ADSL driver for Annex B (ADSL over ISDN).
  60. endef
  61. define KernelPackage/sangam-atm-annex-a/config
  62. $(call KernelPackage/sangam-atm/config)
  63. endef
  64. define Build/Compile
  65. $(MAKE) -C "$(LINUX_DIR)" \
  66. $(KERNEL_MAKE_FLAGS) \
  67. SUBDIRS="$(PKG_BUILD_DIR)" \
  68. modules
  69. endef
  70. define KernelPackage/sangam-atm-annex-a/install
  71. mkdir -p $(1)/lib/firmware
  72. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700mp.bin $(1)/lib/firmware/
  73. $(LN) ar0700mp.bin $(1)/lib/firmware/ar0700xx.bin
  74. endef
  75. define KernelPackage/sangam-atm-annex-b/install
  76. mkdir -p $(1)/lib/firmware
  77. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700db.bin $(1)/lib/firmware/
  78. $(LN) ar0700db.bin $(1)/lib/firmware/ar0700xx.bin
  79. endef
  80. $(eval $(call KernelPackage,sangam-atm-annex-a))
  81. $(eval $(call KernelPackage,sangam-atm-annex-b))