include $(TOPDIR)/rules.mk
PKG_NAME:=bcm27xx-eeprom
-PKG_VERSION:=v2022.04.26-138a1
+PKG_VERSION:=v.2024.01.05-2712
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/rpi-eeprom/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=7c54839e68f226c5853fb63c8a1539b729d84b2e6bac311a51766c601d10a413
+PKG_HASH:=ae1d9f10e4383ee39b291b4b3be1be583f6f32f806f65a1431da65ca4ccffe39
PKG_LICENSE:=BSD-3-Clause Custom
PKG_LICENSE_FILES:=LICENSE
define Package/bcm27xx-eeprom
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=bcm27xx-userland +blkid +coreutils +coreutils-od +pciutils +python3-light
+ DEPENDS:=bcm27xx-userland +blkid +coreutils +coreutils-od +mount-utils +pciutils +python3-light
TITLE:=BCM27xx EEPROM tools
endef
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-digest $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpi-eeprom-update $(1)/usr/bin
- $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader
- $(CP) $(PKG_BUILD_DIR)/firmware/release-notes.md $(1)/lib/firmware/raspberrypi/bootloader
+ $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader-2711
+ $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader-2711/default
+ $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader-2711/latest
- $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader/critical
- $(CP) $(PKG_BUILD_DIR)/firmware/critical/ $(1)/lib/firmware/raspberrypi/bootloader/
-
- $(INSTALL_DIR) $(1)/lib/firmware/raspberrypi/bootloader/stable
- $(CP) $(PKG_BUILD_DIR)/firmware/stable/ $(1)/lib/firmware/raspberrypi/bootloader/
+ $(CP) $(PKG_BUILD_DIR)/firmware-2711/release-notes.md $(1)/lib/firmware/raspberrypi/bootloader-2711
+ $(CP) $(PKG_BUILD_DIR)/firmware-2711/default $(1)/lib/firmware/raspberrypi/bootloader-2711
+ $(CP) $(PKG_BUILD_DIR)/firmware-2711/latest $(1)/lib/firmware/raspberrypi/bootloader-2711
endef
$(eval $(call BuildPackage,bcm27xx-eeprom))
-From da37f7b051fe6833e25e78184cc9217dd4379187 Mon Sep 17 00:00:00 2001
+From a7c4e8f246dc58b4c83293b11f6443528065dc70 Mon Sep 17 00:00:00 2001
Date: Mon, 23 Mar 2020 10:10:55 +0100
Subject: [PATCH] rpi-eeprom-update: OpenWrt defaults
---
- rpi-eeprom-update | 6 +++---
- rpi-eeprom-update-default | 5 +++--
- 2 files changed, 6 insertions(+), 5 deletions(-)
+ rpi-eeprom-update | 4 ++--
+ rpi-eeprom-update-default | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
--- a/rpi-eeprom-update
+++ b/rpi-eeprom-update
-@@ -24,9 +24,9 @@ else
- fi
+@@ -25,7 +25,7 @@ fi
# Selects the release sub-directory
--FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-default}
-+FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-stable}
- FIRMWARE_IMAGE_DIR=${FIRMWARE_IMAGE_DIR:-${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}}
+ FIRMWARE_RELEASE_STATUS=${FIRMWARE_RELEASE_STATUS:-default}
-FIRMWARE_BACKUP_DIR=${FIRMWARE_BACKUP_DIR:-/var/lib/raspberrypi/bootloader/backup}
+FIRMWARE_BACKUP_DIR=${FIRMWARE_BACKUP_DIR:-${FIRMWARE_ROOT}/backup}
ENABLE_VL805_UPDATES=${ENABLE_VL805_UPDATES:-1}
- RECOVERY_BIN=${RECOVERY_BIN:-${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}/recovery.bin}
- BOOTFS=${BOOTFS:-/boot}
+ CM4_ENABLE_RPI_EEPROM_UPDATE=${CM4_ENABLE_RPI_EEPROM_UPDATE:-0}
+ RPI_EEPROM_UPDATE_CONFIG_TOOL="${RPI_EEPROM_UPDATE_CONFIG_TOOL:-raspi-config}"
--- a/rpi-eeprom-update-default
+++ b/rpi-eeprom-update-default
-@@ -1,8 +1,8 @@
+@@ -1,7 +1,7 @@
FIRMWARE_ROOT=/lib/firmware/raspberrypi/bootloader
--FIRMWARE_RELEASE_STATUS="critical"
-+FIRMWARE_RELEASE_STATUS="stable"
- FIRMWARE_IMAGE_DIR="${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}"
+ FIRMWARE_RELEASE_STATUS="default"
-FIRMWARE_BACKUP_DIR="/var/lib/raspberrypi/bootloader/backup"
+FIRMWARE_BACKUP_DIR="${FIRMWARE_ROOT}/backup"
- BOOTFS=/boot
- USE_FLASHROM=0
EEPROM_CONFIG_HOOK=
+
+ # BOOTFS can be set here to override auto-detection in rpi-eeprom-update
--- /dev/null
+From fc552b1e5c503c530763e40d2b83df55c5c2e9a3 Mon Sep 17 00:00:00 2001
+Date: Wed, 25 Mar 2020 20:58:35 +0100
+Subject: [PATCH] rpi-eeprom-update: change default include path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ rpi-eeprom-update | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/rpi-eeprom-update
++++ b/rpi-eeprom-update
+@@ -6,8 +6,8 @@ set -e
+
+ script_dir=$(cd "$(dirname "$0")" && pwd)
+
+-if [ -f /etc/default/rpi-eeprom-update ]; then
+- . /etc/default/rpi-eeprom-update
++if [ -f /etc/bcm27xx-eeprom.conf ]; then
++ . /etc/bcm27xx-eeprom.conf
+ fi
+
+ LOCAL_MODE=0
+@@ -423,7 +423,7 @@ checkDependencies() {
+ echo "Run with -h for more information."
+ echo
+ echo "To enable flashrom programming of the EEPROM"
+- echo "Add these the following entries to /etc/default/rpi-eeprom-update"
++ echo "Add these the following entries to /etc/bcm27xx-eeprom.conf"
+ echo "RPI_EEPROM_USE_FLASHROM=1"
+ echo "CM4_ENABLE_RPI_EEPROM_UPDATE=1"
+ echo
+@@ -514,7 +514,7 @@ The system should then boot normally.
+
+ If /boot does not correspond to the boot partition and this
+ is not a NOOBS system, then the mount point for BOOTFS should be defined
+-in /etc/default/rpi-eeprom-update by defining the BOOTFS variable.
++in /etc/bcm27xx-eeprom.conf by defining the BOOTFS variable.
+
+ A backup of the current EEPROM config file is written to ${FIRMWARE_BACKUP_DIR}
+ before applying the update.
+@@ -546,7 +546,7 @@ Options:
+ -u Install the specified VL805 (USB EEPROM) image file.
+
+ Environment:
+-Environment variables should be defined in /etc/default/rpi-eeprom-update
++Environment variables should be defined in /etc/bcm27xx-eeprom.conf
+
+ EEPROM_CONFIG_HOOK
+
+@@ -618,7 +618,7 @@ must first be enabled by removing ENABLE
+ via usbboot.
+
+ After enabling self-update set the CM4_ENABLE_RPI_EEPROM_UPDATE=1 environment
+-variable or define it in /etc/default/rpi-eeprom-update.
++variable or define it in /etc/bcm27xx-eeprom.conf.
+
+ N.B. If there is a power failure during SELF_UPDATE the EEPROM write may fail and
+ usbboot must be used to flash the bootloader EEPROM. SELF_UPDATE is not recommended
+++ /dev/null
-From 6674d49dea0104031b3f54df4c7a356dc4307bb2 Mon Sep 17 00:00:00 2001
-Date: Wed, 25 Mar 2020 20:58:35 +0100
-Subject: [PATCH] rpi-eeprom-update: change default include path
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
----
- rpi-eeprom-update | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/rpi-eeprom-update
-+++ b/rpi-eeprom-update
-@@ -6,8 +6,8 @@ set -e
-
- script_dir=$(cd "$(dirname "$0")" && pwd)
-
--if [ -f /etc/default/rpi-eeprom-update ]; then
-- . /etc/default/rpi-eeprom-update
-+if [ -f /etc/bcm27xx-eeprom.conf ]; then
-+ . /etc/bcm27xx-eeprom.conf
- fi
-
- LOCAL_MODE=0
-@@ -380,7 +380,7 @@ The system should then boot normally.
-
- If /boot does not correspond to the boot partition and this
- is not a NOOBS system, then the mount point for BOOTFS should be defined
--in /etc/default/rpi-eeprom-update by defining the BOOTFS variable.
-+in /etc/bcm27xx-eeprom.conf by defining the BOOTFS variable.
-
- A backup of the current EEPROM config file is written to ${FIRMWARE_BACKUP_DIR}
- before applying the update.
-@@ -413,7 +413,7 @@ Options:
- -u Install the specified VL805 (USB EEPROM) image file.
-
- Environment:
--Environment variables should be defined in /etc/default/rpi-eeprom-update
-+Environment variables should be defined in /etc/bcm27xx-eeprom.conf
-
- EEPROM_CONFIG_HOOK
-
--- /dev/null
+From 62ec3384358bda60269c131d3880795bc8cdc3ce Mon Sep 17 00:00:00 2001
+Date: Fri, 19 Feb 2021 10:54:23 +0100
+Subject: [PATCH] rpi-eeprom-update: chmod silent (-f) is not supported
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ rpi-eeprom-update | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/rpi-eeprom-update
++++ b/rpi-eeprom-update
+@@ -216,7 +216,7 @@ applyRecoveryUpdate()
+ || die "Failed to copy ${TMP_EEPROM_IMAGE} to ${BOOTFS}"
+
+ # For NFS mounts ensure that the files are readable to the TFTP user
+- chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
++ chmod go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
+ || die "Failed to set permissions on eeprom update files"
+ fi
+
+@@ -227,7 +227,7 @@ applyRecoveryUpdate()
+ || die "Failed to copy ${VL805_UPDATE_IMAGE} to ${BOOTFS}/vl805.bin"
+
+ # For NFS mounts ensure that the files are readable to the TFTP user
+- chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
++ chmod go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
+ || die "Failed to set permissions on eeprom update files"
+ fi
+
--- /dev/null
+From 8d1e47c956ae10d1146114f7fcd4eb0d33187d08 Mon Sep 17 00:00:00 2001
+Date: Tue, 16 Jan 2024 16:25:40 +0100
+Subject: [PATCH] rpi-eeprom-config: replace nano with vi as default editor
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ rpi-eeprom-config | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/rpi-eeprom-config
++++ b/rpi-eeprom-config
+@@ -184,8 +184,8 @@ def edit_config(eeprom=None):
+ """
+ Implements something like 'git commit' for editing EEPROM configs.
+ """
+- # Default to nano if $EDITOR is not defined.
+- editor = 'nano'
++ # Default to vi if $EDITOR is not defined.
++ editor = 'vi'
+ if 'EDITOR' in os.environ:
+ editor = os.environ['EDITOR']
+
+@@ -484,7 +484,7 @@ Operating modes:
+
+ To cancel the pending update run 'sudo rpi-eeprom-update -r'
+
+- The default text editor is nano and may be overridden by setting the 'EDITOR'
++ The default text editor is vi and may be overridden by setting the 'EDITOR'
+ environment variable and passing '-E' to 'sudo' to preserve the environment.
+
+ 6. Signing the bootloader config file.
+++ /dev/null
-From 8376ac74390af0ad736c88615e128b82a75eebc0 Mon Sep 17 00:00:00 2001
-Date: Fri, 19 Feb 2021 10:54:23 +0100
-Subject: [PATCH] rpi-eeprom-update: chmod silent (-f) is not supported
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
----
- rpi-eeprom-update | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/rpi-eeprom-update
-+++ b/rpi-eeprom-update
-@@ -200,7 +200,7 @@ applyRecoveryUpdate()
- || die "Failed to copy ${TMP_EEPROM_IMAGE} to ${BOOTFS}"
-
- # For NFS mounts ensure that the files are readable to the TFTP user
-- chmod -f go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
-+ chmod go+r "${BOOTFS}/pieeprom.upd" "${BOOTFS}/pieeprom.sig" \
- || die "Failed to set permissions on eeprom update files"
- fi
-
-@@ -211,7 +211,7 @@ applyRecoveryUpdate()
- || die "Failed to copy ${VL805_UPDATE_IMAGE} to ${BOOTFS}/vl805.bin"
-
- # For NFS mounts ensure that the files are readable to the TFTP user
-- chmod -f go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
-+ chmod go+r "${BOOTFS}/vl805.bin" "${BOOTFS}/vl805.sig" \
- || die "Failed to set permissions on eeprom update files"
- fi
-
+++ /dev/null
---- a/rpi-eeprom-config
-+++ b/rpi-eeprom-config
-@@ -166,8 +166,8 @@ def edit_config(eeprom=None):
- """
- Implements something like 'git commit' for editing EEPROM configs.
- """
-- # Default to nano if $EDITOR is not defined.
-- editor = 'nano'
-+ # Default to vi if $EDITOR is not defined.
-+ editor = 'vi'
- if 'EDITOR' in os.environ:
- editor = os.environ['EDITOR']
-
-@@ -428,7 +428,7 @@ Operating modes:
-
- To cancel the pending update run 'sudo rpi-eeprom-update -r'
-
-- The default text editor is nano and may be overridden by setting the 'EDITOR'
-+ The default text editor is vi and may be overridden by setting the 'EDITOR'
- environment variable and passing '-E' to 'sudo' to preserve the environment.
-
- 6. Signing the bootloader config file.