From e239ce2076d271d245d048652a0ca38836efaf7e Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Tue, 14 Apr 2026 11:32:58 -0700 Subject: [PATCH] native: G7 Chromebook WiFi + SOF audio + install partition + reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Diagnosed from vital-shark-husk USB log: G7 (Jasper Lake, Drawcia) exposes Realtek RTL8852BE WiFi on PCI 01:00.0 + SOF DSP at 00:1f.3 with "no soundcards", plus install-to-disk targeted /dev/mmcblk1p12 after sfdisk had already rewritten the partition table to a single p1. - Dockerfile.builder: add `realtek-firmware` — Fedora 43 split rtw89/*.bin out of linux-firmware into a dedicated package, so rtw89 driver loaded but its firmware_request() silently failed (drv=NONE in the log). - docker-build.sh: recurse into intel/sof/{community,intel-signed}/ when staging DSP firmware. Fedora's alsa-sof-firmware ships sof-jsl.ri under subdirectories, not flat, so a top-level glob missed the Jasper Lake blob and SOF platform probe found no card. - kernel/config-minimal: reboot=efi,cold — some Chromebooks hang when the kernel tries its default reboot path (ACPI then KBD then triple- fault). `reboot=efi` falls through to UEFI ResetSystem() which works from any EFI-booted kernel; `cold` is the final fallback. - ac-native.c install: after sfdisk shrinks the Chromebook's 12-entry GPT to a single 1024MB ESP, the new partition is always p1 of the parent disk — canonicalize devpath before waiting on the node, mkfs, and mount. Previously we kept `/dev/mmcblk1p12` and waited 10s for a device that no longer existed, hit "format failed!" banner, then recovered on pass 1 which made the telemetry look alarming even though the install eventually succeeded. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/native/Dockerfile.builder | 1 + fedac/native/docker-build.sh | 15 +++++++++++---- fedac/native/kernel/config-minimal | 2 +- fedac/native/src/ac-native.c | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/fedac/native/Dockerfile.builder b/fedac/native/Dockerfile.builder index 6e833126e..d9d8fb39c 100644 --- a/fedac/native/Dockerfile.builder +++ b/fedac/native/Dockerfile.builder @@ -22,6 +22,7 @@ RUN dnf install -y --setopt=install_weak_deps=False \ iwlwifi-mvm-firmware wireless-regdb \ linux-firmware linux-firmware-whence \ intel-gpu-firmware \ + realtek-firmware \ alsa-sof-firmware \ busybox mtools dosfstools hfsplus-tools hfsutils gdisk parted \ mesa-libgbm mesa-libgbm-devel \ diff --git a/fedac/native/docker-build.sh b/fedac/native/docker-build.sh index dcf9b911d..d310f8b8d 100644 --- a/fedac/native/docker-build.sh +++ b/fedac/native/docker-build.sh @@ -429,14 +429,21 @@ if [ -n "$FWDIR" ]; then # (Jasper Lake, Alder Lake, Tiger Lake…) and many modern laptops where # audio doesn't go through plain HDA. Need the main .ri blob per # platform plus the matching topology under sof-tplg/. + # + # Recurse: Fedora's alsa-sof-firmware puts sof-.ri under + # intel/sof/community/ and intel/sof/intel-signed/ (not directly under + # intel/sof/), so a flat glob misses them. We preserve relative paths + # so the kernel's firmware loader still finds them along the standard + # SOF_FW_PATH search (which covers both community and intel-signed). for subdir in intel/sof intel/sof-tplg intel/sof-ace-tplg; do src="$FWDIR/$subdir" if [ -d "$src" ]; then mkdir -p "$IROOT/lib/firmware/$subdir" - for fw in "$src"/*.ri "$src"/*.tplg "$src"/*.tplg.xz "$src"/*.ri.xz \ - "$src"/*.ri.zst "$src"/*.tplg.zst; do - [ -f "$fw" ] && cp -L "$fw" "$IROOT/lib/firmware/$subdir/" - done + (cd "$src" && find . -type f \ + \( -name '*.ri' -o -name '*.tplg' \ + -o -name '*.ri.xz' -o -name '*.tplg.xz' \ + -o -name '*.ri.zst' -o -name '*.tplg.zst' \) \ + -exec cp --parents -L {} "$IROOT/lib/firmware/$subdir/" \;) || true fi done else diff --git a/fedac/native/kernel/config-minimal b/fedac/native/kernel/config-minimal index 833ebf267..892d01e77 100644 --- a/fedac/native/kernel/config-minimal +++ b/fedac/native/kernel/config-minimal @@ -424,7 +424,7 @@ CONFIG_HOTPLUG_CPU=y CONFIG_LEGACY_VSYSCALL_XONLY=y # CONFIG_LEGACY_VSYSCALL_NONE is not set CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="console=tty0 quiet loglevel=3 vt.global_cursor_default=0 init=/init mitigations=off snd_hda_intel.power_save=0 nmi_watchdog=0 tsc=reliable no_timer_check acpi_backlight=native thinkpad_acpi.brightness_enable=1 i8042.reset i8042.nomux" +CONFIG_CMDLINE="console=tty0 quiet loglevel=3 vt.global_cursor_default=0 init=/init mitigations=off snd_hda_intel.power_save=0 nmi_watchdog=0 tsc=reliable no_timer_check acpi_backlight=native thinkpad_acpi.brightness_enable=1 i8042.reset i8042.nomux reboot=efi,cold" # CONFIG_CMDLINE_OVERRIDE is not set CONFIG_MODIFY_LDT_SYSCALL=y # CONFIG_STRICT_SIGALTSTACK_SIZE is not set diff --git a/fedac/native/src/ac-native.c b/fedac/native/src/ac-native.c index 4e5109594..0f50667cc 100644 --- a/fedac/native/src/ac-native.c +++ b/fedac/native/src/ac-native.c @@ -1506,6 +1506,25 @@ static int auto_install_to_hd(ACGraph *graph, ACFramebuffer *screen, DLOG, parent_blk, DLOG, parent_blk, DLOG, parent_blk, DLOG, parent_blk, DLOG); system(rcmd); + // sfdisk wrote a single partition → the new ESP is p1 on + // the parent disk, regardless of what partition index we + // entered this branch with. Chromebook case: we arrived + // via devpath=/dev/mmcblk1p12 (existing 16MB EFI-SYSTEM), + // sfdisk rewrote the table to a single 1024MB entry at + // p1 and wiped p12 entirely — so mkfs + mount need to + // target the new partition, not the old devpath. + char new_devpath[48]; + if (parent_blk[0] == 'n' || strncmp(parent_blk, "mmcblk", 6) == 0) { + snprintf(new_devpath, sizeof(new_devpath), "/dev/%sp1", parent_blk); + } else { + snprintf(new_devpath, sizeof(new_devpath), "/dev/%s1", parent_blk); + } + if (strcmp(new_devpath, devpath) != 0) { + ac_log("[install] canonicalizing devpath %s → %s after sfdisk\n", + devpath, new_devpath); + strncpy(devpath, new_devpath, sizeof(devpath) - 1); + devpath[sizeof(devpath) - 1] = '\0'; + } // Wait for partition device node to appear (up to 10s) int devpath_ready = 0; for (int wait = 0; wait < 20; wait++) { -- 2.51.2