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
Add rpi-eeprom firmware #939
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
Seems to work here, with
|
On the next OTA update, the file is present again, do that flash it again? |
The files are still there after the update, so I assume it detects if its newer? I don't have diagnostic output on UART anymore since the update also sets the config back... |
Look like, so we have still open the rpi4_devconfig before we can merge it |
I tried to make it update again, but it just wouldn't... I am now on 2020-09-03, and it seems that this version does not automatically update from SD card. Quote from https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md:
|
Yes it checks and only applies the .upd file is the current firmware does not match. It will show this info over HDMI as well telling you if update was skipped.
This part is annoying for development. If you have a custom eeprom with NETCONSOLE or UART it gets overwritten. Maybe we can have a special dev file inside the boot partition and if it exists the eeprom file is removed or renamed during rauc update?
Correct, there was some big problem with self-update from SD card: raspberrypi/rpi-eeprom#209 So this technique is mostly useful for USB boot scenarios. In this PR I customized USB_PWR_OFF_TIME for the eeprom to fix issues with some types of drives: raspberrypi/rpi-eeprom#241 |
|
||
define RPI_EEPROM_BUILD_CMDS | ||
$(@D)/rpi-eeprom-config $(@D)/$(RPI_EEPROM_FIRMWARE_PATH) --out $(@D)/default.conf | ||
(cat $(@D)/default.conf | grep -v ^$$; echo USB_MSD_PWR_OFF_TIME=1500) > $(@D)/boot.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I changed USB_MSD_PWR_OFF_TIME from 1000 to 1500 as workaround for some drives not booting after soft-reboot.
Soon there will be a new beta firmware with a better fix, so we can use this same technique to update to that as part of HassOS update.
Not in the SD card case, it seems.
I tried to just rebuild the upd file manually and flash it. I think its good enough, I hope we don't have to do this very often 😄
Hm, yeah that is a bit annoying. I think most people still run SD-card boot. Can we update via recovery.bin? |
We should not allow user to customize it. It's already hard to maintain, if every device has x variation to run, it's killing us or bite later in our a**. We decide what we want that people run and we can support. |
Yes I think so. The recovery.bin is a special firmware, but once it loads it will look for pieeprom.upd and flash it, then rename itself to recovery.000 You can find it here: https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware/stable/recovery.bin According to https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md, the recovery.bin can only be loaded from SD and is ignored on USB boot. So I think we simply need to place the recovery.bin into boot and then it will pick up and flash the pieeprom.upd on the next boot.
|
This does not work for me either. Leads to a red screen 😕 |
This comment has been minimized.
This comment has been minimized.
this improves boot from USB and speeds up boot times. also includes sd card v1 boot reliability. see raspberrypi/rpi-eeprom#246 i removed the previous USB_MSD_PWR_OFF_TIME override since it is no longer required. added HDMI_DELAY=0 so hdmi display is always visible for debugging.
I am generally ok merging this, however currently it uses a beta firmware. I rather prefer not shipping a beta firmware. Let's wait until the firmware gets promoted to stable. Have there been issues with 2020-09-03? |
With the 2020-09 stable firmware, many drives get stuck inside the bootloader after a soft reboot. |
Interesting thread. Thinking a bit more about this I think we should add the current beta update as you propose: Only people with USB boot will get the update applied. And for those this new beta firmware seems to really bring improvements. And since your tests were successful too, let's give it a go. |
Would this mean that starting with 5.6 there will be no more need to update the RPI boot firmware through Raspberry Pi Imager before installing HA on an RPi 4 with SSD attached through USB? Or will it still be necessary to update with the Imager at least once to get HA running for the first time. And from there on HA would install further boot EEPROM updates? I would update the guide to reflect your answer. |
pieeprom.upd/sig files which we can put into the bootfs partition of the rpi4 image so that a rpi4 (if booted from USB) will be able to update its EEPROM immediately. This refs home-assistant/operating-system#939
There is a chicken egg issue here: The update can only happen if the current firmware supports that feature/is capable to actually talk to that USB SSD drive attached. This is not the case with older firmwares. So depending on what is on the Pi now, a manual upgrade is required first still... |
This will allow us to take advantage of the RPI4 self-update feature to push new stable eeprom bootloader firmwares as part of HassOS updates
cc #899 (comment) @Jpsy