Kernel configuration is invalid

Hi there,
I want tu use my Raspberry Pi 4 as a timeserver. I have a USB Clock from Meinberg and want to compile mbgtools-lx-4.2.8.
While compiling with make:
Calling kernel build system to make “modules”

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[2]: *** [Makefile:720: include/config/auto.conf] Fehler 1
make[1]: *** [/root/mbgtools-lx-4.2.8/mbgclock/…/Makefile:804: modules] Fehler 2
make: *** [Makefile:336: mbgclock] Fehler 2
[root@raspi4 mbgtools-lx-4.2.8]#

How to solve this error?
[root@raspi4 mbgtools-lx-4.2.8]# rpm -qa | grep kernel | sort
[root@raspi4 mbgtools-lx-4.2.8]# cat /etc/almalinux-release
AlmaLinux release 8.5 (Arctic Sphynx)
[root@raspi4 mbgtools-lx-4.2.8]#


I copy my reply to your post on the users mailing list:

ELRepo has ‘kmod-mbgclock’ built for x86_64:

I wonder if you can just build the aarch64 version by modifying the spec file. Maybe worth trying. You’d be building a kmod package that is supposedly kABI-tracking.

The README file says:

Linux kernels 2.6.x, 3.x, 4.x and 5.x up to at least 5.6

  • on standard PCs (i386 architecture)
  • on Intel/AMD 64 Bit systems (x86_64 architecture)
  • on SPARC64 architecture
  • partially on IA64 (Itanium) architecture
  • partially on ARM architecture

I don’t know how “partial” it is on ARM.

Similar to @toracat I’m copying my reply to the thread on the mailing list below:

I’d attempt to install the kernel-devel package and trying to compile it again.

It also looks like the latest version (4.2.12) may rectify this as per their website which references this error on newer kernels: Linux Driver Package - Release Notes [Knowledge Base]

I’d suggest snagging the latest version of the driver & install the aforementioned kernel-devel package and I believe it should compile cleanly.