Files
chromebox_10th_audio_driver/kernel-src/README.md
2026-04-04 18:13:40 +08:00

44 lines
2.1 KiB
Markdown
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.
# Ubuntu HWE 6.17 内核源码(本机目录,不随仓库提交)
若旧环境把解压树放在 `~/kernel-src/linux-hwe-6.17-6.17.0/`,可迁入本仓库:
```bash
mkdir -p kernel-src
mv ~/kernel-src/linux-hwe-6.17-6.17.0 kernel-src/
# 可选:一并移动同目录下的 .dsc / .orig.tar.gz / .diff.gz 后再删空 ~/kernel-src
```
解压后的目录应为:
`linux-hwe-6.17-6.17.0/`
**Ubuntu 24.04 (Noble)** 上推荐在本目录下拉源码(与 `docs/meta/WORK_PROGRESS.md` 一致):
```bash
cd /path/to/chromebox_10th_audio_driver/kernel-src
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources 2>/dev/null || true
sudo apt update
apt-cache showsrc linux-hwe-6.17 | grep -E '^Version:' | head -5
apt source linux-hwe-6.17=<与当前内核一致的 Version>
# 或: dpkg-source -x linux-hwe-6.17_*.dsc
```
若在源码树内做过 **`make defconfig` / `make prepare`** 等,再跑 **`fakeroot debian/rules binary-generic`** 可能报 **source tree is not clean**;在源码根执行 **`make mrproper`** 清理后再构建(会删顶层 `.config`Debian 构建使用独立 `O=` 输出目录)。
打补丁(可选)与编译:
```bash
export SRC="$PWD/linux-hwe-6.17-6.17.0"
# 若有自定义补丁,必须设置 PATCH=绝对路径(仓库无默认补丁):
# export PATCH="$PWD/../patches/ubuntu-hwe-6.17/0001-your.patch"
# ../scripts/ubuntu-hwe-617-build.sh apply
../scripts/ubuntu-hwe-617-build.sh deps # Noble 上建议先 build-dep
../scripts/ubuntu-hwe-617-build.sh build
```
补丁设计与 ChromeOS 深度 diff 流程见 `../docs/kernel-build/OPERATION_ChromeOS_Kernel_Deep_Diff.md``../patches/ubuntu-hwe-6.17/README.md`
编译成功后deb 通常在本目录(`kernel-src/`)。**在目标机上安装与重启**的完整说明见:[docs/kernel-build/OPERATION_Install_CustomKernel_Ubuntu_HWE617.md](../docs/kernel-build/OPERATION_Install_CustomKernel_Ubuntu_HWE617.md)(含 `linux-base` 依赖、`linux-image-unsigned` 与 Secure Boot、可选 headers/DKMS
根目录 `.gitignore` 已忽略 `linux-hwe-6.17-*``*.orig.tar.*` 等,换机后请在本目录重新 `apt source`