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