NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.75k stars 13.86k forks source link

Latest kernel aarch64 SD card image fails to boot from USB on Raspberry Pi 4 #143884

Closed peat-psuwit closed 2 years ago

peat-psuwit commented 2 years ago

Describe the bug

The "nixos.sd_image_new_kernel.aarch64-linux" image from unstable channel fails to boot when flashed to a USB drive. The boot process hangs early in the boot process.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Flash this image to a USB drive. The tested build is build 156837727.
  2. If using UART, update /boot/extlinux/extlinux.conf and change ttyS0 to ttyS1.
  3. Plug this drive to a RPi 4 with updated EEPROM. Power it on.

Expected behavior

The image boots to the shell.

Screenshots

The boot process hangs with the following boot message, logged from UART:

RPi4HangBoot.txt

The boot proceeds from U-Boot to the kernel, but then hangs there.

Additional context

According to [1], it seems like in 5.14 the option CONFIG_RESET_RASPBERRYPI is demoted from y to m. The same email seems to suggest that the module (reset-raspberry.ko) is needed for USB to work. I checked the initrd of the image; the module isn't there. So, I guess if this module is included in the initrd, it could fix the problem. I'll try to create a PR to do that.

[1] https://www.spinics.net/lists/arm-kernel/msg920676.html

Notify maintainers

Assumes that nixos/modules/profiles/all-hardware.nix is how kernel modules is included in the SD card image: @samueldr Also tag SD card installer file for good measure: @petabyteboy

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result. -- Not applicable, image does not boot.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

peat-psuwit commented 2 years ago

Ping @samueldr. Anything else for that PR?