Skip to content

fix(initramfs): ship the ADSP pieces dracut drops - #704

Open
keks2293 wants to merge 3 commits into
armada-os:mainfrom
keks2293:initramfs-adsp
Open

keks2293 wants to merge 3 commits into
armada-os:mainfrom
keks2293:initramfs-adsp

Conversation

@keks2293

@keks2293 keks2293 commented Oct 11, 2026 •

Copy link
Copy Markdown

Booting Armada from a USB-C stick (ABL "linux usb") hangs in dracut-initqueue: the port never sources VBUS, so neither the stick nor a keyboard ever enumerates.

VBUS is gated behind the ADSP: without it pmic-glink never reports the charger PD service as up, ucsi_glink never reaches ucsi_register(), no connector shows up under /sys/class/typec, no usb role switch is registered and the port stays electrically invisible. On a full boot the ADSP comes up from the rootfs; only the initramfs lacks the pieces:

  • dracut's aarch64 module whitelist covers drivers/rpmsg and drivers/usb/* but not drivers/remoteproc;
  • dracut only pulls firmware named in a module's MODULE_FIRMWARE metadata, while the ADSP firmware name comes from the DT.

None of this needs Armada-specific kernel code: qcom_q6v5_pas, pmic_glink and ucsi_glink are all upstream and the board DT already sets compatible = "qcom,sm8550-adsp-pas" plus firmware-name.

Add a dracut module (91armada-adsp, explicit --add like the other armada modules) that installs drivers/remoteproc and the ADSP images listed in usr/share/armada/initramfs-adsp-firmware.list, and make 55-generate-initramfs.sh fail the build when either is missing.

No per-board selection is needed. The kernel picks the right image itself at boot: firmware-name comes from the board DT and request_firmware() resolves it. So the list is globs over every board's ADSP set (sm8550/sm8650/sm8750, plus the Ayaneo Pocket MDT+segment set) and one generic image then boots any board whose firmware the repo vendors. Raw cost is ~210 MB across boards; the initramfs is compressed, so the image grows by far less. Sm8250 boards reference qcom/sm8250/adsp.mbn, which the repo does not vendor, so they stay out until it is added.

The first CI run of this change failed with both ADSP images "missing" although they were bundled: under set -o pipefail, lsinitrd | grep -q exits at the first match, lsinitrd dies of SIGPIPE and the pipeline reports failure. Fixed by taking one lsinitrd listing up front and matching against it, and by checking firmware sources before dracut runs (dracut ignores module_install's exit code, so a broken list would otherwise surface only in the post-check).

Root cause verified on an RP6 with a diagnostic initramfs: xhci probes fine, but typec, usb_role and rpmsg devices are all absent and the kernel logs "sync_state() pending due to 6000000.remoteproc".

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Disk image

armada-disk-pr704, built from c3aa050

Downloads as a zip holding armada-*.img.gz and its .sha256.
GitHub requires you to be signed in to download run artifacts.

@justradical

Copy link
Copy Markdown
Member

Wouldn't step 7 from the official Fedora WoA wiki be enough? Including a file like this instead of creating a whole module for them

https://fedoraproject.org/wiki/Snapdragon_WoA_Laptop_Install

Booting Armada from a USB-C stick (ABL "linux usb") hangs in
dracut-initqueue: the port never sources VBUS, so neither the stick nor
a keyboard ever enumerates.

VBUS is gated behind the ADSP: without it pmic-glink never reports the
charger PD service as up, ucsi_glink never reaches ucsi_register(), no
connector shows up under /sys/class/typec, no usb role switch is
registered and the port stays electrically invisible. On a full boot the
ADSP comes up from the rootfs; only the initramfs lacks the pieces:

- dracut's aarch64 module whitelist covers drivers/rpmsg and
  drivers/usb/* but not drivers/remoteproc;
- dracut only pulls firmware named in a module's MODULE_FIRMWARE
  metadata, while the ADSP firmware name comes from the DT.

None of this needs Armada-specific kernel code: qcom_q6v5_pas,
pmic_glink and ucsi_glink are all upstream and the board DT already
sets compatible = "qcom,sm8550-adsp-pas" plus firmware-name.

Add a dracut module (91armada-adsp, explicit --add like the other armada
modules) that installs drivers/remoteproc and the ADSP images listed in
usr/share/armada/initramfs-adsp-firmware.list, and make
55-generate-initramfs.sh fail the build when either is missing.

The kernel picks the right image itself at boot (firmware-name comes
from the board DT, request_firmware() resolves it), so the list is
globs over every board's ADSP set rather than one entry per board: one
generic image then boots any board whose firmware the repo vendors.
Raw cost is ~210 MB across boards; the initramfs is compressed, so the
image grows by far less. Sm8250 boards reference qcom/sm8250/adsp.mbn,
which the repo does not vendor, so they stay out until it is added.

Also fix the initramfs checks that failed this change's first CI run
with both ADSP images "missing" although they were bundled: under
`set -o pipefail`, `lsinitrd | grep -q` exits at the first match, lsinitrd
dies of SIGPIPE and the pipeline reports failure. Take one lsinitrd
listing up front and match against it instead, and check firmware
sources before dracut runs (dracut ignores module_install's exit code,
so a broken list would otherwise surface only here).
… port

The RP6 connector's mode-switch/orientation-switch provider is the
usb0-sbu-mux node (compatible "gpio-sbu-mux"), but that driver was left
as a module while QCOM_PMIC_GLINK, TYPEC_UCSI and UCSI_PMIC_GLINK are all
built in. pmic_glink therefore probes and UCSI tries to register the
typec port before udev has loaded gpio-sbu-mux, fwnode_typec_switch_get()
returns -EPROBE_DEFER, and after the ~10s UCSI retry window the driver
gives up for good:

  ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: PPM init failed, stop trying

With no typec port there is no USB role switch, so the port never enters
host mode / supplies VBUS and a root filesystem on USB is never found
(dracut-initqueue waits forever). Promote TYPEC_MUX_GPIO_SBU to =y so the
provider is present from boot, matching ROCKNIX's SM8550 config.
… dwc3

The SM8550 dwc3 reports GHWPARAMS0_MODE=HOST, so dwc3 forces host mode
and never registers the usb_role_switch advertised by the
usb-role-switch property inherited from upstream sm8550.dtsi. UCSI's
ucsi_register_port() then gets -EPROBE_DEFER forever from
fwnode_usb_role_switch_get() and gives up at 20s with "PPM init failed,
stop trying": the typec port and VBUS stay unmanaged, and USB host
boot hangs waiting for the boot drive.

Drop the property with /delete-property/ in the two shared qcs8550
board files (qcs8550-ayn-common.dtsi and qcs8550-ayaneo-pocket-common.dtsi)
instead of patching the upstream dtsi, so every qcs8550 board is
covered, UCSI skips the role-switch lookup and registers the port
normally (usb_role_switch_set_role() is NULL-safe).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants