Makefile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # Copyright (C) 2015 OpenWrt.org
  2. # Copyright (C) 2015-2016 Lantiq Beteiligungs GmbH & Co KG.
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=dsl_vr9_firmware_xdsl
  8. PKG_VERSION:=05.08.01.08.01.06_05.08.00.0B.01.01_osc
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
  12. PKG_HASH:=44cd94130571fe42dfa8f0f9d44597d104e9e77962617fe38646b7a0b4184a2b
  13. PKG_BUILD_DEPENDS:=bsdiff/host
  14. PKG_FLAGS:=nonshared
  15. include $(INCLUDE_DIR)/package.mk
  16. PKG_B_NAME:=dsl_vr9_firmware_xdsl
  17. PKG_B_VERSION:=05.07.09.09.00.06_05.07.04.04.00.02_osc
  18. PKG_B_SOURCE:=$(PKG_B_NAME)-$(PKG_B_VERSION).tar.gz
  19. ANNEX_A_VER:=581816_580B11
  20. ANNEX_B_VER:=579906_574402
  21. define Download/dsl_vr9_firmware_xdsl_b
  22. FILE:=$(PKG_B_SOURCE)
  23. URL:=$(PKG_SOURCE_URL)
  24. HASH:=275c55e870205a5a75510d3ef3d3fb6b60010effebf4b2d1fbc72ffd46e855c0
  25. endef
  26. $(eval $(call Download,dsl_vr9_firmware_xdsl_b))
  27. define Package/dsl-vrx200-firmware-xdsl-a
  28. SECTION:=firmware
  29. CATEGORY:=Firmware
  30. TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware
  31. URL:=http://www.lantiq.com/
  32. DEPENDS:=@TARGET_lantiq_xrx200
  33. endef
  34. define Package/dsl-vrx200-firmware-xdsl-a/description
  35. VRX200 / VR9 CPE VDSL and ADSL Annex A firmware
  36. endef
  37. define Package/dsl-vrx200-firmware-xdsl-b
  38. SECTION:=firmware
  39. CATEGORY:=Firmware
  40. TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware
  41. URL:=http://www.lantiq.com/
  42. DEPENDS:=@TARGET_lantiq_xrx200
  43. endef
  44. define Package/dsl-vrx200-firmware-xdsl-b/description
  45. VRX200 / VR9 CPE VDSL and ADSL Annex B firmware
  46. endef
  47. define Package/dsl-vrx200-firmware-xdsl-a-patch
  48. SECTION:=firmware
  49. CATEGORY:=Firmware
  50. TITLE:=VRX200 / VR9 CPE xDSL Annex B to Annex A firmware patch
  51. URL:=http://www.lantiq.com/
  52. DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-b +bspatch
  53. endef
  54. define Package/dsl-vrx200-firmware-xdsl-a-patch/description
  55. Patch which between the Annex A and Annex B firmware to create the Annex A firmware.
  56. endef
  57. define Package/dsl-vrx200-firmware-xdsl-b-patch
  58. SECTION:=firmware
  59. CATEGORY:=Firmware
  60. TITLE:=VRX200 / VR9 CPE xDSL Annex A to Annex B firmware patch
  61. URL:=http://www.lantiq.com/
  62. DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-a +bspatch
  63. endef
  64. define Package/dsl-vrx200-firmware-xdsl-b-patch/description
  65. Patch which between the Annex A and Annex B firmware to create the Annex B firmware.
  66. endef
  67. define Build/Prepare
  68. rm -rf $(PKG_BUILD_DIR)
  69. mkdir -p $(PKG_BUILD_DIR)
  70. $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
  71. $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_B_SOURCE)
  72. endef
  73. define Build/Compile
  74. bsdiff \
  75. $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin \
  76. $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER).bin \
  77. $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER)_to_$(ANNEX_B_VER).bspatch
  78. bsdiff \
  79. $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER).bin \
  80. $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin \
  81. $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER)_to_$(ANNEX_A_VER).bspatch
  82. endef
  83. define Package/dsl-vrx200-firmware-xdsl-a/install
  84. $(INSTALL_DIR) $(1)/lib/firmware/
  85. $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/lib/firmware/xcpe_$(ANNEX_A_VER).LICENSE
  86. $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER).bin $(1)/lib/firmware/
  87. ln -s xcpe_$(ANNEX_A_VER).bin $(1)/lib/firmware/lantiq-vrx200-a.bin
  88. endef
  89. define Package/dsl-vrx200-firmware-xdsl-b/install
  90. $(INSTALL_DIR) $(1)/lib/firmware/
  91. $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE $(1)/lib/firmware/xcpe_$(ANNEX_B_VER).LICENSE
  92. $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER).bin $(1)/lib/firmware/
  93. ln -s xcpe_$(ANNEX_B_VER).bin $(1)/lib/firmware/lantiq-vrx200-b.bin
  94. endef
  95. define Package/dsl-vrx200-firmware-xdsl-a-patch/install
  96. $(INSTALL_DIR) $(1)/lib/firmware/
  97. $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_B_VER)_to_$(ANNEX_A_VER).bspatch $(1)/lib/firmware/
  98. ln -s xcpe_$(ANNEX_B_VER)_to_$(ANNEX_A_VER).bspatch $(1)/lib/firmware/lantiq-vrx200-b-to-a.bspatch
  99. endef
  100. define Package/dsl-vrx200-firmware-xdsl-b-patch/install
  101. $(INSTALL_DIR) $(1)/lib/firmware/
  102. $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_$(ANNEX_A_VER)_to_$(ANNEX_B_VER).bspatch $(1)/lib/firmware/
  103. ln -s xcpe_$(ANNEX_A_VER)_to_$(ANNEX_B_VER).bspatch $(1)/lib/firmware/lantiq-vrx200-a-to-b.bspatch
  104. endef
  105. $(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a))
  106. $(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b))
  107. $(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a-patch))
  108. $(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b-patch))