cariboulabs / cariboulite

CaribouLite turns any 40-pin Raspberry-Pi into a Tx/Rx 6GHz SDR
1.09k stars 100 forks source link

Fix detection of linux headers on Raspberry Pi OS #147

Closed sergeyvfx closed 10 months ago

sergeyvfx commented 11 months ago

On the Raspberry Pi OS the Linux headers are split into multiple packages and directories under /usr/src: the configuration and actual header files are in different packages. Presumably, this is done this way to allow re-using the header files of the same kernel by all Raspberry Pi kernel flavors.

This made the logic before this change to not consider valid linux headers directory be so: /usr/src/linux-headers-${KERNEL_RELEASE} does not contain include/linux/user.h.

Tweak the code so that it additionally considers directories which contains include/generated/autoconf.h to be kernel headers directory. This file is checked by the linux header's directory Makefile and it is not found the kernel configuration is considered invalid. This path sees to be hardcoded, so it should be the same on all platforms.