brcm2708-gpu-fw: update to latest version
[openwrt/staging/yousong.git] / package / kernel / brcm2708-gpu-fw / Makefile
1 #
2 # Copyright (C) 2012-2016 OpenWrt.org
3 # Copyright (C) 2016 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:=2016-09-09
13 PKG_RELEASE:=4e30cf3037d8b5eb3faa51cb2eb474d94185d9ce
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 MD5SUM:=4a4d169737c0786fb9482bb6d30401d1
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 MD5SUM:=5bbb5f25dfe16f2871d5defcc48ac9ff
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 MD5SUM:=4a5f24a80c613ca7b33b4c7f96f60dfb
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 MD5SUM:=5e08f350cfbfaa1d22978ab1e0458b38
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 MD5SUM:=0bbdcce94170fb14d72d7f4ff414d40f
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 MD5SUM:=e1d57a651edec9ff6390a509c2030439
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))