Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #
  2. # Copyright (C) 2012-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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=brcm2708-gpu-fw
  10. PKG_VERSION:=2016-06-08
  11. PKG_RELEASE:=70143fe9d371cd6486a80d6765e93b5574212b64
  12. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
  13. PKG_FLAGS:=nonshared
  14. include $(INCLUDE_DIR)/package.mk
  15. RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
  16. RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
  17. define Download/LICENCE_broadcom
  18. FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
  19. URL:=$(RPI_FIRMWARE_URL)
  20. URL_FILE:=LICENCE.broadcom
  21. MD5SUM:=4a4d169737c0786fb9482bb6d30401d1
  22. endef
  23. $(eval $(call Download,LICENCE_broadcom))
  24. define Download/bootcode_bin
  25. FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
  26. URL:=$(RPI_FIRMWARE_URL)
  27. URL_FILE:=bootcode.bin
  28. MD5SUM:=5bbb5f25dfe16f2871d5defcc48ac9ff
  29. endef
  30. $(eval $(call Download,bootcode_bin))
  31. define Download/fixup_dat
  32. FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
  33. URL:=$(RPI_FIRMWARE_URL)
  34. URL_FILE:=fixup.dat
  35. MD5SUM:=c85a8a7fd6f1012dedb979d5a5350135
  36. endef
  37. $(eval $(call Download,fixup_dat))
  38. define Download/fixup_cd_dat
  39. FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
  40. URL:=$(RPI_FIRMWARE_URL)
  41. URL_FILE:=fixup_cd.dat
  42. MD5SUM:=1e6c0d6c576956282b498f255eb12d3b
  43. endef
  44. $(eval $(call Download,fixup_cd_dat))
  45. define Download/start_elf
  46. FILE:=$(RPI_FIRMWARE_FILE)-start.elf
  47. URL:=$(RPI_FIRMWARE_URL)
  48. URL_FILE:=start.elf
  49. MD5SUM:=94f8e421d6e46e89a60aa001af63844e
  50. endef
  51. $(eval $(call Download,start_elf))
  52. define Download/start_cd_elf
  53. FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
  54. URL:=$(RPI_FIRMWARE_URL)
  55. URL_FILE:=start_cd.elf
  56. MD5SUM:=0a9082c25af181cbf16338de2362d5d6
  57. endef
  58. $(eval $(call Download,start_cd_elf))
  59. define Package/brcm2708-gpu-fw
  60. SECTION:=boot
  61. CATEGORY:=Boot Loaders
  62. DEPENDS:=@TARGET_brcm2708
  63. TITLE:=brcm2708-gpu-fw
  64. DEFAULT:=y if TARGET_brcm2708
  65. endef
  66. define Package/brcm2708-gpu-fw/description
  67. GPU and kernel boot firmware for brcm2708.
  68. endef
  69. define Build/Prepare
  70. rm -rf $(PKG_BUILD_DIR)
  71. mkdir -p $(PKG_BUILD_DIR)
  72. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-LICENCE.broadcom $(PKG_BUILD_DIR)/LICENCE.broadcom
  73. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-bootcode.bin $(PKG_BUILD_DIR)/bootcode.bin
  74. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup.dat $(PKG_BUILD_DIR)/fixup.dat
  75. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_cd.dat $(PKG_BUILD_DIR)/fixup_cd.dat
  76. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start.elf $(PKG_BUILD_DIR)/start.elf
  77. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_cd.elf $(PKG_BUILD_DIR)/start_cd.elf
  78. endef
  79. define Build/Compile
  80. true
  81. endef
  82. define Package/brcm2708-gpu-fw/install
  83. true
  84. endef
  85. define Build/InstallDev
  86. $(CP) $(PKG_BUILD_DIR)/bootcode.bin $(KERNEL_BUILD_DIR)
  87. $(CP) $(PKG_BUILD_DIR)/LICENCE.broadcom $(KERNEL_BUILD_DIR)
  88. $(CP) $(PKG_BUILD_DIR)/start.elf $(KERNEL_BUILD_DIR)
  89. $(CP) $(PKG_BUILD_DIR)/start_cd.elf $(KERNEL_BUILD_DIR)
  90. $(CP) $(PKG_BUILD_DIR)/fixup.dat $(KERNEL_BUILD_DIR)
  91. $(CP) $(PKG_BUILD_DIR)/fixup_cd.dat $(KERNEL_BUILD_DIR)
  92. endef
  93. $(eval $(call BuildPackage,brcm2708-gpu-fw))