Add work handoff doc, Ubuntu HWE build scripts, and repair plan

- docs/WORK_PROGRESS.md: progress, ChromeOS and Ubuntu kernel source URLs/commands
- scripts: ubuntu-hwe-617-build.sh and deps list for kernel packaging
- patches: experimental HDMI note (DO NOT apply on 6.17)
- audio_topology: REPAIR_Plan_Audio.md; README links
- README: links to handoff and build helpers

Made-with: Cursor
This commit is contained in:
jack
2026-04-02 07:22:12 +08:00
parent b5193a7f77
commit c16b8c2b6c
7 changed files with 383 additions and 24 deletions

78
scripts/ubuntu-hwe-617-build.sh Executable file
View File

@@ -0,0 +1,78 @@
#!/usr/bin/env bash
# Ubuntu HWE 6.17: apply SOF HDMI experiment patch, build generic kernel debs, optional install.
# Run from your machine (requires sudo for apt/dpkg). Do NOT edit the plan file.
set -euo pipefail
PATCH="${PATCH:-/home/jack/chromebox_10th_audio_driver/patches/ubuntu-hwe-6.17/0001-ASoC-intel-sof-fix-idisp-hdmi-dpcm-playback.patch}"
SRC="${SRC:-$HOME/kernel-src/linux-hwe-6.17-6.17.0}"
JOBS="${CONCURRENCY_LEVEL:-$(nproc)}"
usage() {
echo "Usage: $0 [apply|deps|build|install|all]"
echo " apply - patch -p1 in SRC (default: $SRC)"
echo " deps - sudo apt build-dep linux-hwe-6.17 + build tools"
echo " build - fakeroot debian/rules clean && binary-generic"
echo " install- sudo dpkg -i newest linux-image-* and linux-modules-* in parent of SRC"
echo " all - apply deps build (install is manual: run install after reviewing debs)"
}
if [[ ! -f "$SRC/debian/rules" ]]; then
echo "ERROR: kernel source not found at SRC=$SRC"
exit 1
fi
cmd_apply() {
cd "$SRC"
local f="sound/soc/intel/boards/sof_board_helpers.c"
if grep -q 'link->dpcm_playback = 1' "$f" 2>/dev/null; then
echo "Already patched: $f"
else
patch -p1 < "$PATCH"
fi
grep -n 'set_idisp_hdmi_link\|dpcm_playback\|playback_only' "$f" | head -20 || true
}
cmd_deps() {
sudo apt-get update
sudo apt-get build-dep -y linux-hwe-6.17
sudo apt-get install -y fakeroot build-essential libncurses-dev libssl-dev ccache \
gawk debhelper libelf-dev
}
cmd_build() {
cd "$SRC"
export CONCURRENCY_LEVEL="$JOBS"
fakeroot debian/rules clean
fakeroot debian/rules binary-generic
}
cmd_install() {
parent="$(dirname "$SRC")"
cd "$parent"
# Pick debs matching this source tree version (newest mtime)
mapfile -t imgs < <(ls -t linux-image-*.deb 2>/dev/null || true)
mapfile -t mods < <(ls -t linux-modules-*.deb 2>/dev/null || true)
if [[ ${#imgs[@]} -eq 0 || ${#mods[@]} -eq 0 ]]; then
echo "No linux-image-*.deb or linux-modules-*.deb in $parent — build first."
exit 1
fi
echo "Installing: ${imgs[0]} ${mods[0]}"
sudo dpkg -i "${imgs[0]}" "${mods[0]}"
echo "Optional: sudo dpkg -i linux-headers-*.deb from same directory"
echo "Then: sudo reboot"
}
case "${1:-}" in
apply) cmd_apply ;;
deps) cmd_deps ;;
build) cmd_build ;;
install) cmd_install ;;
all)
cmd_apply
cmd_deps
cmd_build
echo "Build done. Debs should be in: $(dirname "$SRC")"
echo "Run: $0 install (after reviewing package names)"
;;
*) usage; exit 1 ;;
esac

View File

@@ -0,0 +1,7 @@
# One-shot install for Ubuntu HWE 6.17 kernel build (run with sudo after apt update).
# Observed failures without these: gawk (debian/rules), debhelper/dh_testdir,
# libelf-dev (gelf.h for tools/objtool during make modules_prepare).
sudo apt-get update
sudo apt-get build-dep -y linux-hwe-6.17
sudo apt-get install -y fakeroot build-essential libncurses-dev libssl-dev ccache \
gawk debhelper libelf-dev