Commit Graph

1206 Commits

Author SHA1 Message Date
Tim Gover
66eff91147 Update changelog for 27.5-1 release 2025-03-11 08:56:32 +00:00
Tim Gover
3fb1c0c0e9 Merge remote-tracking branch 'pitowers/master' into pios/bookworm
* pitowers/master:
  pieeprom-2025-03-10: 2712: Add [boot_partition] filter plus SDRAM init fixes (latest)
  rpi-eeprom-digest: support specifying keys via PKCS#11 URI
  pieeprom-2025-03-03: 2712: Fix bootloader pull configuration on BCM2712D0 (latest)
  image: Update 2711 plus 2712 images and enable boot-menu on 2711
2025-03-11 08:56:31 +00:00
Tim Gover
d50b2b32f1 pieeprom-2025-03-10: 2712: Add [boot_partition] filter plus SDRAM init fixes (latest)
* Update SDRAM init timings to intermittent 8-flash SDRAM init errors
  on some boards.
  See: https://github.com/raspberrypi/rpi-eeprom/issues/67
* config: Fix missing initialisation of selected_expr to 1 in config.txt
  Without an [all] section the new expression filter might default to
  false. This impacts the bootloader early parsing of config.txt
  for things like boot_ramdisk rather than the later config.txt pass
  for device-tree parsing.
* config_loader: Add support [boot_partition=N] as an expression filter
  The boot_partition tests whether the partition number N matches
  the number that the system is booting from. This expression is
  only supported in config.txt and is designed to make it easier
  to have common boot.img ramdisks in an A/B system where the
  conditional loads a different cmdline.txt file depending on
  which partition boot.img is loaded from.
2025-03-10 17:24:25 +00:00
Rasmus Villemoes
3a16bd016f rpi-eeprom-digest: support specifying keys via PKCS#11 URI
In production setups, it is quite normal that the private key does not
exist as a file in the file system, but is kept inside some HSM,
remote signing service or similar, and only accessed via some pkcs#11
interface; moreover, by design, the private key _cannot_ be extracted
from the HSM or signing service.

In such a case, the user will have set OPENSSL_CONF to some
configuration file setting up the appropriate engine, and the "key" is
simply the pkcs#11 URI, e.g. "pkcs11:model=foo;object=bar".

In order to support this use case, automatically infer the appropriate
options to pass to openssl-dgst if "${KEY}" begins with
"pkcs11:". Doing this at the top level avoids duplicating the logic in
both writeSig and verifySig. While here, this also adds a sanity check
that -v can only be used while also providing a (public) key to check
against.

This drops the -keyform argument in the non-pkcs#11 case, as openssl
automatically infers the type, and this then in fact allows one to use
a private key in e.g. DER format.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
2025-03-06 16:04:38 +00:00
Tim Gover
28a2c0242c pieeprom-2025-03-03: 2712: Fix bootloader pull configuration on BCM2712D0 (latest)
* Fix pull configuration on 2712D0
  2712D0 uses a horrendously sparse set of pad control registers. Make
  the pull-setting code sufficiently complex to cope.
  See: https://github.com/raspberrypi/rpi-eeprom/issues/672
* Disable UARTA for CM5s without WiFi
  Just as CM5s without WiFI don't need the SDIO interface, the Bluetooth
  UART is unconnected. Disable the DT node to avoid kernel warnings and
  save some cycles.
2025-03-03 15:18:20 +00:00
Tim Gover
8eef29aed9 image: Update 2711 plus 2712 images and enable boot-menu on 2711 2025-02-18 12:19:00 +00:00
Tim Gover
6e6e43beee Update changelog for 27.4-1 release 2025-02-18 09:42:04 +00:00
Tim Gover
31536e5e69 Merge remote-tracking branch 'pitowers/master' into pios/bookworm
* pitowers/master:
  license: Update wildcards for firmware
  pieeprom-2025-02-12: 2712: Promote to default release
2025-02-18 09:42:04 +00:00
Tim Gover
e47a6d0f39 firmware: 2712: Fixup commit to promote 2025-02-12 release 2025-02-18 09:37:53 +00:00
Tim Gover
c954a72f63 license: Update wildcards for firmware
Fixes: https://github.com/raspberrypi/rpi-eeprom/issues/665
v2025.02.12-2712 v2025.02.11-2711-138c0
2025-02-18 08:17:23 +00:00
Tim Gover
3e3a300112 Update changelog for 27.3-1 release 2025-02-17 19:08:41 +00:00
Tim Gover
d56e7df8fd gpb: Use pios/bookworm branch 2025-02-17 19:07:24 +00:00
Tim Gover
3679582b23 pieeprom-2025-02-12: 2712: Promote to default release 2025-02-17 16:01:28 +00:00
Tim Gover
c24baba79b Update changelog for 27.2-1 release 2025-02-17 10:45:32 +00:00
Tim Gover
9fa4f3a305 Merge remote-tracking branch 'pitowers/master' into debian/bookworm
* pitowers/master:
  pieeprom-2025-02-12: 2712: Promote to default release
  pieeprom-2025-02-11-2711: Promote to default release
