Files
c630/overlay/etc/dracut.conf.d/10-c630.conf
rob thijssen f0b2d7846a
Some checks failed
build image / build (push) Has been cancelled
Add install-to-disk.sh, and get the GPU firmware into the initramfs
Validated by running it on the machine, twice, and inspecting the result.

Two properties of this laptop rule out the obvious approach, and the script
exists mainly to encode them. Its internal UFS reports 4096-byte logical
sectors, so the image — built with 512-byte geometry — cannot be dd'd onto it;
the GPT header and every partition offset would land in the wrong place. And
there are no EFI runtime variables, so efibootmgr cannot register a boot entry
and GRUB has to sit at the removable-media path where the firmware looks
unprompted.

Three things the validation runs caught that review would not have:

rsync is not in the image. I had put it in the build container and never in
the package list, so the first run died at the copy. It now falls back to tar
(--xattrs-include='*', or SELinux labels are silently dropped and the result
does not boot), and rsync is in base.pkgs for the progress output.

Copying a live root makes tar exit non-zero — files change underneath it, and
this machine's clock is wrong besides, so every mtime looks like it is in the
future. With pipefail that aborted the install after the root filesystem and
before /boot, leaving a half-installed disk that looked plausible. Warning-level
exits are now tolerated and only a fatal exit 2 stops the run.

systemd-machine-id-setup keeps an existing valid id, and one had just been
copied off the stick, so the installed system was a clone. The file is removed
first now.

Also: msm_dpu probes ~6s in, while the initramfs is still root, and asks for
qcom/a630_sqe.fw before the real filesystem carrying it is reachable. It never
retries. Adding the Adreno firmware to the initramfs is a few tens of
kilobytes. c630-firmware does the same for the DSP blobs once they exist, since
dracut rejects install_items globs that match nothing.

chrony, because the RTC reads 1970 and nothing was correcting it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWRjNJMistCy6ngXH5aJLS
2026-07-27 19:23:29 +03:00

26 lines
1.3 KiB
Plaintext

# The image is built on a machine that is nothing like a C630, so the initramfs
# must be generic — a host-only initramfs would contain the builder's drivers.
hostonly="no"
hostonly_cmdline="no"
# UFS is the C630's only internal storage and the rootfs lives on it, so the
# controller and PHY drivers have to be in the initramfs, not modules loaded
# later from a filesystem we cannot yet read.
add_drivers+=" ufshcd-core ufshcd-pltfrm ufs-qcom phy-qcom-qmp-ufs "
# Needed before the display comes up, and cheap to include.
add_drivers+=" nvmem_qfprom qcom_scm rtc-pm8xxx "
# msm_dpu probes about six seconds in — while the initramfs is still the root
# filesystem, so anything under /usr/lib/firmware on the real root is not yet
# reachable. It asks for the Adreno 630 firmware, does not find it, and does not
# come back to try again:
#
# msm_dpu ae01000.display-controller: Direct firmware load for
# qcom/a630_sqe.fw failed with error -2
#
# The files are installed — they are simply not visible that early. A few tens
# of kilobytes in the initramfs fixes it. The model-signed zap shader is a
# separate problem; see docs/firmware.md.
install_items+=" /usr/lib/firmware/qcom/a630_sqe.fw.xz /usr/lib/firmware/qcom/a630_gmu.bin.xz /usr/lib/firmware/qcom/sdm845/a630_zap.mbn.xz "