Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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_MD5SUM:=42ee465be5cfbe9476fc25deb260d450
  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_MD5SUM:=3d76004e46f09e88931f91670cb420ad
  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_MD5SUM:=bc6e9c6adb1be25820c7ee661de8ca7d
  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. CROSS_COMPILE="$(TARGET_CROSS)" \
  67. ARCH="$(LINUX_KARCH)" \
  68. SUBDIRS="$(PKG_BUILD_DIR)" \
  69. modules
  70. endef
  71. define KernelPackage/sangam-atm-annex-a/install
  72. mkdir -p $(1)/lib/firmware
  73. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700mp.bin $(1)/lib/firmware/
  74. $(LN) ar0700mp.bin $(1)/lib/firmware/ar0700xx.bin
  75. endef
  76. define KernelPackage/sangam-atm-annex-b/install
  77. mkdir -p $(1)/lib/firmware
  78. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ar0700db.bin $(1)/lib/firmware/
  79. $(LN) ar0700db.bin $(1)/lib/firmware/ar0700xx.bin
  80. endef
  81. $(eval $(call KernelPackage,sangam-atm-annex-a))
  82. $(eval $(call KernelPackage,sangam-atm-annex-b))