Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpi 5 cannot boot to multi-boot partitions #1853

Closed
procount opened this issue Dec 6, 2023 · 7 comments
Closed

Rpi 5 cannot boot to multi-boot partitions #1853

procount opened this issue Dec 6, 2023 · 7 comments

Comments

@procount
Copy link

procount commented Dec 6, 2023

The Pi5 boot loader can use autoboot.txt (boot_partition=n) to boot to an alternative partition, but neither sudo reboot n nor ::syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, n) seem to work.
I believe this feature might have been delayed til post-launch along with some other improvements in that area.
Any idea when it might be implemented?

@timg236
Copy link

timg236 commented Dec 7, 2023

We are looking into it. Possibly a kernel issue since the magic numbers don't seem to get to the bootloader.

@procount
Copy link
Author

procount commented Dec 7, 2023

Just FYI - I'm using the 6.1.54 aarch64 kernel.
The same kernel reboots fine on a Pi4 and other models, whether in PINN, Raspios64-lite or raspios64 (standard).
It's only the Pi5 where it fails.
I upgraded raspios 64 lite to the latest 6.1.63 and it still fails to reboot to the correct partition.

@timg236
Copy link

timg236 commented Dec 13, 2023

The kernel side has been fixed but a firmware update will also be required. There was a late change to support USB-PD that refactored code causing the PM_RSTS value to be lost in the firmware before the partition number was checked.
raspberrypi/linux#5785 (comment)

@procount
Copy link
Author

Many thanks.
Please advise when it is complete so I can test it.
I guess I will also need to advise users to upgrade their firmware in eeprom, so an indication of the minimum eeprom version or commit id etc would be useful. Or maybe I could just push out the new version via PINN if the user's present version is not new enough?

@timg236
Copy link

timg236 commented Dec 13, 2023

Please find attached a bench-tested version of the firmware.
rpi-eeprom-recovery.zip

I think this can go to the bootloader 'latest' release pretty soon because it's a very small fix.

FYI rpi-update can now update the bootloader "SKIP_BOOTLOADER rpi-update". I'm hoping that this will allow us to get bug fixes tested earlier so we can reduce the delay before making bootloader updates generally available.
raspberrypi/rpi-update@62ef428

timg236 added a commit to timg236/rpi-eeprom that referenced this issue Dec 14, 2023
* Fix an issue where the boot partition parameter in PM_RSTS was cleared
  before being checked.
  raspberrypi/firmware#1853
* Add a specific fatal error pattern for RP1 not found - 4 long - 3 short
@procount
Copy link
Author

I updated the eeprom, applied the kernel fix to 6.1.54 and It works - PINN is multi-booting again on the Pi5!
Many thanks 😄

@timg236
Copy link

timg236 commented Feb 29, 2024

I think this works now and fixes are in APT / default EEPROM. Please re-open if that's not the case

@timg236 timg236 closed this as completed Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants