-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
RPi no longer booting after upgrading to latest start.elf/fixup.dat #1445
Comments
We also observe the same issue with the latest |
I'll take a look. |
We've identified the problem - a fix will be released shortly. |
I appreciate that, thanks! |
The bug was introduced in bd816db, and caused your stub to not be loaded, the built-in default being used instead. As a result of the load-time optimisation in that release an external ARM stub would be loaded to address zero, which is fine for the VPU's memory system but our fread() implementation doesn't like it. |
See: #1445 firmware: armstub7: Configure the top 32 STB interrupts firmware: dispmanx: Remove elements cleanly that are totally offscreen negatively See: raspberrypi/linux#3735
See: raspberrypi/firmware#1445 firmware: armstub7: Configure the top 32 STB interrupts firmware: dispmanx: Remove elements cleanly that are totally offscreen negatively See: raspberrypi/linux#3735
rpi-update firmware should have a fix for this. |
Many thanks for the quick turnover. Much appreciated! We confirm that the new version of the firmware fixes the issue. At this stage I have to ask, assuming that you already have some kind of CI/testing facility for your binaries: Are there any chances you could add the booting of the Provided you have the means to automate the copying of start files to a media, and then boot a Raspberry Pi 4 with it, we would greatly appreciate if you could add the boot process and boot files we described above as one of the tests you perform, with validation that you do get the Thanks again. |
I'm afraid that there is more to this issue than the initial problem we reported. Whereas the commit from August 5th fixed the initial boot problem, where we couldn't even get the UEFI firmware to run, we are still being left with a major regression where GRUB (and thus Linux boot) is completely broken, whereas it worked absolutely fine with the The problem can be replicated as follows (this requires a few downloads):
After a few seconds, you are presented with the Debian installation screen, as expected. Now, replace This time, booting to the installer either freezes or produces GRUB error Therefore, another behavioural change has been introduced between July 31st and August 5th, that broke the ability for GRUB ARM64 to run a Linux kernel... |
Just a quick update to mention that (after having to fiddle with the baudrate, since the post July 31st So this explains why GRUB/kernel will complain about the Device Tree not being found and fail, since we don't pass something that we haven't been able to process. I'm still trying to identify exactly what has changed, from our perspective, to trigger that assert. But it may take a while before I can provide more data. Note that, if you want to get extended serial data that includes asserts, and after making sure that you set the baudrate to 180000, you can replace the release version of |
Another example context that looks to involve some of what is reported here is: RPi4B 4GiByte FreeBSD (in gradual development) uses an armstub8-gic.bin port and a u-boot port as one way to boot. Such boots using 542aceb (2020-Jul-17). But, attempting booting via the later versions of the firmware tried hangs up with the rainbow screen showing and the end of the serial output looking like: MESS:00:00:09.122140:0: brfs: File read: /mfs/sd/armstub8-gic.bin This is still true of 63b1922 (2020-Oct-08) firmware. armstub8-gic.bin expects to be loaded at address zero and u-boot (as configured/patched) expects to internally reserve/avoid that area and to cause the area to show up as reserved. (armstub8-gic.bin is over a page in size.) With the problematical firmware versions, u-boot does not get far enough to start putting debug messages to the console (when built to do so). |
Can you upload a build of u-boot.bin somewhere to demonstrate the problem? |
Another thing we are seeing is that the Device Tree seems to be corrupted during the early processing with newer versions of For instance, as per pftf/RPi3#22, we are seeing obvious signs of corruption such as with:
whereas it should say I'm still in the process of (slowly) investigating this (there's still a possibility that the corruption could come from TF-A and not Can you guys please validate that the Device Tree that's being handed over by the newer versions of All in all, if I were to take a guess, it would look to me like the post Jul. 31st version of |
Using the settings from the first post and bl31.bin I've managed to recreate a DT failure. I think it's a fairly simple fix. It took longer to debug because the stub doesn't disable kernel loading (offset 0xfc should be 0xffffffff if the firmware isn't expected to load it), and the kernel which was on the card was large enough to overwrite the DTB at 0x1f00000. |
Seeing this issue on Fedora too, various U-Boot available here: https://pbrobinson.fedorapeople.org/rpi-u-boot/ A work around was to enable the UART universally. Not sure if it's related but U-Boot crashes on the 8Gb model if there isn't a display plugged in. The config.txt we use is: # Raspberry Pi 2 [pi2] kernel=rpi2-u-boot.bin # Raspberry Pi 3 [pi3] kernel=rpi3-u-boot.bin # Raspberry Pi 4 [pi4] kernel=rpi4-u-boot.bin # Default Fedora configs for all Raspberry Pi Revisions [all] # Enable UART # Only enable UART if you're going to use it as it has speed implications # Serial console is ttyS0 on RPi3 and ttyAMA0 on all other variants # u-boot will auto detect serial and pass corrent options to kernel if enabled # Speed details: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=141195 # enable_uart=1 # Put the RPi into 64 bit mode # arm_64bit=1 # Early boot delay in the hope monitors are initialised enough to provide EDID bootcode_delay=1 # We need this to be 32Mb to support VCHI services and drivers which use them # but this isn't used by mainline VC4 driver so reduce to lowest supported value # You need to set this to at least 80 for using the camera gpu_mem=32 # Use eXtended firmware by default start_x=1 # New option to allow the firmware to load upstream dtb # Will allow things like camera, touchscreen etc to work OOTB upstream_kernel=1 # HAT and DT overlays. Documentation at Raspberry Pi here: # https://www.raspberrypi.org/documentation/configuration/device-tree.md # Each dtoverlay line is an individual HAT/overlay, multiple lines allowed # The dtoverlay=upstream must be present for Fedora kernels dtoverlay=upstream # dtoverlay=rpi-sense # Allow OS rather than firmware control CEC mask_gpu_interrupt1=0x100 # Without this sdram runs at 400mhz, instead of 450 # https://github.com/Hexxeh/rpi-firmware/issues/172 audio_pwm_mode=0 # Other options you can adjust for all Raspberry Pi Revisions # https://www.raspberrypi.org/documentation/configuration/config-txt/README.md # All options documented at http://elinux.org/RPiconfig # for more options see http://elinux.org/RPi_config.txt |
There's a test firmware for 4B (start4 and start4x) that should solve the DTB corruption problem here: https://drive.google.com/file/d/1MeFj10YIq6RNXfU5CVGKmDLVLoA2inRU/view?usp=sharing If the incorrect baudrates are arrived at after querying the core clock using mailbox message 0x30002 (GET_CLOCK_RATE) and the problem started appearing with 11e3c31 then that is due to a separate matter under discussion here at the moment. |
By the way, |
great, thanks a lot! |
U-Boot 2020.10-rc5 (Oct 05 2020 - 03:08:23 +0000) DRAM: 7.9 GiB |
These notes are for a 4 GiByte RPi4B with the MSD USB eeprom update, avoiding the issue of the status of u-boot 2020.10's handling of the xHCI for the 8 GiByte RPi4B. My github.com/pftf/RPi4 uefi/ACPI v1.20 USB3 SSD (no microsd card) context booted just fine with this but has been tolerating sufficiently recent firmware versions before this. (This and the below all involve EFI/BOOT/BOOTAA64.EFI so I'll not mention it explicitly after this.) As for armstub8-gic.bin and u-boot 2020.10: Booting via a MBR microsd card that has the EFI msdos file system material and a FreeBSD kernel on a ufs file system (where the kernel in turn uses the USB3 SDD for later stages and general operation), it boots all the way just fine. Booting via USB3-SSD-only context boots all the way just fine (now that I have the right partition type for the msdos file system involved). Overall: original FreeBSD 4 GiByte RPi4B problem fixed. |
@pelwell, is there any chance you could also provide a test firmware for the Pi 3? While the original issue (failure to boot into TF-A) was mostly opened against the Pi 4, I've been testing the subsequent issue (Device Tree corruption) on the Pi 3, so, if possible, I'd like to validate that your planned fix addresses what I've seen there. Thanks. |
Of course - the archive (reachable from the same download link) now includes start and startx (and fixups). |
Thanks a lot. The new I can see that the reported Device Tree size now accounts for the alterations carried out ( As to the serial baudrate change, we are indeed using mailbox |
A patch to change the GET_CLOCK_RATE behaviour has gone into the internal firmware repo in the last few minutes. An archive of the same four firmware variants including the patch is available here: https://drive.google.com/file/d/1Rb_hhJ1t2L9gEhPuxqk8V3Q2IoJVZ7XZ/view?usp=sharing |
See: #1445 firmware: arm_loader: Allow arm to see force_turbo and uart boosts bootcode: usb: Fix USB init for 2835 bootcode.bin
See: raspberrypi/firmware#1445 firmware: arm_loader: Allow arm to see force_turbo and uart boosts bootcode: usb: Fix USB init for 2835 bootcode.bin
Latest rpi-update firmware has the potential two fixes mentioned here. |
I confirm both the baudrate and Device Tree issues we were seeing on the Pi 3 are fixed with the latest from https://github.com/raspberrypi/firmware/tree/master/boot. Thanks. |
Is there anything outstanding on this issue? |
Not from my perspective. Both the original problem reported when the issue was opened and the subsequent matter we raised 9 days ago have been addressed. In other words, I am no longer aware of any regression that needs fixing, as far as my testing is concerned. |
FYI: The following may be related background information on what is enabled vs. what is not yet so, not necessarily as something 1445 should be dealing with. As far as I can tell from what I've recently learned, the 8 GiByte RPI4B VL805 handling vs. u-boot 2020.10 xHCI/USB3 issue is u-boot waiting on material from github.com/torvalds/linux/commits/master/arch/arm/boot/dts/bcm2711-rpi-4-b.dts (2020-Aug-18 as 258f92d). It has been reported by klaus4 that the updated .dtb file that would result would lead to triggering "RASPBERRYPI_FIRMWARE_RESET_ID_USB: bcm2711_notify_vl805_reset()" in u-boot. (This report was in a FreeBSD context, not here.) |
Does it boot if you comment out start_x=1 in config.txt ? edit @daniframinan that looks like a separate issue, please create a new bug report with full details of firmware / rpiupdate and any connected hardware |
Indeed, I seriously doubt that this is the same issue, because the one I reported was about Unless you are monitoring serial output, and using the same
then I'm afraid that what you are observing is something that is not related to this specific issue, and you should open a separate report. |
...which is a useful reminder to... |
When I replaced the 6.1 kernel on the 5.1 image, I also encountered the problem that the SD control_power pin was not defined. Is this a problem with uboot? Do I need to download the latest image and replaced the 6.1 kernel or other? `MESS:00:00:05.901070:0: brfs: File read: 79 bytes ` |
Posting on a 4 year old, unrelated, closed issue is not the best option. |
ok,thanks you |
A regression appears to have been introduced with the latest firmware in that we are no longer able to boot binaries such as the Trusted Firmware or the UEFI firmware. Reverting to an older version of the RPi firmware solves this issue.
Steps to replicate
bl31.bin
(A Raspberry Pi 4 build of the ARM Trusted Firmware binary) from https://github.com/tianocore/edk2-non-osi/blob/master/Platform/RaspberryPi/RPi4/TrustedFirmware/bl31.bin and save it to SD/USBstart4.elf
,fixup4.dat
andbcm2711-rpi-4-b.dtb
config.txt
:Result
The boot freezes after the following output on the serial console, with the multicoloured screen staying on:
Then, if you replace
start4.elf
andfixup4.dat
with a version published before 2020.07.14, everything works as expected, and you get the expected output:Note that commenting out the
device_tree_address=0x1f0000
,device_tree_end=0x200000
has no effect, so it's not a device tree setup issue.We are in the process of pinpointing the exact revision of
start4.elf
that introduced this issue, but since we didn't expect such a major regression and now have to scramble to fix our UEFI firmware downloads as a result, it might be a while before we can do so...The text was updated successfully, but these errors were encountered: