2015-10-15 22:12:13 +00:00
|
|
|
#
|
2016-03-08 18:11:40 +00:00
|
|
|
# Copyright (C) 2012-2016 OpenWrt.org
|
2016-04-01 11:37:33 +00:00
|
|
|
# Copyright (C) 2016 LEDE project
|
2012-07-24 20:39:17 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2015-02-11 13:50:40 +00:00
|
|
|
PKG_NAME:=brcm2708-gpu-fw
|
2016-11-24 12:27:28 +00:00
|
|
|
PKG_VERSION:=2016-12-04
|
|
|
|
PKG_RELEASE:=d760a4ffd378c648ff5d9854e26dc868a5e1fd09
|
2012-07-24 20:39:17 +00:00
|
|
|
|
2016-04-16 09:27:56 +00:00
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
2012-07-24 20:39:17 +00:00
|
|
|
|
2016-04-26 21:09:12 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
|
|
|
|
2012-07-24 20:39:17 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2016-04-16 09:27:56 +00:00
|
|
|
RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
|
|
|
|
RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
|
2016-04-01 11:37:33 +00:00
|
|
|
|
|
|
|
define Download/LICENCE_broadcom
|
|
|
|
FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
|
|
|
|
URL:=$(RPI_FIRMWARE_URL)
|
|
|
|
URL_FILE:=LICENCE.broadcom
|
2016-12-16 16:32:10 +00:00
|
|
|
HASH:=ba76edfc10a248166d965b8eaf320771c44f4f432d4fce2fd31fd272e7038add
|
2016-04-01 11:37:33 +00:00
|
|
|
endef
|
|
|
|
$(eval $(call Download,LICENCE_broadcom))
|
|
|
|
|
|
|
|
define Download/bootcode_bin
|
|
|
|
FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
|
|
|
|
URL:=$(RPI_FIRMWARE_URL)
|
|
|
|
URL_FILE:=bootcode.bin
|
2016-12-16 16:32:10 +00:00
|
|
|
HASH:=a11bd31647c25712648757be75a19fa78c1df6f2409c7bf9bd202903f0421c0c
|
2016-04-01 11:37:33 +00:00
|
|
|
endef
|
|
|
|
$(eval $(call Download,bootcode_bin))
|
|
|
|
|
|
|
|
define Download/fixup_dat
|
|
|
|
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
|
|
|
|
URL:=$(RPI_FIRMWARE_URL)
|
|
|
|
URL_FILE:=fixup.dat
|
2016-12-16 16:32:10 +00:00
|
|
|
HASH:=93314d9e01fb53bdf4a25422de89d103cd2e779bd5e81663c658eaecd0c8018e
|
2016-04-01 11:37:33 +00:00
|
|
|
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
|
2016-12-16 16:32:10 +00:00
|
|
|
HASH:=638671b81590bfdda5eac683d2025e50bb71c663e702f047ef299e23722f6cdd
|
2016-04-01 11:37:33 +00:00
|
|
|
endef
|
|
|
|
$(eval $(call Download,fixup_cd_dat))
|
|
|
|
|
|
|
|
define Download/start_elf
|
|
|
|
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
|
|
|
|
URL:=$(RPI_FIRMWARE_URL)
|
|
|
|
URL_FILE:=start.elf
|
2016-12-16 16:32:10 +00:00
|
|
|
HASH:=cd60fdce9022fa1195a27f3fdf8eba9136476649006e33b72cbdb23dc3b74e90
|
2016-04-01 11:37:33 +00:00
|
|
|
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
|
2016-12-16 16:32:10 +00:00
|
|
|
HASH:=2f0cdcdaad7b9bf64f5288e206d54e007597c0c4068a5b893c02e0f4c0785ca5
|
2016-04-01 11:37:33 +00:00
|
|
|
endef
|
|
|
|
$(eval $(call Download,start_cd_elf))
|
|
|
|
|
2012-07-24 20:39:17 +00:00
|
|
|
define Package/brcm2708-gpu-fw
|
|
|
|
SECTION:=boot
|
|
|
|
CATEGORY:=Boot Loaders
|
2015-02-13 07:38:38 +00:00
|
|
|
DEPENDS:=@TARGET_brcm2708
|
2012-07-24 20:39:17 +00:00
|
|
|
TITLE:=brcm2708-gpu-fw
|
2015-02-13 07:38:38 +00:00
|
|
|
DEFAULT:=y if TARGET_brcm2708
|
2012-07-24 20:39:17 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/brcm2708-gpu-fw/description
|
|
|
|
GPU and kernel boot firmware for brcm2708.
|
|
|
|
endef
|
|
|
|
|
2016-04-01 11:37:33 +00:00
|
|
|
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)-start.elf $(PKG_BUILD_DIR)/start.elf
|
|
|
|
cp $(DL_DIR)/$(RPI_FIRMWARE_FILE)-start_cd.elf $(PKG_BUILD_DIR)/start_cd.elf
|
|
|
|
endef
|
|
|
|
|
2012-07-24 20:39:17 +00:00
|
|
|
define Build/Compile
|
2015-05-29 11:28:54 +00:00
|
|
|
true
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/brcm2708-gpu-fw/install
|
|
|
|
true
|
2012-07-24 20:39:17 +00:00
|
|
|
endef
|
|
|
|
|
2015-02-11 13:50:40 +00:00
|
|
|
define Build/InstallDev
|
2015-05-29 11:28:54 +00:00
|
|
|
$(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)/fixup.dat $(KERNEL_BUILD_DIR)
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/fixup_cd.dat $(KERNEL_BUILD_DIR)
|
2015-02-11 13:50:40 +00:00
|
|
|
endef
|
|
|
|
|
2012-07-24 20:39:17 +00:00
|
|
|
$(eval $(call BuildPackage,brcm2708-gpu-fw))
|