fishinabarrel / linux-kernel-module-rust

Framework for writing Linux kernel modules in safe Rust
GNU General Public License v2.0
1.33k stars 119 forks source link

Go back to using KDIR to find the kernel sources (fixes #243) #244

Closed geofft closed 4 years ago

geofft commented 4 years ago

On Debian, abs_srctree points to /usr/share/linux-headers-x.y-common, which doesn't have generated arch-specific headers. We previously ran into a similar problem in kernel-cflags-finder regarding expanding includes in the right directory (see the comment in b6378909).

abs_objtree seems to work but I'm not sure that's reliable, it sounds like it's usable for out-of-tree builds in some fashion. CURDIR would work, but since we're using KDIR in the parent Makefile which does a make -C $(KDIR), we may as well export and use that variable.