aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/bcm27xx-gpu-fw/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/bcm27xx-gpu-fw/Makefile')
-rw-r--r--package/kernel/bcm27xx-gpu-fw/Makefile192
1 files changed, 192 insertions, 0 deletions
diff --git a/package/kernel/bcm27xx-gpu-fw/Makefile b/package/kernel/bcm27xx-gpu-fw/Makefile
new file mode 100644
index 0000000000..bbaff39cc6
--- /dev/null
+++ b/package/kernel/bcm27xx-gpu-fw/Makefile
@@ -0,0 +1,192 @@
+#
+# Copyright (C) 2012-2020 OpenWrt.org
+# Copyright (C) 2017 LEDE project
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=bcm27xx-gpu-fw
+PKG_VERSION:=2020-01-30
+PKG_RELEASE:=63bdbe0ea609a69f5c0a2212d608ef3d9915a7ad
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
+
+PKG_FLAGS:=nonshared
+
+include $(INCLUDE_DIR)/package.mk
+
+RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
+RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
+
+define Download/LICENCE_broadcom
+ FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=LICENCE.broadcom
+ HASH:=c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b
+endef
+$(eval $(call Download,LICENCE_broadcom))
+
+define Download/bootcode_bin
+ FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=bootcode.bin
+ HASH:=6505bbc8798698bd8f1dff30789b22289ebb865ccba7833b87705264525cbe46
+endef
+$(eval $(call Download,bootcode_bin))
+
+define Download/fixup_dat
+ FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=fixup.dat
+ HASH:=7ca06846314d7a0d0335cadd6081ea50578f450ed0ec98d284220cea1021199f
+endef
+$(eval $(call Download,fixup_dat))
+
+define Download/fixup_cd_dat
+ FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=fixup_cd.dat
+ HASH:=fb8e8b196f9fd7bd16b00b8ed8a4d3231fb24c2910a4a10929b5f4f693ad69ef
+endef
+$(eval $(call Download,fixup_cd_dat))
+
+define Download/fixup_x_dat
+ FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=fixup_x.dat
+ HASH:=65e0c34b5d17009d7a79f5d0ae81ced8b3649cc77258f29edb7e9b15d197634c
+endef
+$(eval $(call Download,fixup_x_dat))
+
+define Download/fixup4_dat
+ FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=fixup4.dat
+ HASH:=d040dff3e48d645e474ef9c108651e9d4d6708f75aa50799148a1917724e5d27
+endef
+$(eval $(call Download,fixup4_dat))
+
+define Download/fixup4cd_dat
+ FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=fixup4cd.dat
+ HASH:=2a3366d0f7ea5c2d39da41f9a2c68aa84a14641dbf122dccc275e0d548296c0d
+endef
+$(eval $(call Download,fixup4cd_dat))
+
+define Download/fixup4x_dat
+ FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=fixup4x.dat
+ HASH:=6c6e9fec9e769d1bff3cf6775b12a5f640fbd810c3a1427318509a929b854a5b
+endef
+$(eval $(call Download,fixup4x_dat))
+
+define Download/start_elf
+ FILE:=$(RPI_FIRMWARE_FILE)-start.elf
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=start.elf
+ HASH:=2cde27f015b244b35b2261fe468924298b4c3d0ea12b69f99cd0bd9d1fcadf9c
+endef
+$(eval $(call Download,start_elf))
+
+define Download/start_cd_elf
+ FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=start_cd.elf
+ HASH:=5151679b5128c3cedbeb2992d8c6f8f13ce919282f6a98e87af0fe13b2686142
+endef
+$(eval $(call Download,start_cd_elf))
+
+define Download/start_x_elf
+ FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=start_x.elf
+ HASH:=e4ee556a657adf5f5b1c006bfd7f7278e3cd76807adc3eb23f192f37759b674e
+endef
+$(eval $(call Download,start_x_elf))
+
+define Download/start4_elf
+ FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=start4.elf
+ HASH:=fc9a3b7a07bc901f677cc15420ac1c66d5b55bd1c697b07ee54ee5bbf92a7cc5
+endef
+$(eval $(call Download,start4_elf))
+
+define Download/start4cd_elf
+ FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=start4cd.elf
+ HASH:=b75ef404d1e222e84b64e7410e9c9633a643db196421c144ace51454a2a0f504
+endef
+$(eval $(call Download,start4cd_elf))
+
+define Download/start4x_elf
+ FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
+ URL:=$(RPI_FIRMWARE_URL)
+ URL_FILE:=start4x.elf
+ HASH:=db639727412e80d1a7b0dfd9f8cb0b71318f8663ece7e6b20a3804526c6a330d
+endef
+$(eval $(call Download,start4x_elf))
+
+define Package/bcm27xx-gpu-fw
+ SECTION:=boot
+ CATEGORY:=Boot Loaders
+ DEPENDS:=@TARGET_bcm27xx
+ TITLE:=bcm27xx-gpu-fw
+ DEFAULT:=y if TARGET_bcm27xx
+endef
+
+define Package/bcm27xx-gpu-fw/description
+ GPU and kernel boot firmware for bcm27xx.
+endef
+
+define Build/Prepare
+ rm -rf $(PKG_BUILD_DIR)
+ mkdir -p $(PKG_BUILD_DIR)
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-LICENCE.broadcom $(PKG_BUILD_DIR)/LICENCE.broadcom
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-bootcode.bin $(PKG_BUILD_DIR)/bootcode.bin
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup.dat $(PKG_BUILD_DIR)/fixup.dat
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_cd.dat $(PKG_BUILD_DIR)/fixup_cd.dat
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_x.dat $(PKG_BUILD_DIR)/fixup_x.dat
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup4.dat $(PKG_BUILD_DIR)/fixup4.dat
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup4cd.dat $(PKG_BUILD_DIR)/fixup4cd.dat
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup4x.dat $(PKG_BUILD_DIR)/fixup4x.dat
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start.elf $(PKG_BUILD_DIR)/start.elf
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_cd.elf $(PKG_BUILD_DIR)/start_cd.elf
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_x.elf $(PKG_BUILD_DIR)/start_x.elf
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start4.elf $(PKG_BUILD_DIR)/start4.elf
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start4cd.elf $(PKG_BUILD_DIR)/start4cd.elf
+ cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start4x.elf $(PKG_BUILD_DIR)/start4x.elf
+endef
+
+define Build/Compile
+ true
+endef
+
+define Package/bcm27xx-gpu-fw/install
+ true
+endef
+
+define Build/InstallDev
+ $(CP) $(PKG_BUILD_DIR)/bootcode.bin $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/LICENCE.broadcom $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/start.elf $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/start_cd.elf $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/start_x.elf $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/start4.elf $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/start4cd.elf $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/start4x.elf $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/fixup.dat $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/fixup_cd.dat $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/fixup_x.dat $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/fixup4.dat $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/fixup4cd.dat $(KERNEL_BUILD_DIR)
+ $(CP) $(PKG_BUILD_DIR)/fixup4x.dat $(KERNEL_BUILD_DIR)
+endef
+
+$(eval $(call BuildPackage,bcm27xx-gpu-fw))