2025-02-17 10:45:31 +00:00
Tim Gover
50d7bfcf82 pieeprom-2025-02-12: 2712: Promote to default release 2025-02-17 10:43:59 +00:00
Tim Gover
1e5578b70c pieeprom-2025-02-11-2711: Promote to default release 2025-02-17 10:39:42 +00:00
Tim Gover
edaf573aa7 Update changelog for 27.1-1 release 2025-02-14 08:12:22 +00:00
Tim Gover
0d01853f0c Merge remote-tracking branch 'pitowers/master' into debian/bookworm
* pitowers/master:
  pieeprom-2025-02-12: 2712: Fixup change to disable 3.7V WiFi power on CM5 no-wifi (latest)
  pieeprom-2025-02-11: 2711: Walk partitions to delete recovery.bin (latest)
  pieeprom-2025-02-11: 2712: CM5 no-wifi stability improvements (latest)
  pieeprom-2025-01-27: 2712: Add PARTITION_WALK option (latest)
  imager: 2712: Move imager release to 2025-01-22
2025-02-14 08:12:21 +00:00
Tim Gover
a1bffdeb5d pieeprom-2025-02-12: 2712: Fixup change to disable 3.7V WiFi power on CM5 no-wifi (latest)
* Fixup change to disable 3.7V PMIC output on CM5 no-wifi
2025-02-12 11:02:38 +00:00
Tim Gover
bad328a72e pieeprom-2025-02-11: 2711: Walk partitions to delete recovery.bin (latest)
* recovery: Walk partitions to delete recovery.bin
  Previously, recovery.bin would fail to delete itself
  if the bootrom loaded recovery.bin where there are multiple FAT
  partitions and the first partition does not contain recovery.bin
  Update the rename code to walk the partition table to find
  the recovery.bin file to delete.
* Enable overriding of high partition numbers
  Previously, the PARTITION=N bootloader config setting would only
  be used at power on reset or if the partition number passed to
  reboot was zero.
  Change the behaviour so that the bootloader config PARTITION
  property can override the reboot partition number if the reboot
  parameter is > 31.
* Walk the partition table if the requested partition is not bootable
  Previously, if the specified boot partition was not bootable the
  bootloader would stop and advance to the next BOOT_ORDER. If the
  new PARTITION_WALK option is set to 1 the bootloader will now
  check each partition in turn starting from the specified partition
  before advancing the BOOT_ORDER.
  This feature is intended for use with A/B systems to handle the case
  where autoboot.txt is missing / corrupted. This change enables
  the system to failover to the next available bootable partition.
  The autoboot.txt file is not scanned during the partition-walk
  phase i.e. there is no recursive processing of autoboot.txt files.
  This option is only supported on physical block devices
  (SD, NVMe, USB) and not RAMDISK. USB assumes a single high speed
  device, partition walks on multiple USB devices is not recommended
  and may cause timeouts.
* Improve keyboard handling in boot menu
  Try and make it more likely that we have enough time to perform key
  detection.
  Ignore mice, which were being enumerated and slowing things down.
2025-02-11 17:40:24 +00:00
Tim Gover
34eab17ce6 pieeprom-2025-02-11: 2712: CM5 no-wifi stability improvements (latest)
* recovery: Walk partitions to delete recovery.bin
  Previously, recovery.bin would fail to delete itself
  if the bootrom loaded recovery.bin where there are multiple FAT
  partitions and the first partition does not contain recovery.bin
  Update the rename code to walk the partition table to find
  the recovery.bin file to delete.
* pi5: Add config filter for simple boot variable expressions (experimental)
  Add support for a new bootloader/config.txt conditional filter
  which tests the partition, boot_count and boot_arg1 variables.
  Syntax (no spaces):
  ARG boot_arg1, boot_count or partition (EEPROM config stage only)
  [ARG=VALUE]      selected if (ARG == VALUE)
  [ARG&MASK]       selected if ((ARG & VALUE) != 0))
  [ARG&MASK=VALUE] selected if ((ARG & MASK) == VALUE)
  [ARG<VALUE]      selected if (ARG < VALUE)
  [ARG>VALUE]      selected if (ARG > VALUE)
  where VALUE and MASK are unsigned integer constants and ARG
  corresponds to the value in the reset register before the
  config file is parsed.
