I can tell it the kernel to compile for. And it does go to the kernel source directory I expect. But it is not happy with what it finds there. I am building on tumbleweed (6.4.12-1-default), with Leap 15.6 (6.4.0-150600.23.14) as the target. This can be seen in what the attempted build prints (below). If it is looking in the installed target source tree (/usr/src/linux-6.4.0-150600.23.14), and I have all the expected kernel-related RPMs for that kernel version installed, why should the kernel build config information be missing? *** *** Making pcan driver in netdev mode *** *** Host OS Release=openSUSE Leap v15.6 *** Host machine kernel version=6.4.12-1-default *** Driver kernel version=6.4.0-150600.23.14 (6.4.0) *** Path to kernel sources=/usr/src/linux *** use KBUILD=yes *** use DKMS= *** gcc version=7 *** make -C /usr/src/linux EXTRA_CFLAGS="-I/home/rst/source.18.00/peak-linux-driver-8.18.0/driver -DNO_DEBUG -DMODVERSIONS -DNO_PARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNETDEV_ SUPPORT -DNO_RT -Wno-date-time" V=0 modules M=/home/rst/source.18.00/peak-linux-driver-8.18.0/driver make[3]: Entering directory '/usr/src/linux-6.4.0-150600.23.14' 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. Makefile:740: include/config/auto.conf: No such file or directory make[3]: *** [Makefile:805: include/config/auto.conf] Error 1 make[3]: Leaving directory '/usr/src/linux-6.4.0-150600.23.14' make[2]: *** [Makefile:526: all] Error 2 make[2]: Leaving directory '/home/rst/source.18.00/peak-linux-driver-8.18.0/driver' make[1]: *** [Makefile:819: netdev] Error 2 make[1]: Leaving directory '/home/rst/source.18.00/peak-linux-driver-8.18.0/driver' make: *** [Makefile:91: netdev] Error 2 On Mon, Jul 22, 2024 at 7:43 PM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On 22.07.2024 16:50, Roger Oberholtzer wrote:
I am trying to build a kernel module out of the kernel source tree. I am trying this on leap 15.6
I am pretty sure that the module in question supports this. I am guessing that I am missing some additional package.
The complaint is as follows:
*** *** Making pcan driver in netdev mode *** *** Host OS Release=openSUSE Leap v15.6 *** Host machine kernel version=6.4.12-1-default ...
I have these related RPMs installed:
patterns-devel-base-devel_kernel-20170319-lp156.3.2.x86_64 kernel-default-devel-6.4.0-150600.23.14.2.x86_64
Either install kernel-default-devel matching your running kernel or install and reboot into kernel-default matching your kernel-default-devel or tell Makefile the kernel version/build directory location manually (whatever this Makefile accepts).
It finally depends on for which kernel you are trying to build this driver.
-- Roger Oberholtzer