-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Recent commit to firmware breaks mainline linux kernel booting with uboot on RPi4B (Arch ARM) #1868
Comments
Can you confirm my understanding that, although the "bad" commit you reference includes kernel and firmware changes, you have seen a system go from good to bad by only changing the firmware? |
@pelwell - that is correct. One or more of the files I listed above seems to be breaking the boot of the non-RPi Foundation kernel, what I call scenario 2 in the following: Users of RPi hardware on ArchARM can run one of two kernels:
Both kernel packages have the dependency of raspberrypi-bootloader which is based on some of the files you provide in this repo (again, those which I have listed above). Again, this bug affects users of scenario 2. |
Thanks - with hindsight it was a dumb question, "mainline" being the operative word.
most of them being Pi 5-specific. I don't suppose you have any UART output, do you ( |
I don't have any hardware to read from the UART... I believe there are only 2 commits between the last good and first bad that affect the /boot dir of this repo, see: https://github.com/raspberrypi/firmware/commits/master/boot |
I was referring to the source tree (the versions will make sense to other Pi engineers).
Email me ([email protected]) your address and I'll get a few Debug Probes sent out to you. In the meantime, if you have a second Pi and a few IDC patch wires you can cross-connect them:
The numbers are pin numbers on the 40-pin header. Run minicom etc. on the other Pi, with the baudrate set to 115200, 8 data bits, 1 stop bit, no flow control. |
A number of active users have also reported this bug. I have invited them to help you debug as they may have both more time and the hardware to help. I am burning the candle at both ends. Link to forum thread: https://archlinuxarm.org/forum/viewtopic.php?f=15&t=16753 |
@graysky2 Thanks for reporting, could you please provide the affected U-Boot version? |
Out of the 34 commits, one stood out as being kernel related, seemingly harmless, and written by me. This download (https://drive.google.com/file/d/1iwBPjviagitJEEE2feV1eAsCIYJIsN2j/view?usp=sharing) is a special build of start4.elf & fixup4.dat with that one commit reverted. |
(also posted to the Arch forum, with mangled links) |
I just updated to 2024.01-1, prior to that, we were shipping a rather old version (2021.04).
When I unzip it, I only find If I update my system to the bad version of |
It should be OK now (the pitfalls of driving a double 4K PC desktop over VNC from a Macbook). |
OK, replacing both files from |
See: #1868 firmware: Increase DATA_READY_TIMEOUT in sdhost.h firmware: arm_loader/bootloader: Add HAT+ support firmware: hat_lib: Avoid an I2C double-close
See: raspberrypi/firmware#1868 firmware: Increase DATA_READY_TIMEOUT in sdhost.h firmware: arm_loader/bootloader: Add HAT+ support firmware: hat_lib: Avoid an I2C double-close
There is a potential fix in latest rpi-update firmware. |
Disregard my last message, I accidentally omitted installing |
You had me worried for a minute... |
I also verified that b208f8c successfully boots on both RPi4B and RPi5B with our |
Official upstream fix for raspberrypi/firmware#1868
Phew! That's a mean trick to play on my birthday! |
Ha! Happy Birthday! |
Thanks for fixing this so fast. AFAIU the root cause should be fixed in U-Boot v2024.04: |
btw: The same code is also present in the Pi5 bootloader. The fix from @pelwell will also be included in the next bump of the Pi5 firmware, tomorrow or early next week. |
@graysky2 I would like to note that uboot-raspberrypi 2024.01-1 breaks booting (with linux-aarch64) on RPI 3B+, even with raspberrypi-bootloader 20240214-1, if that matters. I tested again with the dtbs in 2021.04-1 (i.e., fb0bfa6), it doesn't work either. Instead of getting stuck at the rainbow screen, apparently the issue is that somehow the new uboot prevents the early init (script) from being able to find / mount the root filesystem. (Or maybe it just froze or so, I can't tell for sure. ssh access via Ethernet failed as well.) I can see that the microSD and its partition table is detected by the kernel though. initramfs was regenerated in the upgrade, but not in the downgrade (or the re-upgrade). boot.scr was always regenerated. |
Thank you for reporting. Two things to try:
|
…) (default) * arm_loader: Move non-kernels back to 512KB See: raspberrypi/firmware#1868 * Limit throttled frequency to OS requested frequency rather than config.txt frequency. See: raspberrypi#518
…) (default) * arm_loader: Move non-kernels back to 512KB See: raspberrypi/firmware#1868 * Limit throttled frequency to OS requested frequency rather than config.txt frequency. See: #518
@graysky2 Okay so apparently the cause is that since some point, I'm not sure it was just some kind of regression or it is something expected, and if it's the latter case, I have no idea what should be done in terms of alarm packaging. The bottom line is, it doesn't seem to be just about I suppose I'll just stick with the old version for now and build u-boot myself with Btw, there's a typo (extra |
Thanks for the report. Firstly, I fixed the typo: archlinuxarm/PKGBUILDs@7a526fb To confirm, if you simply substitute |
@graysky2 Well, when I used Note: FWIW, https://github.com/u-boot/u-boot/blob/v2024.01/scripts/kconfig/Makefile#L99 |
@tomty89 -
|
@graysky2 Well as I said, I tested 2024.01-4 with the patch fixed (i.e., 2024.01-5), it doesn't work by itself, but works when If we want things to work "OOTB", we would either need to have different packages for different board (at least something like pre-PI4 and post-PI4), or take it to upstream and see if anyone knows what they have broken. P.S. I do wonder if it's due to some conflict between |
Official upstream fix for raspberrypi/firmware#1868
Interesting changes since the last automatic update: * Enable network install * Enable over-clocking frequencies > 3GHz See: ttps://github.com/raspberrypi/firmware/issues/1876 * Adjust SDRAM refresh rate according to temperature and address a performance gap between 4GB and 8GB parts in benchmarks. See: raspberrypi/firmware#1854 * Support custom CA certs with HTTPS boot * Move non Kernel ARM stages back to 512KB raspberrypi/firmware#1868 * Assorted HAT+ and NVMe interop improvements. * Fix TRYBOOT if secure-boot is enabled. * Preliminary support for D0 and CM5.
Interesting changes since the last automatic update: * Enable network install * Enable over-clocking frequencies > 3GHz See: ttps://github.com/raspberrypi/firmware/issues/1876 * Adjust SDRAM refresh rate according to temperature and address a performance gap between 4GB and 8GB parts in benchmarks. See: raspberrypi/firmware#1854 * Support custom CA certs with HTTPS boot * Move non Kernel ARM stages back to 512KB raspberrypi/firmware#1868 * Assorted HAT+ and NVMe interop improvements. * Fix TRYBOOT if secure-boot is enabled. * Preliminary support for D0 and CM5.
Interesting changes since the last automatic update: * Enable network install * Enable over-clocking frequencies > 3GHz See: ttps://github.com/raspberrypi/firmware/issues/1876 * Adjust SDRAM refresh rate according to temperature and address a performance gap between 4GB and 8GB parts in benchmarks. See: raspberrypi/firmware#1854 * Support custom CA certs with HTTPS boot * Move non Kernel ARM stages back to 512KB raspberrypi/firmware#1868 * Assorted HAT+ and NVMe interop improvements. * Fix TRYBOOT if secure-boot is enabled. * Preliminary support for D0 and CM5.
Describe the bug
Using the current files on RPi4 8G causes the device to get stuck at the "rainbow" screen rather than booting
To reproduce
Booting linux-aarch64 (kernel) package with raspberrypi-bootloader-20240208
Expected behaviour
RPI4 should boot
Actual behaviour
RPi4 is stuck at "Rainbow" screen
System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
cat /etc/rpi-issue
)? (No such file)2023/12/14 16:43:25
)Linux rpi4 6.7.4-1-aarch64-ARCH #1 SMP PREEMPT_DYNAMIC Tue Feb 13 13:34:32 EST 2024 aarch64 GNU/Linux
)?Logs
If applicable, add the relevant output from
dmesg
or similar.There is no dmesg output/stuck on "rainbow" screen
Additional context
Last known good commit = 5f795d1
First known bad commit = 2a1e5bf
The last know good is packaged in ArchARM's raspberrypi-bootloader version 20240122: archlinuxarm/PKGBUILDs@dedfb89
The first known bad is packaged in ArchARM's raspberrypi-bootloader version 20240208: archlinuxarm/PKGBUILDs@77ae14d
To fix the issue, users can simply downgrade to 20240122-1 and the system boots fine, so I believe that is pointing to a change between those two commits.
Files provided by ArchARM's raspberrypi-bootloader package:
The text was updated successfully, but these errors were encountered: