bcm27xx-utils: update to Git HEAD as of 2026.09.17

Update to Git HEAD as of 2026-09-17

Update patches:
- 0001-raspinfo-adapt-to-OpenWrt.patch: rebase, note vclog alongside
  vcdbg when neither is found
- 1001-rpifwcrypto-switch-from-GnuTLS-to-OpenSSL.patch: add proper
  commit message; update documentation where needed; fix hash_file()
  to bound the memcpy by the actual digest length instead of always
  copying SHA256_HASH_SIZE bytes
- 1002-piolib-make-piolib-a-shared-library.patch: add proper commit
  message and update documentation where needed
- Add 1003-cmake-disable-splashasm.patch: splashasm is not needed
  for the OpenWrt build at this time

Fixes: a296a5adf7 ("bcm27xx-utils: update to 20260621, add rpi-fw-crypto and piolib")

Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25243
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
This commit is contained in:
Joshua Covington authored and Jonas Jelonek committed 2026-09-27 10:18:32 +02:00
1 parent 3f50262abc
commit afe0f08a6f
5 files changed
+114 -28

No files matched your search

+3 -3
View File
@@ -3,13 +3,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bcm27xx-utils
PKG_VERSION:=2026.06.21
PKG_VERSION:=2026.09.17
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
PKG_SOURCE_VERSION:=61371fa6d93463c5451131f7bb68ae145aaf1e7a
PKG_MIRROR_HASH:=412b9faad4d37580a8316e967da65dea8f85d1622ed588bed3f2080325d9b6c9
PKG_SOURCE_VERSION:=ebc4a56bac3a896d5c14e56fe27dcd6cb36dd373
PKG_MIRROR_HASH:=e5c6c22bb0fbb450cebaf72622c9453d31f25f215cb59c89898c2cf725ebb2a7
PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=no-lto
@@ -1,4 +1,4 @@
From 0db3fb3119eda8c2360454c2a01f84602a879c38 Mon Sep 17 00:00:00 2001
From 3620d4ead69a4f928d8b81f24785ba7504197e0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Tue, 16 Jan 2024 15:32:12 +0100
Subject: [PATCH] raspinfo: adapt to OpenWrt
@@ -8,8 +8,8 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
raspinfo/raspinfo | 206 +++-------------------------------------------
1 file changed, 11 insertions(+), 195 deletions(-)
raspinfo/raspinfo | 214 ++++------------------------------------------
1 file changed, 15 insertions(+), 199 deletions(-)
--- a/raspinfo/raspinfo
+++ b/raspinfo/raspinfo
@@ -270,7 +270,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
elif command -v raspi-gpio > /dev/null; then
raspi-gpio get 2>&1
else
@@ -335,9 +151,9 @@ echo "------------------"
@@ -335,11 +151,11 @@ echo "------------------"
echo
if command -v vcdbg > /dev/null; then
@@ -280,8 +280,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
- sudo vclog --msg 2>&1
+ vclog --msg 2>&1
else
echo "vcdbg not found"
- echo "vcdbg not found"
+ echo "vcdbg/vclog not found"
fi
echo
@@ -347,16 +163,16 @@ echo "dmesg log"
echo "---------"
echo
@@ -1,22 +1,37 @@
From 74a161cc45b1f68ff4735b31c37329a97e73ea2e Mon Sep 17 00:00:00 2001
From 2ddd6298ec558ffe7f856d342ed57e1bce692782 Mon Sep 17 00:00:00 2001
From: Joshua Covington <joshuacov@gmail.com>
Date: Mon, 8 Jun 2026 22:46:01 +0000
Subject: [PATCH 1/2] rpifwcrypto: switch from GnuTLS to OpenSSL
Date: Thu, 17 Sep 2026 23:47:23 +0000
Subject: [PATCH] rpifwcrypto: switch from GnuTLS to OpenSSL
Switch rpi-fw-crypto from GnuTLS to OpenSSL
Replace GnuTLS with OpenSSL (EVP) for SHA-256 hashing in
rpi-fw-crypto, since libgnutls28-dev is being phased out in
favor of libssl-dev across the project.
- hash_file(): rewrite using EVP_MD_CTX / EVP_DigestInit_ex /
EVP_DigestUpdate / EVP_DigestFinal_ex, with single-exit error
handling and a length check on the returned digest.
- CMakeLists.txt: find_package(OpenSSL) instead of GnuTLS; guard
the top-level rpifwcrypto subdirectory on OPENSSL_FOUND (not
the OpenSSL_FOUND alias, only available since CMake 4.2).
- Link against the OpenSSL::Crypto imported target instead of
raw ${GNUTLS_LIBRARIES}/${GNUTLS_INCLUDE_DIRS}.
- Update prerequisites.sh and rpifwcrypto READMEs to require libssl-dev
instead of libgnutls28-dev.
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
---
CMakeLists.txt | 9 +++---
prerequisites.sh | 2 +-
rpifwcrypto/CMakeLists.txt | 8 +++---
rpifwcrypto/main.c | 57 +++++++++++++++++++++++---------------
3 files changed, 43 insertions(+), 31 deletions(-)
rpifwcrypto/README.md | 2 +-
rpifwcrypto/main.c | 56 ++++++++++++++++++++++++--------------
5 files changed, 45 insertions(+), 32 deletions(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,11 +22,10 @@ add_subdirectory(vcgencmd)
add_subdirectory(vclog)
@@ -23,11 +23,10 @@ add_subdirectory(vclog)
add_subdirectory(vcmailbox)
add_subdirectory(splashasm)
-# Only build rpifwcrypto if GnuTLS is available
-include(CheckIncludeFile)
@@ -24,12 +39,17 @@ Signed-off-by: Joshua Covington <joshuacov@gmail.com>
-if(HAVE_GNUTLS_CRYPTO_H)
+# Only build rpifwcrypto if OpenSSL is available
+find_package(OpenSSL QUIET)
+if(OpenSSL_FOUND)
+if(OPENSSL_FOUND)
add_subdirectory(rpifwcrypto)
else()
- message(STATUS "gnutls/crypto.h not found - skipping rpifwcrypto")
+ message(STATUS "OpenSSL not found - skipping rpifwcrypto")
endif()
--- a/prerequisites.sh
+++ b/prerequisites.sh
@@ -1 +1 @@
-apt install cmake device-tree-compiler libncurses-dev libfdt-dev libgnutls28-dev
+apt install cmake device-tree-compiler libncurses-dev libfdt-dev libssl-dev
--- a/rpifwcrypto/CMakeLists.txt
+++ b/rpifwcrypto/CMakeLists.txt
@@ -10,8 +10,8 @@ endif()
@@ -54,6 +74,17 @@ Signed-off-by: Joshua Covington <joshuacov@gmail.com>
# Install rules
install(TARGETS rpi-fw-crypto RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
--- a/rpifwcrypto/README.md
+++ b/rpifwcrypto/README.md
@@ -18,7 +18,7 @@ or the librpifwcrypto.so shared library.
## Build Instructions
-Install prerequisites with `sudo apt install cmake libgnutls28-dev` - you need at least version 3.10.
+Install prerequisites with `sudo apt install cmake libssl-dev` - you need at least version 3.10.
```
mkdir build
--- a/rpifwcrypto/main.c
+++ b/rpifwcrypto/main.c
@@ -2,7 +2,7 @@
@@ -65,7 +96,7 @@ Signed-off-by: Joshua Covington <joshuacov@gmail.com>
#include "rpifwcrypto.h"
#define SHA256_HASH_SIZE 32
@@ -69,53 +69,66 @@ static void usage(const char *progname)
@@ -69,53 +69,67 @@ static void usage(const char *progname)
static int hash_file(const char *filename, unsigned char *hash, size_t hash_size)
{
@@ -138,10 +169,10 @@ Signed-off-by: Joshua Covington <joshuacov@gmail.com>
+ goto out;
+ }
- /* Get the hash output, ensuring we don't write beyond the provided buffer */
/* Get the hash output, ensuring we don't write beyond the provided buffer */
- gnutls_hash_deinit(hash_handle, temp_hash);
- memcpy(hash, temp_hash, hash_size < SHA256_HASH_SIZE ? hash_size : SHA256_HASH_SIZE);
+ memcpy(hash, temp_hash, SHA256_HASH_SIZE);
+ memcpy(hash, temp_hash, hash_size < temp_hash_len ? hash_size : temp_hash_len);
+ rc = 0;
- return 0;
@@ -1,27 +1,52 @@
From fc43ae46c05acfcc4d5ce74162bb171989db2c20 Mon Sep 17 00:00:00 2001
From 96d0ca810fea0b349e758b9ffb1dd385a5684d70 Mon Sep 17 00:00:00 2001
From: Joshua Covington <joshuacov@gmail.com>
Date: Mon, 8 Jun 2026 22:46:43 +0000
Subject: [PATCH 2/2] piolib: make piolib a shared library
Date: Mon, 27 Jul 2026 23:41:43 +0000
Subject: [PATCH] piolib: make piolib a shared library
Make PIOlib/libPIO a shared library.
Build libpio as a shared library (libpio.so) rather than static,
so it can be packaged and linked against independently of the
executables in piolib/examples. Unlike other subprojects, piolib
is always built shared regardless of BUILD_SHARED_LIBS, since
downstream packaging ships libpio.so as its own component.
- add_library(pio SHARED ...) instead of following
BUILD_SHARED_LIBS.
- install(): add LIBRARY DESTINATION alongside ARCHIVE
DESTINATION so the .so is actually installed.
- README.md: drop piolib from the BUILD_SHARED_LIBS-controlled
list and note that it is always shared.
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
---
piolib/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
README.md | 2 +-
piolib/CMakeLists.txt | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
--- a/README.md
+++ b/README.md
@@ -42,6 +42,6 @@ A collection of scripts and simple appli
Install the prerequisites with "sudo sh prerequisites.sh" - you need at least version 3.10 of cmake. Run the following commands to build and install everything, or see the README files in the subdirectories to just build utilities individually:
- *cmake .*
- N.B. Use *cmake -DBUILD_SHARED_LIBS=1 .* to build the libraries in the subprojects (libdtovl, gpiolib and piolib) as shared (as opposed to static) libraries. Add -DCMAKE_INSTALL_PREFIX=/usr to override the default install path of /usr/local.
+ Use *cmake -DBUILD_SHARED_LIBS=1 .* to build the libraries in the subprojects (libdtovl and gpiolib) as shared (as opposed to static) libraries. piolib is always built as a shared library. Add -DCMAKE_INSTALL_PREFIX=/usr to override the default install path of /usr/local.
- *make*
- *sudo make install*
--- a/piolib/CMakeLists.txt
+++ b/piolib/CMakeLists.txt
@@ -19,7 +19,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
@@ -19,7 +19,10 @@ if (CMAKE_COMPILER_IS_GNUCC)
add_definitions (-ffunction-sections)
endif ()
-add_library (pio piolib.c library_piochips.c pio_rp1.c)
+# Always built as a shared library (unlike other subprojects, which follow
+# BUILD_SHARED_LIBS) since downstream packaging ships libpio.so as its own
+# runtime component.
+add_library (pio SHARED piolib.c library_piochips.c pio_rp1.c)
target_include_directories(pio PUBLIC include)
set_target_properties(pio PROPERTIES SOVERSION 0)
@@ -34,7 +34,7 @@ set(INCLUDE_FILES
@@ -34,7 +37,7 @@ set(INCLUDE_FILES
"pico/stdlib.h"
)
@@ -0,0 +1,27 @@
From 2d8d5b93b93917a9c96add209511aa0b3a9dd2e5 Mon Sep 17 00:00:00 2001
From: Joshua Covington <joshuacov@gmail.com>
Date: Fri, 21 Aug 2026 12:51:28 +0000
Subject: [PATCH] cmake: disable splashasm
splashasm is a small tool to compile .splash files that describe
i2c & spi dumps for spitting out during start.elf.
Not needed for the OpenWrt build at this time, so disable it in
CMakeLists.txt.
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ add_subdirectory(rpi-gpu-usage)
add_subdirectory(vcgencmd)
add_subdirectory(vclog)
add_subdirectory(vcmailbox)
-add_subdirectory(splashasm)
+#add_subdirectory(splashasm)
# Only build rpifwcrypto if OpenSSL is available
find_package(OpenSSL QUIET)