Skip to content
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

EDK2: DeviceTree active on Pi 4 4 GB Rev 0 fails to load USB Driver, fails to boot #1856

Open
PackElend opened this issue Dec 31, 2024 · 2 comments
Labels

Comments

@PackElend
Copy link

PackElend commented Dec 31, 2024

Describe the bug

I provisioned Fedora CoreOS on the Raspberry Pi 4.
I'm able to deactivate the 3 GB limit and boot into CoreOS.

As soon as I activate DeviceTree in Bios it hangs after finishing systemd-vconsole-setup.service, systemd-vconsole-setup - Configure the virtual console at boot at Linux.org.

Image, vconsole ![image](https://github.com/user-attachments/assets/6dad27af-170a-4905-9a9b-21eee8067304)

It hangs at dracut.initqueue

At the end, it says

...
/lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fdsik\x2fby-uuid\x2f2be-46c03-0a30-4de3-8caf-e442e8d4a31e.sh
...
Warning: /dev/disk/by-uuid/ 2be46c03-0a30-4de3-8caf-e442e8d4a31e does not exist

That is the root disk:

admin@CoreOS:~$ lsblk --fs
NAME   FSTYPE FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  erofs                                                                       
sda                                                                                
├─sda1                                                                             
├─sda2 vfat   FAT16 EFI-SYSTEM 7B77-95E7                                           
├─sda3 ext4   1.0   boot       47f701cd-9b40-4673-8e2a-9cbbad8e1439  183.4M    41% /boot
└─sda4 xfs          root       2be46c03-0a30-4de3-8caf-e442e8d4a31e   25.1G    14% /var
                                                                                   /sysroot/ostree/deploy/fedora-coreos/var
                                                                                   /etc
                                                                                   /sysroot
Image, initqueue

image

Provisioning Fedora CoreOS on the Raspberry Pi 4 :: Fedora Docs

Reproduction steps

  1. Provisioning Fedora CoreOS on the Raspberry Pi 4 :: Fedora Docs
  2. boot
  3. power off
  4. activate DeviceTree
  5. boot

Expected behavior

normal boot

Actual behavior

It hangs at dracut.initqueue

System details

bare matel on Raspberry Pi4

admin@CoreOS:~$ sudo rpm-ostree status
State: idle
AutomaticUpdatesDriver: Zincati
  DriverState: active; periodically polling for updates (last checked Tue 2024-12-31 21:55:19 UTC)
Deployments:
● fedora:fedora/aarch64/coreos/stable
                  Version: 41.20241122.3.0 (2024-12-16T21:54:30Z)
               BaseCommit: 4c2285b3993e7c505ae167fbcf1d14dfa353a7c05732c79e7ecd67732e74ef55
             GPGSignature: Valid signature by 466CF2D8B60BC3057AA9453ED0622462E99D6AD1
          LayeredPackages: iwlwifi-dvm-firmware NetworkManager-wifi

  fedora:fedora/aarch64/coreos/stable
                  Version: 41.20241122.3.0 (2024-12-16T21:54:30Z)
                   Commit: 4c2285b3993e7c505ae167fbcf1d14dfa353a7c05732c79e7ecd67732e74ef55
             GPGSignature: Valid signature by 466CF2D8B60BC3057AA9453ED0622462E99D6AD1
admin@CoreOS:~$ rpm-ostree --version
rpm-ostree:
 Version: '2024.8'
 Git: b99fe35297d049618edcef263dedcecbb5fec572
 Features:
  - rust
  - compose
  - container
  - fedora-integration

Butane or Ignition config

variant: fcos
version: 1.0.0
passwd:
  users:
    - name: admin
      groups:
        - "sudo"
        - "docker"
      password_hash: hidden

systemd:
  units:
    - name: docker.service
      enabled: true

    - name: containerd.service
      enabled: true
    - name: [email protected]
      dropins:
      - name: autologin-core.conf
        contents: |
          [Service]
          # Override Execstart in main unit
          ExecStart=
          # Add new Execstart with `-` prefix to ignore failure
          ExecStart=-/usr/sbin/agetty --autologin admin --noclear %I $TERM
          TTYVTDisallocate=no          
storage:
  files:
    - path: /etc/hostname
      mode: 0644
      contents:
        inline: |
          CoreOS          
    - path: /etc/profile.d/systemd-pager.sh
      mode: 0644
      contents:
        inline: |
          # Tell systemd to not use a pager when printing information
          export SYSTEMD_PAGER=cat          
    - path: /etc/sysctl.d/20-silence-audit.conf
      mode: 0644
      contents:
        inline: |
          # Raise console message logging level from DEBUG (7) to WARNING (4)
          # to hide audit messages from the interactive console
          kernel.printk=4          
    - path: /etc/ssh/sshd_config.d/20-enable-passwords.conf
      mode: 0644
      contents:
        inline: |
          # Enable SSH password login
          PasswordAuthentication yes   
	- path: /etc/NetworkManager/system-connections/wifi1.nmconnection
      mode: 0600
      contents:
        inline: |
          [connection]
          id=Local
          type=wifi
          interface-name=wlan0

          [wifi]
          ssid=SRF_E090
          mode=infrastructure

          [wifi-security]
          key-mgmt=wpa-psk
          psk=hidden

          [ipv4]
          method=auto

          [ipv6]
          method=auto

    - path: /etc/NetworkManager/system-connections/wifi2.nmconnection
      mode: 0600
      contents:
        inline: |
          [connection]
          id=MobileHotSpot
          type=wifi
          interface-name=wlan0

          [wifi]
          ssid=FP4
          mode=infrastructure

          [wifi-security]
          key-mgmt=wpa-psk
          psk=hidden

          [ipv4]
          method=auto

          [ipv6]
          method=auto		
		  
  links:
    - path: /etc/localtime
      target: ../usr/share/zoneinfo/Europe/Berlin

Additional information

I provisioned 100% on Raspberry Pi OS, without any Fedora OS running, using Podman Images.

my procedure from Producing an Ignition Config :: Fedora Docs instead Getting started | Butane, see coreos/butane#573

podman run --interactive --rm --security-opt label=disable \
       --volume ${PWD}:/pwd --workdir /pwd quay.io/coreos/butane:release \
       --pretty --strict config.bu > config.ign

than as described on Provisioning Fedora CoreOS on the Raspberry Pi 4 :: Fedora Docs

  1. CoreOS Install
    FCOSDISK=/dev/sda
    STREAM=stable # or `next` or `testing`
    echo $FCOSDISK
    echo $STREAM
    sudo podman run --pull=always --privileged --rm \
        -v /dev:/dev -v /run/udev:/run/udev -v .:/data -w /data \
        quay.io/coreos/coreos-installer:release \
        install -a aarch64 -s $STREAM -i config.ign $FCOSDISK		   
    
  2. UEFI Firmware
    FCOSEFIPARTITION=$(lsblk $FCOSDISK -J -oLABEL,PATH  | jq -r '.blockdevices[] | select(.label == "EFI-SYSTEM")'.path)
    mkdir /tmp/FCOSEFIpart
    sudo mount $FCOSEFIPARTITION /tmp/FCOSEFIpart
    pushd /tmp/FCOSEFIpart
    VERSION=v1.34  # use latest one from https://github.com/pftf/RPi4/releases
    sudo curl -LO https://github.com/pftf/RPi4/releases/download/${VERSION}/RPi4_UEFI_Firmware_${VERSION}.zip
    sudo unzip RPi4_UEFI_Firmware_${VERSION}.zip
    sudo rm RPi4_UEFI_Firmware_${VERSION}.zip
    popd
    sudo umount /tmp/FCOSEFIpart	
    

update 01.Jan.2025

related discussion: Enabling DeviceTree on Pi 4 4 GB causes boot to fail, it hangs at dracut.initqueue - Fedora Discussion
could this help: debian - Boot failing: Dracut-initqueue rm: cannot remove /lib/dracut/hooks/initqueue/finished/devexists-.....sh: Read-only file system - Unix & Linux Stack Exchange?


update 06.Jan.2025

adding

Device ManagerRaspberry Pi ConfigurationAdvanced ConfigurationSystem Table SelectionACPI
EDK2 → works all fine, boots

Both from the same start, all systems working.

Fedora CoreOS 41.20241122.3.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos
Last failed login: Sun Jan 5 20:30:03 UTC 2025 from 10.10.20.53 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Thu Nov 14 00:01:31 2024
admin@CoreOS:~$ hostnamectl status
     Static hostname: CoreOS
           Icon name: computer-embedded
             Chassis: embedded
          Machine ID: 7494c4a083794392a88d344aea15982c
             Boot ID: 49c09aed4d2d40e8856daa4098fdef8d
    Operating System: Fedora CoreOS 41.20241122.3.0   
         CPE OS Name: cpe:/o:fedoraproject:fedora:41
      OS Support End: Mon 2025-12-15
OS Support Remaining: 11month 1w 1d
              Kernel: Linux 6.11.8-300.fc41.aarch64
        Architecture: arm64
     Hardware Vendor: Raspberry Pi Foundation
      Hardware Model: Raspberry Pi 4 Model B
    Firmware Version: UEFI Firmware v1.38
       Firmware Date: Wed 2024-08-28
        Firmware Age: 4month 1w 2d
admin@CoreOS:~$ toolbox enter
⬢ [admin@toolbx ~]$ lspci
⬢ [admin@toolbx ~]$

It could be that #974 only works for the newer Hardware Revisions, 1.2 or 1.4.

As soon I'll have time


update 08.Jan.2025

adding

I did a last test with EDK2 + Devicetree using the dedicated SD card slot to provide Debugging kernel crashes using kdump :: Fedora Docs.

It boots up 🙀, GPIO are found, I can reach it via SSH but conenction to screen and USB dies. NumLock Key cannot be turned on/off but the Raspi-Keyboard-Mouse-Combo gets powered as the laser of the mouse is on.

admin@CoreOS:~$ ls /proc/device-tree/ | wc -l
39
admin@CoreOS:~$
admin@CoreOS:~$ ls /dev/gpiochip*
/dev/gpiochip0 /dev/gpiochip1
admin@CoreOS:~$
@hrismarin
Copy link

@PackElend, which version of the Raspberry Pi 4 UEFI Firmware Image you are using?

I tested the latest recommended v1.38 release and it works as expected from the EDK2 Firmware: GPIO via DeviceTree description in the docs.

@PackElend
Copy link
Author

VERSION=v1.34 # use latest one from https://github.com/pftf/RPi4/releases

it did quite late in the night 😪 only copy & paste, so I'm on 1.34.

Can we fix it from within FCOS or do I need to rerun the installer?

@PackElend PackElend changed the title Enabling DeviceTree on Pi 4 8 GB causes boot to fail (even Keyboard is not regoniced anymore) DeviceTree on Pi 4 4 GB Rev 0 fails to load USB Driver, fails to boot Jan 6, 2025
@PackElend PackElend changed the title DeviceTree on Pi 4 4 GB Rev 0 fails to load USB Driver, fails to boot EDK2: DeviceTree active on Pi 4 4 GB Rev 0 fails to load USB Driver, fails to boot Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants