Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. PKG_NAME:=ltq-adsl-fw
  9. PKG_VERSION:=0.1
  10. PKG_RELEASE:=1
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/ltq-dsl-fw-$(PKG_VERSION)
  12. PKG_SOURCE:=ltq-dsl-fw-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
  14. PKG_MD5SUM:=4700a36b66b955b4c5544227267356f4
  15. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  16. PKG_FLAGS:=nonshared
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/kmod-ltq-adsl-fw-template
  19. TITLE+=Firmware Annex-$(1) $(2)
  20. SECTION:=sys
  21. CATEGORY:=Kernel modules
  22. SUBMENU:=Network Devices
  23. VARIANT:= $(2)-fw-$(1)
  24. SOC:=$(2)
  25. ANNEX:=$(1)
  26. URL:=http://www.lantiq.com/
  27. DEPENDS:=@$(3) +kmod-ltq-adsl-$(2)
  28. endef
  29. Package/kmod-ltq-adsl-danube-fw-a=$(call Package/kmod-ltq-adsl-fw-template,a,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
  30. Package/kmod-ltq-adsl-danube-fw-b=$(call Package/kmod-ltq-adsl-fw-template,b,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
  31. Package/kmod-ltq-adsl-ar9-fw-a=$(call Package/kmod-ltq-adsl-fw-template,a,ar9,TARGET_lantiq_xway)
  32. Package/kmod-ltq-adsl-ar9-fw-b=$(call Package/kmod-ltq-adsl-fw-template,b,ar9,TARGET_lantiq_xway)
  33. Package/kmod-ltq-adsl-ase-fw-a=$(call Package/kmod-ltq-adsl-fw-template,a,ase,TARGET_lantiq_ase)
  34. Package/kmod-ltq-adsl-ase-fw-b=$(call Package/kmod-ltq-adsl-fw-template,b,ase,TARGET_lantiq_ase)
  35. define Build/Compile
  36. endef
  37. define Package/kmod-ltq-adsl-$(BUILD_VARIANT)/install
  38. $(INSTALL_DIR) $(1)/lib/firmware/
  39. $(CP) $(PKG_BUILD_DIR)/$(FW_NAME)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/
  40. ln -s /lib/firmware/$(FW_NAME)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/adsl.bin
  41. endef
  42. $(eval $(call BuildPackage,kmod-ltq-adsl-danube-fw-a))
  43. $(eval $(call BuildPackage,kmod-ltq-adsl-danube-fw-b))
  44. $(eval $(call BuildPackage,kmod-ltq-adsl-ase-fw-a))
  45. $(eval $(call BuildPackage,kmod-ltq-adsl-ase-fw-b))
  46. $(eval $(call BuildPackage,kmod-ltq-adsl-ar9-fw-a))
  47. $(eval $(call BuildPackage,kmod-ltq-adsl-ar9-fw-b))