Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # Copyright (C) 2012-2016 OpenWrt.org
  3. # Copyright (C) 2017 LEDE project
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_NAME:=brcm2708-gpu-fw
  11. PKG_VERSION:=2017-03-03
  12. PKG_RELEASE:=78c4983379de0537f49a97fb37ceaaf42632b28c
  13. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
  14. PKG_FLAGS:=nonshared
  15. include $(INCLUDE_DIR)/package.mk
  16. RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
  17. RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
  18. define Download/LICENCE_broadcom
  19. FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
  20. URL:=$(RPI_FIRMWARE_URL)
  21. URL_FILE:=LICENCE.broadcom
  22. HASH:=ba76edfc10a248166d965b8eaf320771c44f4f432d4fce2fd31fd272e7038add
  23. endef
  24. $(eval $(call Download,LICENCE_broadcom))
  25. define Download/bootcode_bin
  26. FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
  27. URL:=$(RPI_FIRMWARE_URL)
  28. URL_FILE:=bootcode.bin
  29. HASH:=d990031baec20fe2cd5e24d9f3d6fc34891afdb128838d010d9a0249ae29ea6b
  30. endef
  31. $(eval $(call Download,bootcode_bin))
  32. define Download/fixup_dat
  33. FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
  34. URL:=$(RPI_FIRMWARE_URL)
  35. URL_FILE:=fixup.dat
  36. HASH:=38b69384f62bc7b64f17dcedc03c5582af6b4f8dfc25fe5904d4eb3181a3387b
  37. endef
  38. $(eval $(call Download,fixup_dat))
  39. define Download/fixup_cd_dat
  40. FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
  41. URL:=$(RPI_FIRMWARE_URL)
  42. URL_FILE:=fixup_cd.dat
  43. HASH:=05c682ffcc74cd1356f1b9a32a7034763bfea94e5cb54eaaa2e69affc1cd33d7
  44. endef
  45. $(eval $(call Download,fixup_cd_dat))
  46. define Download/start_elf
  47. FILE:=$(RPI_FIRMWARE_FILE)-start.elf
  48. URL:=$(RPI_FIRMWARE_URL)
  49. URL_FILE:=start.elf
  50. HASH:=59b9d26b463a84f017fae186493bb54e642de6c7e0376b3cbe3375df6132edc0
  51. endef
  52. $(eval $(call Download,start_elf))
  53. define Download/start_cd_elf
  54. FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
  55. URL:=$(RPI_FIRMWARE_URL)
  56. URL_FILE:=start_cd.elf
  57. HASH:=fb9aea03eb6790062c100166444bf7d2b8a6cea605bd041f905fcacefacbbae2
  58. endef
  59. $(eval $(call Download,start_cd_elf))
  60. define Package/brcm2708-gpu-fw
  61. SECTION:=boot
  62. CATEGORY:=Boot Loaders
  63. DEPENDS:=@TARGET_brcm2708
  64. TITLE:=brcm2708-gpu-fw
  65. DEFAULT:=y if TARGET_brcm2708
  66. endef
  67. define Package/brcm2708-gpu-fw/description
  68. GPU and kernel boot firmware for brcm2708.
  69. endef
  70. define Build/Prepare
  71. rm -rf $(PKG_BUILD_DIR)
  72. mkdir -p $(PKG_BUILD_DIR)
  73. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-LICENCE.broadcom $(PKG_BUILD_DIR)/LICENCE.broadcom
  74. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-bootcode.bin $(PKG_BUILD_DIR)/bootcode.bin
  75. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup.dat $(PKG_BUILD_DIR)/fixup.dat
  76. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_cd.dat $(PKG_BUILD_DIR)/fixup_cd.dat
  77. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start.elf $(PKG_BUILD_DIR)/start.elf
  78. cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_cd.elf $(PKG_BUILD_DIR)/start_cd.elf
  79. endef
  80. define Build/Compile
  81. true
  82. endef
  83. define Package/brcm2708-gpu-fw/install
  84. true
  85. endef
  86. define Build/InstallDev
  87. $(CP) $(PKG_BUILD_DIR)/bootcode.bin $(KERNEL_BUILD_DIR)
  88. $(CP) $(PKG_BUILD_DIR)/LICENCE.broadcom $(KERNEL_BUILD_DIR)
  89. $(CP) $(PKG_BUILD_DIR)/start.elf $(KERNEL_BUILD_DIR)
  90. $(CP) $(PKG_BUILD_DIR)/start_cd.elf $(KERNEL_BUILD_DIR)
  91. $(CP) $(PKG_BUILD_DIR)/fixup.dat $(KERNEL_BUILD_DIR)
  92. $(CP) $(PKG_BUILD_DIR)/fixup_cd.dat $(KERNEL_BUILD_DIR)
  93. endef
  94. $(eval $(call BuildPackage,brcm2708-gpu-fw))