Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. include $(INCLUDE_DIR)/package.mk
  31. define KernelPackage/sangam-atm/Default
  32. SUBMENU:=Network Devices
  33. DEPENDS:=@TARGET_ar7_generic +kmod-atm
  34. TITLE:=AR7 ADSL driver
  35. FILES:=$(PKG_BUILD_DIR)/tiatm.ko
  36. AUTOLOAD:=$(call AutoLoad,50,tiatm)
  37. MAINTAINER:=Florian Fainelli <florian@openwrt.org>
  38. MENU:=1
  39. endef
  40. define KernelPackage/sangam-atm/config
  41. source "$(SOURCE)/Config.in"
  42. endef
  43. define KernelPackage/sangam-atm-annex-a
  44. $(call KernelPackage/sangam-atm/Default)
  45. TITLE+= (Annex A, ADSL over POTS)
  46. endef
  47. define KernelPackage/sangam-atm-annex-a/description
  48. The AR7 ADSL driver for Annex A (ADSL over POTS).
  49. endef
  50. define KernelPackage/sangam-atm-annex-a/config
  51. $(call KernelPackage/sangam-atm/config)
  52. endef
  53. define KernelPackage/sangam-atm-annex-b
  54. $(call KernelPackage/sangam-atm/Default)
  55. TITLE+= (Annex B, ADSL over ISDN)
  56. endef
  57. define KernelPackage/sangam-atm-annex-b/description
  58. The AR7 ADSL driver for Annex B (ADSL over ISDN).
  59. endef
  60. define KernelPackage/sangam-atm-annex-a/config
  61. $(call KernelPackage/sangam-atm/config)
  62. endef
  63. define Build/Compile
  64. $(MAKE) -C "$(LINUX_DIR)" \
  65. CROSS_COMPILE="$(TARGET_CROSS)" \
  66. ARCH="$(LINUX_KARCH)" \
  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))