make install 将模块放入错误的内核版本目录中

make install 将模块放入错误的内核版本目录中
sudo make install
make -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modules_install
make[1]: Entering directory '/home/pi/5.15.32-v8+/linux-60652604154e70aeac81fb6155fd9d15dc39daaf'
  INSTALL /lib/modules/5.15.21-v8+/extra/v4l2loopback.ko
  DEPMOD  /lib/modules/5.15.21-v8+
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/home/pi/5.15.32-v8+/linux-60652604154e70aeac81fb6155fd9d15dc39daaf'

SUCCESS (if you got 'SSL errors' above, you can safely ignore them)

事实证明,/lib/modules/5.15.32-v8+ 中有一堆文件的版本号错误:

cd /lib/modules/5.15.32-v8+/build
grep -R 5.15.21
include/config/auto.conf.cmd:ifneq "$(KERNELVERSION)" "5.15.21"
include/config/auto.conf:# Linux/arm64 5.15.21 Kernel Configuration
include/config/kernel.release:5.15.21-v8+
include/generated/autoconf.h: * Linux/arm64 5.15.21 Kernel Configuration
include/generated/utsrelease.h:#define UTS_RELEASE "5.15.21-v8+"
arch/arm64/kernel/vdso/vdso.lds: * Linux/arm64 5.15.21 Kernel Configuration
.config:# Linux/arm64 5.15.21 Kernel Configuration

一旦我更改了这些数字,模块就会转到正确的位置。

我不知道该向谁举报 - 这是来自树莓派的 rpi-source 实用程序,还是某个 deb 软件包?

答案1

rpi-source 下载了错误的内核。使用apt install raspberrypi-kernel-headers带来编译此模块所需的标头。

相关内容