RPi firmware in 10.0.2 not updating

  • Hi,

    I made a 10.0.2 build for my RPi 4 yesterday which includes updated firmware for the device.

    When switching on the update setting and rebooting the RPi LE does make an attempt to update the firmware, but after the boot finishes the old version is still present.

    The messages during the logo display during boot are disappearing too fast to be able to read them. Same when shutting down for that matter.

    I don't have the impression that any of the log share logs include those messages already.

    What could be preventing the firmware from being updated and is there a way to log those boot/shutdown messages or pause the screen?

  • Did you install the firmware? It's not automatic. You have to open the LE Settings app, go to firmware, and at the bottom there is 2 toggles to install the firmware on next reboot.

    I usually just jump into ssh and run "rpi-eeprom-update -a" and reboot. LE is tracking the "critical" channel, not "stable" or "beta".

  • Did you install the firmware? It's not automatic. You have to open the LE Settings app, go to firmware, and at the bottom there is 2 toggles to install the firmware on next reboot.

    I usually just jump into ssh and run "rpi-eeprom-update -a" and reboot. LE is tracking the "critical" channel, not "stable" or "beta".

    Yes, that is what i meant with "switching on the update setting". Than at boot it does show some firmware messages, but nothing gets applied.

  • Yes, that is what i meant with "switching on the update setting". Than at boot it does show some firmware messages, but nothing gets applied.

    If you log in via ssh, what does "rpi-eeprom-update" show? I never use the settings app, but I just updated via ssh using the stable channel and that method works fine.

    What the script does is stages a recovery.bin in /flash, and 2 files pieeprom.upd and pieeprom.sig, the rest is handled by the Raspberry Pi hardware itself. The bootloader will look for recovery.bin, which I think is the flashing program and that looks for the signature file & update file to flash.

    So perhaps, toggle the update, login via ssh, and check the /flash folder to see if these three files exist. If they do, and after rebooting it doesn't work, then maybe this issue may help with that as it sounds like maybe boot order plays a role or having USB drive & SD card may be an issue?

    rpi-eeprom-update don't flash · Issue #220 · raspberrypi/rpi-eeprom
    Hello, I was unable to flash the eprom again, the rpi-eeprom-update says that flash it ok, but then after a reboot all remains the same. This is RPI 4 b model…
    github.com
  • There is no "/flash", not before nor after toggling the switch. Where should it be located exactly?

    "rpi-eeprom-update -b" gives me "/boot", but nothing changes in that folder.

    Oddly enough though "rpi-eeprom-update -l" gives me "/lib/firmware/raspberrypi/bootloader/default/pieeprom-2021-04-29.bin", not the expected "2022-01-25" version that shows in the settings. That version of the bin is nowhere to be found, not in critical, beta or stable. So it looks like it keeps staging the current version.


    It would be good to confirm this if I know where the files are placed and if I can somehow capture the messages on the screen during boot.


    EDIT

    I double checked my build and the new files are included in the tar's SYSTEM file at "/usr/lib/kernel-overlays/base/lib/firmware/raspberrypi/bootloader/critical/", but not after flashing it in "/lib/firmware/raspberrypi/bootloader/critical/".

    My gods, I feel like an idiot...the journal pointed out to me that I've been connecting to the wrong RPi...

    I managed to take a photo of the messages after ten attempts. It's basically the same message as the output of performing "rpi-eeprom-update -a" manually.

    The contents of the /flash partition does not change when toggling the setting. This message tells me that it actually happens when performing the reboot. But the subsequent reboot does not manage to actually perform the update.

    Staging the update manually through ssh, followed by a reboot, does update the firmware. I've got the latest up and running now. But this means the update through the settings is broken somehow.

    Please let me know if/how I can perform additional analysis to get this fixed for others.

    Edited 2 times, last by Forage: Because I'm an idiot (March 6, 2022 at 3:08 PM).

  • Confirm. I Have tried to update firmware through settings a number of times, but after reboot going back into settings it does not appear to have happened.

  • The contents of the /flash partition does not change when toggling the setting. This message tells me that it actually happens when performing the reboot. But the subsequent reboot does not manage to actually perform the update.

    The LE app only touches a file /storage/.rpi_flash_firmware with the contents of the switches selected, at reboot when this file exists LE starts a target for flashing firmware. However this only installs from the critical channel, so that's going to be the January 25th EEPROM you see with "rpi-eeprom-update". It sounds like that part is all working correctly, but perhaps the command run during the target has an issue, do you have a screen grab?

    Maybe you can run this via ssh and see if there is any error? It will just stage the eeprom updates (same as rpi-eeprom-update -a):

    USE_FLASHROM=0 /usr/bin/.rpi-eeprom-update.real -A bootloader -A vl805

    You should see the same output as rpi-eeprom-update -a, and if you can check for the existence of the flag file /storage/.rpi_flash_firmware after toggling in the LE app the contents should have one or both of these set to yes:

    BOOTLOADER=yes

    VL805=yes

  • This is all working nicely yes. What I see during the reboot is exactly what I included in the previous post. So the "/storage/.rpi_flash_firmware" file is created when enabling the options in the settings and it does trigger "rpi-eeprom-update -a" to be run at boot. The text is shown, but the subsequent automatic reboot does nothing. So either "rpi-eeprom-update -a" is not able to stage the files in the "/flash" partition during boot, unlike when doing it manually, or the RPi has trouble dealing with the files during the automatic reboot.

  • I cannot reproduce this here with 10.0.2 running from SD card, Apr 2021 bootloader was successfully updated to Jan 2021 version as expected.

    Are you booting from USB? Please also post the output of rpi-eeprom-config, if self updates are disabled this would explain the issue when trying to update with USB boot.

    so long,

    Hias

  • .Are you booting from USB? Please also post the output of rpi-eeprom-config, if self updates are disabled this would explain the issue when trying to update with USB boot.

    The output of just rpi-eeprom-config is:

    I'm booting from a USB stick yes, should that make a difference?

  • Forage that was the output of rpi-eeprom-update, not rpi-eeprom-config.

    But as the output shows that your bootloader eeprom is up to date I'd say everything is fine on your side :)

    so long,

    Hias

  • Forage that was the output of rpi-eeprom-update, not rpi-eeprom-config.

    But as the output shows that your bootloader eeprom is up to date I'd say everything is fine on your side :)

    Sorry, I misread:

    Code
    LibreELEC:~ # rpi-eeprom-config
    [all]
    BOOT_UART=0
    WAKE_ON_GPIO=1
    POWER_OFF_ON_HALT=0

    Yes, all is fine now because I manually updated the firmware. As mentioned above I'm not the only one who has the problem so it might be worth getting it fixed.

  • I could reproduce the issue, but it'll be a bit tricky to solve - we probably should rework bootloader update handling in the LE settings addon (which is quite a mess).

    The problem is that rpi-eeprom-update embeds a timestamp in the .sig file, and as the systemd service runs prior to time being set via NTP it'll be before the "current" eeprom timestamp and thus the bootloader skips self-update when booting from USB.

    Just ssh in and run "rpi-eeprom-update -a" as a workaround for now, this will work fine (at least if system time has been set via NTP).

    so long,

    Hias

  • Are you booting from USB? Please also post the output of rpi-eeprom-config, if self updates are disabled this would explain the issue when trying to update with USB boot.

    I believe this should be reworked as well otherwise it's easy to fell into deadlock (when an USB boot is the only possible way for some reason). And in this case both bootloader upgrade and any bootloader configuration changes are blocked.

  • I believe this should be reworked as well otherwise it's easy to fell into deadlock (when an USB boot is the only possible way for some reason). And in this case both bootloader upgrade and any bootloader configuration changes are blocked.

    LE already cleans up bootloader update files in /flash during bootup if bootloader (self-)update didn't pick them up and/or remove them. This also won't deadlock, bootloader self-update had such a potential issue before timestamps were introduced, but this has been resolved long ago.

    so long,

    Hias

  • Well, unfortunately in my case it is a deadlock on LE 11 Nightly 20220308. I am stuck with bootloader 2021-07-06 despite LE offers update to 2022-01-25 but it does not work due to boot from USB & self-update disabled in bootloader config. The must of booting from microSD card to fix that is a pain...