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

Updating the Raspberry Pi 4 bootloader #951

Open
kkaempf opened this issue Dec 8, 2021 · 3 comments
Open

Updating the Raspberry Pi 4 bootloader #951

kkaempf opened this issue Dec 8, 2021 · 3 comments
Labels
architecture/arm64 architecture/rpi4 kind/documentation Improvements or additions to documentation kind/enhancement New feature or request

Comments

@kkaempf
Copy link
Contributor

kkaempf commented Dec 8, 2021

Reading the Raspberry Pi documentation I came across updating the bootloader which is stored in an EEPROM on RPi4.

(adding documentation label as this needs to be clearly documented)

Is your feature request related to a problem? Please describe.

RPi 3 has the bootloader in bootcode.bin on the first FAT partition. Updating it just needs a new cOS image.

However, RPi4 stores the bootloader in an on-board EEPROM and needs to run a bootloader-update binary.

Describe the solution you'd like

  • cOS needs to treat the bootloader as part of the operating system layer and flag new versions as OS updates
  • probably needs to report the bootloader version as part of the OS layer software manifest (?)
  • booting cOS (on RPi4 !) with a new bootloader needs to
    • detect that a new bootloader is present
    • run the update-bootloader binary to store the update in EEPROM
    • reboot (with the new bootloader)

Describe alternatives you've considered

None

Additional context

See links above

@kkaempf kkaempf added kind/documentation Improvements or additions to documentation kind/enhancement New feature or request architecture/arm64 architecture/rpi4 labels Dec 8, 2021
@dragonchaser
Copy link
Contributor

I am not sure if we should implement that, the bootloaders are usually fine for ages. Messing with peoples hardware might have unwanted implications. If somebody wants to update the firmware of the device, it is usually easy to quickly run a official raspbian image and do that through raspi-config.

@kkaempf
Copy link
Contributor Author

kkaempf commented Dec 8, 2021

Well, we should at least have documentation and a plan, in case someone wants to mass-deploy RPi4s (or similar edge systems).

@kkaempf
Copy link
Contributor Author

kkaempf commented Dec 8, 2021

Further down in the docs, I find this:

recovery.bin

At power on, the BCM2711 ROM looks for a file called recovery.bin in the root directory of the boot partition on the SD card. If a valid recovery.bin is found then the ROM executes this instead of the contents of the EEPROM. This mechanism ensures that the bootloader EEPROM can always be reset to a valid image with factory default settings.

This would mean it's sufficient to provide the latest bootcode in recovery.bin

@mudler mudler removed their assignment Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture/arm64 architecture/rpi4 kind/documentation Improvements or additions to documentation kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants