I’m bumping this thread because my problem is related.
I’m developing kernel modules for driving peripherals, in this case for separate MCU managing closed loop DC (brushed) motors. To make it work with my intended board, a Pine64 SoQuartz, i have to compile the kernel module using linux-headers for the current kernel. With Dietpi 8.21 I have 6.4.12 and it’s not possible to install the linux-headers by any easy means. There are linux-headers available for 6.4.0 but the system rejects the module on insertion due to some check - can not solve without the proper linux headers!
So, what can I do to get matching linux-headers to compile kernel modules with? I’m willing to change kernel version. I’m not willing to change to raspberry pi.
Download the src for that driver, might need to do some googling on how to setup the config and all that (not 100% sure on how it works) and any time a kernel update comes, it should auto build/install the module
Indeed we do not provide kernel headers for our Quartz64 kernel builds. I did not find a nice way to gather them from kernel sources without using the whole set of Debian build scripts. If someone has a hint how to wrap them together, please share it with me.
@WarHawk
To compile kernel modules with our without DKMS, headers are required which match the installed kernel.