Hi, Eleven <qiaochu...@126.com> writes: > I’m trying to compile some extra kernel module for my guixsd, however > the headers files needed, `modules.h` and `platform_device.h` was not > found. After redefining the linux-libra-headers package, update the > version to 4.15.13 which is the version of the kernel I’m currently > running, I get `modules.h` but `platform_device.h` still > missing. What’s the problem and how can I fix it?
platform_device.h is not part of the user API, so it's not installed by the "headers_install" make target in linux-libre. I would recommend against changing the 'linux-libre-headers' package itself. The contents of 'linux-libre-headers' is included in our default C headers used to build the entire system. Updating it entails a full system rebuild from the toolchain up. Even if not for this practical problem, I would argue that private kernel driver interfaces do not belong in our default C headers. The headers needed to build kernel modules should be a separate package, maybe called 'linux-libre-kernel-headers' or 'linux-libre-internal-headers'. It could be almost the same as 'linux-libre-headers', except that it should use the current kernel version (using the %linux-libre-version and %linux-libre-hash variables) and it should use different make targets in the 'build' and 'install' phases, namely "headers_check_all" and "headers_install_all". Mark