Files
chromebox_10th_audio_driver/scripts/export-boards-chrome-ubuntu-diff.sh
2026-04-05 08:30:54 +08:00

27 lines
893 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# ChromeOS 5.15 vs Ubuntu HWE 6.17:板级 machine 与 helpers 的 unified diffiDisp / HDMI 相关)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
CH="${CH:-$REPO_ROOT/chromiumos_kernel/v5.15}"
UB="${UB:-$REPO_ROOT/kernel-src/linux-hwe-6.17-6.17.0}"
OUT="${OUT:-$REPO_ROOT/patches/ubuntu-hwe-6.17/reference}"
FILES=(
sound/soc/intel/boards/sof_rt5682.c
sound/soc/intel/boards/sof_board_helpers.c
)
mkdir -p "$OUT"
for f in "${FILES[@]}"; do
if [[ ! -f "$CH/$f" || ! -f "$UB/$f" ]]; then
echo "WARN: skip (missing): $f" >&2
continue
fi
safe="${f//\//_}"
dest="$OUT/diff-u_${safe}.txt"
( diff -u "$CH/$f" "$UB/$f" || true ) > "$dest"
echo "Wrote $dest ($(wc -l < "$dest") lines)"
done
echo "Done. See STREAM_PCM_PARAMS_CHROME_UBUNTU_NOTES.md §6 与 REANALYSIS §7.2。"