我已经在Ubuntu上构建了自己的内核多年,使用了kernel-package包中的make-kpkg
。安装linux-image和linux-headers包之后我所要做的就是纠正/lib/modules/4.xy/{source,build}符号链接,以便指向/ usr / src / linux-headers-4 .xy目录而不是源树(我因为巨大而无法删除)。
我做的最后一个内核是4.9.30(与Con Kolivas的补丁)。对4.15.7和4.14.23执行相同操作适用于某些第三方模块(例如,ZFS)但不适用于其他模块,例如RTL8812au WIFI适配器的驱动程序(甚至来自VirtualBox 5.2.8-121009的主机内核扩展) 〜〜Ubuntu的可信任)。在那里,我看到了这个:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.14.23-ck1-mainline-core2-rjvb/build M=/path/to/rtl8812au_rtl8821au-git modules
make[1]: Entering directory `/usr/src/linux-headers-4.14.23-ck1-mainline-core2-rjvb'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /path/to/rtl8812au_rtl8821au-git/.tmp_versions ; rm -f /home/bertin/work/src/Scratch/RTL881x/rtl8812au_rtl8821au-git/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/path/to/rtl8812au_rtl8821au-git
make[2]: *** No rule to make target `/path/to/rtl8812au_rtl8821au-git/core/rtw_io.o', needed by `/path/to/rtl8812au_rtl8821au-git/8812au.o'. Stop.
make[1]: *** [_module_/path/to/rtl8812au_rtl8821au-git] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-4.14.23-ck1-mainline-core2-rjvb'
make: *** [modules] Error 2
我在发射台上可以找到最新的内核包版本。
两种解释(两者都可能没错): 1.安装在/usr/src/linux-headers-4.1x.y*中的树在某种程度上是不完整的 2.必须在第三方扩展模块中更改某些内容
我选择2)如果不是因为显然至少有一个8812au驱动程序repos在4.14和4.15中构建得很好,我必须假设这对VirtualBox来说也是如此。 (有一些关于我看到的错误的报告,但是在旧版本中,据说在5.2.7中修复了。)
知道从/usr/src/linux-headers-4.1x.y目录中排除了什么?或者在模块构建系统中需要更改什么? 我真的很想再次使用它,因为即使是干净的完整内核源代码树也要大10倍......
我正在使用的RTL 8812au驱动程序源:github.com/RJVB/rtl8812au_rtl8821au。