6.8.0-45
我目前正在尝试按照类似于此处提到的步骤编译自定义的 Ubuntu Jammy (22.04) HWE 内核版本。我正在对iwlwifi
驱动程序应用一些补丁。
以下是我的分步过程:
git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy && cd jammy
git checkout Ubuntu-hwe-6.8-6.8.0-45.45_22.04.1
git switch -c my_branch/6.8.0-45_iwl_patch
- 将我的更改应用到
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
文件 git add . && git commit -m "My commit message"
cp /boot/config-$(uname -r) .config
sed -i 's/CONFIG_LOCALVERSION=""/CONFIG_LOCALVERSION="-ricciolino"/g' .config
make oldconfig
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic
一切工作正常,直到第 10 步,我在构建过程中遇到以下错误:
(my_branch/6.8.0-45_iwl_patch)> fakeroot debian/rules binary-headers binary-generic
Debug: /opt/my-kernel/jammy/debian/stamps/stamp-prepare-indep
dh_prep -i
[ -d /opt/my-kernel/jammy/debian/stamps/ ] || mkdir /opt/my-kernel/jammy/debian/stamps/; touch /opt/my-kernel/jammy/debian/stamps/stamp-prepare-indep
Debug: /opt/my-kernel/jammy/debian/stamps/stamp-install-headers
dh_testdir
install -d /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45
find . -path './debian' -prune -o -path './debian.hwe-6.8' -prune \
-o -path './include/*' -prune \
-o -path './scripts/*' -prune -o -type f \
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
-name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
-print | cpio -pd --preserve-modification-time /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45
27658 blocks
cp -a scripts include /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45
(find arch -name include -type d -print | \
xargs -n1 -i: find : -type f) | \
cpio -pd --preserve-modification-time /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
cpio: /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45/arch/powerpc/include/uapi/asm/Kbuild not created: newer or same age version exists
...
<more cpio lines>
...
cpio: /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45/arch/x86/include/asm/Kbuild not created: newer or same age version exists
28358 blocks
# Do not ship .o and .cmd artifacts in headers
find /opt/my-kernel/jammy/debian/linux-hwe-6.8-headers-6.8.0-45/usr/src/linux-hwe-6.8-headers-6.8.0-45 -name \*.o -or -name \*.cmd -exec rm -f {} \;
[ -d /opt/my-kernel/jammy/debian/stamps/ ] || mkdir /opt/my-kernel/jammy/debian/stamps/; touch /opt/my-kernel/jammy/debian/stamps/stamp-install-headers
Debug: binary-headers
dh_installchangelogs -plinux-hwe-6.8-headers-6.8.0-45
dh_installdocs -plinux-hwe-6.8-headers-6.8.0-45
dh_compress -plinux-hwe-6.8-headers-6.8.0-45
dh_fixperms -plinux-hwe-6.8-headers-6.8.0-45
dh_installdeb -plinux-hwe-6.8-headers-6.8.0-45
flock -w 60 /opt/my-kernel/jammy/debian/.LOCK dh_gencontrol -plinux-hwe-6.8-headers-6.8.0-45
dh_md5sums -plinux-hwe-6.8-headers-6.8.0-45
dh_builddeb -plinux-hwe-6.8-headers-6.8.0-45
dpkg-deb: building package 'linux-hwe-6.8-headers-6.8.0-45' in '../linux-hwe-6.8-headers-6.8.0-45_6.8.0-45.45~22.04.1_all.deb'.
x86_64-linux-gnu-gcc-12 debian/scripts/fix-filenames.c -o debian/scripts/fix-filenames
Debug: /opt/my-kernel/jammy/debian/stamps/stamp-prepare-tree-generic
install -d /opt/my-kernel/jammy/debian/build/build-generic
touch /opt/my-kernel/jammy/debian/build/build-generic/ubuntu-build
python3 debian/scripts/misc/annotations --export --arch amd64 --flavour generic > /opt/my-kernel/jammy/debian/build/build-generic/.config
sed -i 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu 6.8.0-45.45~22.04.1-generic 6.8.12"/' /opt/my-kernel/jammy/debian/build/build-generic/.config
find /opt/my-kernel/jammy/debian/build/build-generic -name "*.ko" | xargs rm -f
make ARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- HOSTCC=x86_64-linux-gnu-gcc-12 CC=x86_64-linux-gnu-gcc-12 BINDGEN=bindgen-0.65 KERNELRELEASE=6.8.0-45-generic CONFIG_DEBUG_SECTION_MISMATCH=y KBUILD_BUILD_VERSION="45~22.04.1" CFLAGS_MODULE="-DPKG_ABI=45" PYTHON=python3 O=/opt/my-kernel/jammy/debian/build/build-generic -j24 rustavailable || true
make[1]: Entering directory '/opt/my-kernel/jammy'
make[2]: Entering directory '/opt/my-kernel/jammy/debian/build/build-generic'
***
*** Rust bindings generator 'bindgen-0.65' could not be found.
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***
make[3]: *** [/opt/my-kernel/jammy/Makefile:1718: rustavailable] Error 1
make[2]: *** [/opt/my-kernel/jammy/Makefile:240: __sub-make] Error 2
make[2]: Leaving directory '/opt/my-kernel/jammy/debian/build/build-generic'
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/opt/my-kernel/jammy'
make ARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- HOSTCC=x86_64-linux-gnu-gcc-12 CC=x86_64-linux-gnu-gcc-12 BINDGEN=bindgen-0.65 KERNELRELEASE=6.8.0-45-generic CONFIG_DEBUG_SECTION_MISMATCH=y KBUILD_BUILD_VERSION="45~22.04.1" CFLAGS_MODULE="-DPKG_ABI=45" PYTHON=python3 O=/opt/my-kernel/jammy/debian/build/build-generic -j24 olddefconfig
make[1]: Entering directory '/opt/my-kernel/jammy'
make[2]: Entering directory '/opt/my-kernel/jammy/debian/build/build-generic'
***
*** The source tree is not clean, please run 'make ARCH=x86 mrproper'
*** in /opt/my-kernel/jammy
***
make[3]: *** [/opt/my-kernel/jammy/Makefile:646: outputmakefile] Error 1
make[2]: *** [/opt/my-kernel/jammy/Makefile:240: __sub-make] Error 2
make[2]: Leaving directory '/opt/my-kernel/jammy/debian/build/build-generic'
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/opt/my-kernel/jammy'
make: *** [debian/rules.d/2-binary-arch.mk:23: /opt/my-kernel/jammy/debian/stamps/stamp-prepare-tree-generic] Error 2
怎么了 ?
感谢支持
我想我知道哪里出了问题。
我刚刚创建了一个包含所有更新步骤的 GitHub要点。
我也在这里报告他们:
在开始构建的
fakeroot debian/rules editconfigs
最终命令之前的步骤尤为重要。fakeroot