* pi5: Add a boot-count bootloader variable (experimental)
  Store the boot-count in a reset register and increment just
  before the boot-order state-machine. The boot-count variable
  is visible via device-tree /proc/device-tree/chosen/bootloader/count
  and can be read/set via vcmailbox
  GET: sudo vcmailbox 0x0003008d 4 4 0
  SET to N: sudo vcmailbox 0x0003808d 4 4 N
* pi5: Add user-defined reboot argument (boot_arg1) (experimental)
  Add support for a user-defined boot parameter stored in a reset-safe
  scratch register on BCM2712.  This is visible via device-tree at
  /proc/device-tree/chosen/bootloader/arg1 and via vcmailboxes
  GET arg1: sudo vcmailbox 0x0003008c 8 8 1 0
  SET arg1 to 42: sudo vcmailbox 0x0003808c 8 8 1 42
  or via config.txt
  set_reboot_arg1=42
  The variable is NOT cleared automatically and will persist until
  a power-on-reset.
* Enable overriding of high partition numbers
  Previously, the PARTITION=N bootloader config setting would only
  be used at power on reset or if the partition number passed to
  reboot was zero.
  Change the behaviour so that the bootloader config PARTITION
  property can override the reboot partition number if the reboot
  parameter is > 31.
* Disable WiFi PMIC output on CM5 modules without WiFi
  Disable the 3.7V WiFi power supply on CM5 modules which do not have a
  WiFi module fitted. This fixes some stability issues where a CM5
  would shutdown due to a spurious over-voltage condition on the
  non-connected WiFi power supply.
* Add memory barrier to the mbox handler
  Firmware issue 1944 reports receiving kernel warnings about firmware
  requests where the status return code is 0. This should not be
  possible, as handle_mbox_property always sets the top bit of the return
  code, with the bottom bit indicating success or failure. If the firmware
  had died, the firmware driver would report a timeout due to the lack of
  a mailbox interrupt, and that isn't happening.
  See: https://github.com/raspberrypi/firmware/issues/1944
* support dts files with size-cells of 2
  DTS files with a top-level #size-cells of 2 make a lot of sense for
  systems with a lot of RAM, but the firmware is currently inconsistent
  in its support for that. Fix up the other cases to honor #size-cells
  and #address-cells.
* Disable SDIO2 for CM5s without WiFi
  It has been observed that CM5s without WiFi hang on reboot. To prevent
  that, disable the sdio2 node on those devices.
  See: https://github.com/raspberrypi/linux/issues/6647
* arm_dt: Use dtoverlay_enable_node
  Convert the open-coded DT node status changes to use the new dtoverlay
  method dtoverlay_enable_node.
* dtoverlay: Add dtoverlay_enable_node
  Add a helper function for setting the status of a node.
2025-02-11 17:31:10 +00:00
Tim Gover
0190dbc122 pieeprom-2025-01-27: 2712: Add PARTITION_WALK option (latest)
* Walk the partition table if the requested partition is not bootable
  Previously, if the specified boot partition was not bootable the
  bootloader would stop and advance to the next BOOT_ORDER. If the
  new PARTITION_WALK option is set to 1 the bootloader will now
  check each partition in turn starting from the specified partition
  before advancing the BOOT_ORDER.
  This feature is intended for use with A/B systems to handle the case
  where autoboot.txt is missing / corrupted. This change enables
  the system to failover to the next available bootable partition.
  The autoboot.txt file is not scanned during the partition-walk
  phase i.e. there is no recursive processing of autoboot.txt files.
  This option is only supported on physical block devices
  (SD, NVMe, USB) and not RAMDISK. USB assumes a single high speed
  device, partition walks on multiple USB devices is not recommended
  and may cause timeouts.
* Improve keyboard handling in boot menu
  Try and make it more likely that we have enough time to perform key
  detection.
  Ignore mice, which were being enumerated and slowing things down.
2025-01-27 19:22:58 +00:00
Serge Schneider
4d5509905d salsa-ci: minimise yaml file and set variables on group level instead 2025-01-24 14:51:47 +00:00
Tim Gover
b67b21ddda imager: 2712: Move imager release to 2025-01-22 v2025.01.22-2712 2025-01-22 16:36:34 +00:00
Tim Gover
e96dc2959e Update changelog for 27.0-1 release 2025-01-22 10:28:39 +00:00
Tim Gover
dec53254f7 Merge remote-tracking branch 'pitowers/master' into debian/bookworm
* pitowers/master:
  2025-01-22: 2712: Promote 2025-01-22 to default release (default)
  pieeprom-2025-01-22: 2712: Add DT property for hash of signed boot image (latest)
  test: Update test script
  scripts: Failover to /usr/lib before /lib if FIRMWARE_ROOT is not set
