zabbly / linux

Linux kernel builds
Other
217 stars 7 forks source link

Trying to build out-of-tree modules, autoconf.h missing #16

Closed chrisnew closed 6 months ago

chrisnew commented 9 months ago

I try to build https://github.com/umlaeute/v4l2loopback with zabbly kernels and I’m not sure whether I’m missing something, but it stops when it’s checking for autoconf.h and auto.conf

make: Entering directory '/usr/src/linux-headers-6.6.11-zabbly+'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: *** [/usr/src/linux-headers-6.6.11-zabbly+/Makefile:806: include/config/auto.conf] Error 1
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.6.11-zabbly+'

I checked, only the auto.conf is available from the headers package.

Any hints for the right direction are highly appreciated! Keep up the good work!

stgraber commented 9 months ago
stgraber@castiana:~/v4l2loopback (main)$ make

++++++ To sign the  module, you must set KBUILD_SIGN_KEY/KBUILD_SIGN_CERT to point to the signing key/certificate!
++++++ For your convenience, we try to read these variables as 'mok_signing_key' resp. 'mok_certificate' from /etc/dkms/framework.conf

++++++ If your certificate requires a password, pass it via the KBUILD_SIGN_PIN env-var!
++++++ E.g. using 'export KBUILD_SIGN_PIN; read -s -p "Passphrase for signing key : " KBUILD_SIGN_PIN; sudo --preserve-env=KBUILD_SIGN_PIN make sign'

Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/stgraber/v4l2loopback KCPPFLAGS="-DSNAPSHOT_VERSION='"0.12.7-417-gb261f19"'" modules
make[1]: Entering directory '/usr/src/linux-headers-6.7.1-zabbly+'
  CC [M]  /home/stgraber/v4l2loopback/v4l2loopback.o
  MODPOST /home/stgraber/v4l2loopback/Module.symvers
  CC [M]  /home/stgraber/v4l2loopback/v4l2loopback.mod.o
  LD [M]  /home/stgraber/v4l2loopback/v4l2loopback.ko
  BTF [M] /home/stgraber/v4l2loopback/v4l2loopback.ko
Skipping BTF generation for /home/stgraber/v4l2loopback/v4l2loopback.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-6.7.1-zabbly+'
make -C utils V4L2LOOPBACK_SNAPSHOT_VERSION=0.12.7-417-gb261f19
make[1]: Entering directory '/home/stgraber/v4l2loopback/utils'
cc  -I.. -DSNAPSHOT_VERSION='"0.12.7-417-gb261f19"'  -c -o v4l2loopback-ctl.o v4l2loopback-ctl.c
cc   v4l2loopback-ctl.o   -o v4l2loopback-ctl
make[1]: Leaving directory '/home/stgraber/v4l2loopback/utils'
stgraber@castiana:~/v4l2loopback (main)$ ls -lh v4l2loopback.ko 
-rw-r--r-- 1 stgraber domain admins 863K Feb  7 20:06 v4l2loopback.ko
stgraber@castiana:~/v4l2loopback (main)$ uname -a
Linux castiana 6.7.1-zabbly+ #debian12 SMP PREEMPT_DYNAMIC Tue Jan 23 19:19:50 UTC 2024 x86_64 GNU/Linux
stgraber@castiana:~/v4l2loopback (main)$ 

Works just fine here with the current kernel.

chrisnew commented 6 months ago

It worked after deleting all residue in /usr/src and reinstalling the headers again. Super strange. Sorry for bothering.