Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #
  2. # Copyright (C) 2016 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:=b43legacy-firmware
  9. PKG_VERSION:=3.130.20.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o
  12. PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
  13. PKG_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/b43legacy-firmware
  16. SECTION:=firmware
  17. CATEGORY:=Firmware
  18. URL:=$(PKG_SOURCE_URL)
  19. TITLE:=Broadcom bcm43xx b43legacy firmware
  20. endef
  21. define Package/b43legacy-firmware/config
  22. if PACKAGE_b43legacy-firmware
  23. config B43LEGACY_FW_SQUASH
  24. bool "Remove unnecessary firmware files"
  25. default y
  26. help
  27. This options allows you to remove unnecessary b43legacy firmware files
  28. from the final rootfs image. This can reduce the rootfs size by
  29. up to 50k.
  30. If unsure, say Y.
  31. config B43LEGACY_FW_SQUASH_COREREVS
  32. string "Core revisions to include"
  33. depends on B43LEGACY_FW_SQUASH
  34. default "1,2,3,4"
  35. help
  36. This is a comma seperated list of core revision numbers.
  37. Example (keep files for rev4 only):
  38. 4
  39. Example (keep files for rev2 and rev4):
  40. 2,4
  41. endif
  42. endef
  43. define Build/Prepare
  44. mkdir -p $(PKG_BUILD_DIR)
  45. endef
  46. define Build/Compile
  47. endef
  48. define Package/b43legacy-firmware/install
  49. $(INSTALL_DIR) $(1)/lib/firmware
  50. b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_SOURCE)
  51. ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
  52. b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
  53. endif
  54. endef
  55. $(eval $(call BuildPackage,b43legacy-firmware))