brcm2708: Update brcm2708-gpu-fw package
[openwrt/openwrt.git] / package / kernel / brcm2708-gpu-fw / Makefile
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
11 PKG_NAME:=brcm2708-gpu-fw
12 PKG_VERSION:=2018-05-16
13 PKG_RELEASE:=0f5f899ccec1c2ef8bba02aa49700b4ec19b4199
14
15 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
16
17 PKG_FLAGS:=nonshared
18
19 include $(INCLUDE_DIR)/package.mk
20
21 RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
22 RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
23
24 define Download/LICENCE_broadcom
25 FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
26 URL:=$(RPI_FIRMWARE_URL)
27 URL_FILE:=LICENCE.broadcom
28 HASH:=ba76edfc10a248166d965b8eaf320771c44f4f432d4fce2fd31fd272e7038add
29 endef
30 $(eval $(call Download,LICENCE_broadcom))
31
32 define Download/bootcode_bin
33 FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
34 URL:=$(RPI_FIRMWARE_URL)
35 URL_FILE:=bootcode.bin
36 HASH:=c9eb5258766fabf7127e790b257f106e2717f0ccaaed37544b970b0d113956fc
37 endef
38 $(eval $(call Download,bootcode_bin))
39
40 define Download/fixup_dat
41 FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
42 URL:=$(RPI_FIRMWARE_URL)
43 URL_FILE:=fixup.dat
44 HASH:=8a6311e73d0f349be9b8424db0644fd8f48aaf721f3f2f487488c83d7316cbdf
45 endef
46 $(eval $(call Download,fixup_dat))
47
48 define Download/fixup_cd_dat
49 FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
50 URL:=$(RPI_FIRMWARE_URL)
51 URL_FILE:=fixup_cd.dat
52 HASH:=973b008aae9711d57ddce4f058354fe5a0b4725dd825673f784a2e2754da1f28
53 endef
54 $(eval $(call Download,fixup_cd_dat))
55
56 define Download/start_elf
57 FILE:=$(RPI_FIRMWARE_FILE)-start.elf
58 URL:=$(RPI_FIRMWARE_URL)
59 URL_FILE:=start.elf
60 HASH:=8e77c4cce7e44ced609e5046dd55f19cb7656a8ce4694e733b7eb6ecab915fe1
61 endef
62 $(eval $(call Download,start_elf))
63
64 define Download/start_cd_elf
65 FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
66 URL:=$(RPI_FIRMWARE_URL)
67 URL_FILE:=start_cd.elf
68 HASH:=25223b479b7aca1d74c6f7a1829aba69fd14906ca5b25ae12571fe71ea2c5a4a
69 endef
70 $(eval $(call Download,start_cd_elf))
71
72 define Package/brcm2708-gpu-fw
73 SECTION:=boot
74 CATEGORY:=Boot Loaders
75 DEPENDS:=@TARGET_brcm2708
76 TITLE:=brcm2708-gpu-fw
77 DEFAULT:=y if TARGET_brcm2708
78 endef
79
80 define Package/brcm2708-gpu-fw/description
81 GPU and kernel boot firmware for brcm2708.
82 endef
83
84 define Build/Prepare
85 rm -rf $(PKG_BUILD_DIR)
86 mkdir -p $(PKG_BUILD_DIR)
87 cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-LICENCE.broadcom $(PKG_BUILD_DIR)/LICENCE.broadcom
88 cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-bootcode.bin $(PKG_BUILD_DIR)/bootcode.bin
89 cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup.dat $(PKG_BUILD_DIR)/fixup.dat
90 cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-fixup_cd.dat $(PKG_BUILD_DIR)/fixup_cd.dat
91 cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start.elf $(PKG_BUILD_DIR)/start.elf
92 cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_cd.elf $(PKG_BUILD_DIR)/start_cd.elf
93 endef
94
95 define Build/Compile
96 true
97 endef
98
99 define Package/brcm2708-gpu-fw/install
100 true
101 endef
102
103 define Build/InstallDev
104 $(CP) $(PKG_BUILD_DIR)/bootcode.bin $(KERNEL_BUILD_DIR)
105 $(CP) $(PKG_BUILD_DIR)/LICENCE.broadcom $(KERNEL_BUILD_DIR)
106 $(CP) $(PKG_BUILD_DIR)/start.elf $(KERNEL_BUILD_DIR)
107 $(CP) $(PKG_BUILD_DIR)/start_cd.elf $(KERNEL_BUILD_DIR)
108 $(CP) $(PKG_BUILD_DIR)/fixup.dat $(KERNEL_BUILD_DIR)
109 $(CP) $(PKG_BUILD_DIR)/fixup_cd.dat $(KERNEL_BUILD_DIR)
110 endef
111
112 $(eval $(call BuildPackage,brcm2708-gpu-fw))