-
Notifications
You must be signed in to change notification settings - Fork 1.7k
bootcode.bin: Initrd loading seems to be broken #1750
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
Comments
bootcode.bin only loads start.elf and fixup.dat. The OS and initrd are loaded by start.elf UART logging adds some delays. If you revert the BOOT_UART change and just add uart_2ndstage=1 to config.txt does that have the same effect? |
Adding |
Make sure they are matching (e.g. start_x.elf and fixup_x.dat) and they are the ones you are using (start_x.elf only used if start_x=1 is in config.txt). But should be easy to test if you are doing the right thing (it will boot and |
I think I narrowed it down to these commits:
Next commit
|
Thanks - that's really helpful. Unfortunately for us that short list of commits consists of 3 that are clocking-related, and 5 which look as though they should be harmless. |
Yikes. If you have any new firmware binaries, feel free to contact me. :) |
There is a trial firmware, with just the 3 clock-related patches reverted, available to download here: https://drive.google.com/file/d/1g-F3KC2Kp14MSrJR7gYPPCQ_eK43TyEv/view?usp=sharing |
I previously used the |
Remove start_x=1 from config.txt and use the files start.elf/fixup.dat. |
Just to be sure.
However, that didn't do the trick. :( I still have to add |
Let's try again, this time reverting all the firmware commits between those two hashes: https://drive.google.com/file/d/1e0jiW91R8SD7l-rZRaCqmEv4A9utZ64e/view?usp=sharing |
This one works. |
That's a relief - I don't like Heisenbugs. If I can't see the problem after reading the remaining commits, I may have to resort to a binary chop. |
Next one, this time with just one specific commit reverted: https://drive.google.com/file/d/1KX5VtdS5ItX5_HPHDyObhR-4k8iNefvY/view?usp=sharing |
Could you also tell me if you have any cameras attached, and if so, which ones? |
Yes, I do have one attached. I think it's this one: 'Raspberry Pi Camera Module 2 NoIR'. It works with:
|
Ooh, interesting. Sorry, @naushir - that's a top-of-tree firmware + a reversion of 89af8e130aa635d8c31c0c3394461a7605858260. |
Oops! I have no idea how that change could cause this issue. I'll look into it.... |
@flipreverse can you tell me the size of your init.gz file? Additionally, if you unplug your camera, do you still get the failure on boot? |
The init.gz is about 8.3MB. Yes, it works without activating the secondary stage uart if I unplug my camera. Firmware version:
|
…ning block firmware: arm_loader: Raise maximum gzipped kernel size firmware: arm-loader: Indicate tryboot status via /proc/device-tree/chosen/bootloader/tryboot firmware: arm_loader: Increase TFTP block size to 1468 bytes See: raspberrypi/rpi-eeprom#375 firmware: Add kernel= logging firmware: camera_auto_detect changes See: #1750
…ning block firmware: arm_loader: Raise maximum gzipped kernel size firmware: arm-loader: Indicate tryboot status via /proc/device-tree/chosen/bootloader/tryboot firmware: arm_loader: Increase TFTP block size to 1468 bytes See: raspberrypi/rpi-eeprom#375 firmware: Add kernel= logging firmware: camera_auto_detect changes See: raspberrypi/firmware#1750
@flipreverse there is an rpi-update firmware with a possible fix for this. |
This version looks good. Out of curiosity: What was the cause of this bug? |
@naushir provided the fix, so I'm not certain. |
Yes, it reverted the change that moved the auto-detection routine into a separate thread. |
Fix was released in 2b3cef2 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
bootcode.bin
is responsible for loading the kernel image as well as the initrd.This, however, does not happen consistently. If the boot uart is enabled, it works.
Otherwise, not.
To reproduce
Create an initrd
mkinitramfs -o /boot/init.gz
for my overlayfs setup.Enable it in
/boot/config.txt
:initramfs init.gz
Ensure boot uart is disabled.
Expected behaviour
The initrd is loaded, and my overlayfs is set up properly.
Actual behaviour
The kernel fails to load the initrd. See dmesg output below.
System
Raspberry Pi 2 Model B Rev 1.1
cat /etc/rpi-issue
)?Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 66255495f29be5d09b765d081aff6fc0f11e59b4, stage2
vcgencmd version
)?uname -a
)?Linux hyperion 5.15.68-v7+ #1587 SMP Tue Sep 20 11:15:23 BST 2022 armv7l GNU/Linux
Logs
Additional context
If I, however, enable the boot uart as described here, everything works fine. The initrd is loaded, and my overlayfs works. I successfully repeated this procedure multiple times, when writing this post.
The text was updated successfully, but these errors were encountered: