Closed FPtje closed 7 years ago
Ah, turns out it's NixOS forcibly ignoring CFLAGS_MODULE=-fno-pic
because of kernel hardening. Setting the following in the derivation (= definition of the package) resolved this issue:
hardeningDisable = [ "pic" ];
On the following Linux distribution:
I'm trying to manually compile the kernel modules using the following script:
The reason for not using drivers/Makefile is because it hard codes
KERNEL_SRC_DIR
.The modules compile, but as soon as I try to modprobe them, the following error shows up in dmesg:
The above error is for
udmabuf
, but it happens to every single module. I've Googled the issue and found about a dozen different websites saying that one should setCFLAGS_MODULE=-fno-pic
in the Makefile or make command. I've done that (see the compile script posted above), but it has no effect. The error still happens.I'm not well versed in compiling kernel modules, so I'm stuck here. Any idea what I could be doing wrong?