nix-community / raspberry-pi-nix

NixOS modules to aid in configuring NixOS for raspberry pi products
MIT License
142 stars 34 forks source link

When using uboot, sometimes rpi5 fails to boot #16

Open ghostbuster91 opened 3 months ago

ghostbuster91 commented 3 months ago

Hi, first of all, thanks for your work on this project :pray:

I've just tried running nixos from the example repository (both build from sources and using the published images) but my rpi5 gets stuck on the first screen with uboot logo. I am not sure how to debug it since there are no logs or anything like that. Any idea what could be the reason? The default rpi system is running fine. Not sure if that matters but I have a nvme hat installed (with the rpi system on it).

rszyma commented 3 months ago

Same here. Sometimes it gets stuck on uboot screen when rebooting, and seemingly randomly either it gets unstuck on it's own after like 1 minute or I have to do hard reset 1-2 times and hope it boots normally next time. Also, maybe related, I'm not sure if there should be generation selection on uboot screen, but it doesn't show up.

tstat commented 3 months ago

That's interesting -- I'm not sure why that would be, but if I were you I would just boot with the normal rpi boot process by disabling uboot raspberry-pi-nix.uboot.enable = false (option doc). The main disadvantage is that you can't switch generations in the bootloader, that's kindof difficult with uboot anyway though.

@rszyma I have always seen the uboot generation selection, but I previously experienced a different issue where my usb keyboard presses weren't recognized by uboot, so I could only interact with uboot/pick a different generation over uart.

jDmacD commented 2 months ago

same happening to me. I have two identical rpi5s. The u-boot logo will show in the corner, with no generations menu. It feels like the longer I leave it, the more likely it is to boot successfully after a reset. Is there anyway of debugging this with a serial connection or something?

adminy commented 2 months ago

same here, Sounds like uboot doesn't work with pi 5 properly yet. I see logo, never got past the logo screen. trying without uboot enabled works. Just wondering if I set pin-kernel.enable = false; would this behave any differently?!

Also I see green dots over hdmi, something not right with graphics. But tested working with 24.11 now.

tstat commented 2 months ago

Is there anyway of debugging this with a serial connection or something?

Yes, uboot writes to uart. I have used that on rpi4 a good bit, but not yet on rpi5.