From 71a0193e2d1411caaf58361ccf25949f953c63e9 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Mon, 8 Jul 2019 10:44:12 -0400 Subject: [PATCH] rpi-firmware: support custom version selection Since the rpi-firmware supplies firmware binaries that have the potential to depend on kernel drivers, we've matched kernel versions to rpi-firmware versions. In order to simplify using different Linux kernel versions, this adds an option to set the tag or hash to use. For example, if you're using the Raspberry Pi Linux kernel tagged `1.20200902`, you can now use the rpi-firmware version that was tagged `1.20200902`. --- package/rpi-firmware/Config.in | 5 +++++ package/rpi-firmware/rpi-firmware.mk | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in index 625f0ccf67..dd1821a52d 100644 --- a/package/rpi-firmware/Config.in +++ b/package/rpi-firmware/Config.in @@ -11,6 +11,11 @@ config BR2_PACKAGE_RPI_FIRMWARE if BR2_PACKAGE_RPI_FIRMWARE +config BR2_PACKAGE_RPI_FIRMWARE_CUSTOM_VERSION + string "custom version" + help + If specified, use this tag or git hash instead of the default + config BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN bool "rpi 0/1/2/3 bootcode.bin" help diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk index f1b1b110ce..cfec876b93 100644 --- a/package/rpi-firmware/rpi-firmware.mk +++ b/package/rpi-firmware/rpi-firmware.mk @@ -6,6 +6,20 @@ # Please keep in sync with configs/raspberrypi*_deconfig RPI_FIRMWARE_VERSION = 063bcab6c8a90efb0d19f69d88cbbc7ec79cab68 + +ifeq ($(call qstrip,$(BR2_PACKAGE_RPI_FIRMWARE_CUSTOM_VERSION)),) +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE),y) +$(error The Raspberry Pi firmware version is no longer derived automatically.\ + Please set BR2_PACKAGE_RPI_FIRMWARE_CUSTOM_VERSION in your nerves_defconfig\ + to a version that is compatible with the Linux kernel that you are using.\ + For example, if using a tagged Raspberry Pi kernel, there usually is a \ + corresponding tag at https://github.com/raspberrypi/firmware) +endif +else +RPI_FIRMWARE_VERSION = $(call qstrip,$(BR2_PACKAGE_RPI_FIRMWARE_CUSTOM_VERSION)) +BR_NO_CHECK_HASH_FOR += $(RPI_FIRMWARE_SOURCE) +endif + RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION)) RPI_FIRMWARE_LICENSE = BSD-3-Clause RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom -- 2.53.0