2025-01-22 10:28:37 +00:00
Tim Gover
9c95b83551 2025-01-22: 2712: Promote 2025-01-22 to default release (default) 2025-01-22 10:21:04 +00:00
Tim Gover
7918c84b4b pieeprom-2025-01-22: 2712: Add DT property for hash of signed boot image (latest)
* Add DT /chosen property signed-boot boot.img hash
  Make the sha256 hash of the boot.img file available via
  device-tree /proc/device-tree/chosen/bootloader/boot_img_sha256 if
  signed boot is enabled.
* filesystem: GPT autoboot/reboot partition number fixes for Pi4 and older
* Fix problems when setting arm_freq_min=arm_freq and display clocks
  if performance governor is not enabled.
2025-01-22 08:45:40 +00:00
Serge Schneider
fe957abe8b salsa-ci: Add rpi jobs 2025-01-21 17:00:59 +00:00
Serge Schneider
1d4643c524 salsa-ci: fix minor typo 2025-01-21 16:56:23 +00:00
Tim Gover
478ad485ca test: Update test script 2025-01-19 11:04:52 +00:00
Tim Gover
0944712c0a scripts: Failover to /usr/lib before /lib if FIRMWARE_ROOT is not set
Update the scripts to follow "merged-/usr" conventions by default
https://wiki.debian.org/UsrMerge
2025-01-18 20:12:03 +00:00
Serge Schneider
78f8722a84 salsa-ci: set GIT_STRATEGY to 'clone' 2025-01-17 18:31:27 +00:00
Serge Schneider
6a2e95fefa salsa-ci: enable aptly 2025-01-17 18:21:44 +00:00
Serge Schneider
b888a5b047 salsa-ci: remove default runner tag 2025-01-17 18:21:27 +00:00
Tim Gover
011f8fb4bb Update changelog for 26.9-1 release 2025-01-17 16:05:43 +00:00
Tim Gover
170c73efd9 Merge remote-tracking branch 'pitowers/master' into debian/bookworm
* pitowers/master:
  pieeprom-2025-01-14: 2712: Add set_reboot_order API (latest)
  2712 release-notes.md: correct name of new config parameter
  pieeprom-2025-01-13: 2712: Improved SDRAM refresh timings for Pi5 - 16GB (latest)
2025-01-17 15:58:35 +00:00
Tim Gover
cc58b7d6ce pieeprom-2025-01-14: 2712: Add set_reboot_order API (latest)
* Add set_reboot_order API and config.txt properties
  If set_reboot_order is defined in config.txt or set via vcmailbox
  then this will override the bootloader config BOOT_ORDER property
  on the next reboot. The parameter is stored in a reset safe register
  and is cleared by the bootloader after reading it.
  Typically, the config.txt value only be used via rpiboot to
  override the boot-order on the next reboot. Otherwise, it should
  reside in a conditional section so that the boot order is not
  overridden on every reboot.
  Example, test network boot
  sudo vcmailbox 0x0003808b 4 4 0xf4612; sudo reboot
2025-01-14 15:17:39 +00:00
andrum993
6a7ca681cb 2712 release-notes.md: correct name of new config parameter 2025-01-13 17:08:16 +00:00
Serge Schneider
d8c0c6b42b Add salsa-ci.yml 2025-01-13 15:41:47 +00:00
Serge Schneider
c3e0e577f6 Update changelog for 26.8-2 release 2025-01-13 15:04:52 +00:00
Serge Schneider
d6894c6d00 Update lintian-overrides 2025-01-13 15:04:52 +00:00
Serge Schneider
bf14996005 Bump compat version to 12 2025-01-13 14:50:21 +00:00
Serge Schneider
99d17bb351 Bump standards version to 4.6.2 2025-01-13 14:49:38 +00:00
Serge Schneider
df2563e1e5 Move files from /lib to /usr/lib
Fixes lintian tag aliased-location
2025-01-13 13:13:21 +00:00
Tim Gover
62292b43ad pieeprom-2025-01-13: 2712: Improved SDRAM refresh timings for Pi5 - 16GB (latest)
* Improved SDRAM refresh timings for Pi5 - 16GB
* Add an option to wait for the power button to be pressed before booting.
  If POWER_OFF_ON_HALT=1 and WAIT_FOR_POWER_BTN=1 in the bootloader
  config then the bootloader will wait for either the power button
  to be pressed or an RTC alarm before booting. The wait state
  switches the PMIC to STANDBY mode which is the lowest possible
  power state.
2025-01-13 10:11:55 +00:00
Serge Schneider
e5a1ee09c7 Update changelog for 26.8-1 release 2025-01-09 08:46:10 +00:00
Serge Schneider
c59d44d0a3 Merge branch 'master' into debian/bookworm 2025-01-09 08:45:24 +00:00
Tim Gover
54d9c333a9 pieeprom-2025-01-08: 2712: Update SDRAM timings for BCM2712D0 products (latest)
* Update SDRAM timings for BCM2712D0 products.
2025-01-08 18:07:33 +00:00