Messages in this thread | | | Date | Sat, 27 Dec 2003 02:11:53 +0100 | From | Eduard Bloch <> | Subject | [2.6] building extra modules, with r/o source |
| |
#include <hallo.h>
I have a general question to the new kernel build system which is claimed to be very generic: how does someone build external modules having the MINIMAL SET of the kernel headers and other configuration files? With Kernel 2.4, it was mostly feasible:
- compiler calls were identical and portable - MODVERSIONS setting and modified compiler command could be configured using the .config file and few kernel headers - compiler name could be extracted from the configured headers - kernel headers only were enough to build the most modules out there
With 2.6, I see two major flaws:
- module writers are encouraged to use the kernel build system to compile modules. Problem: apparently the whole build system must be shipped together with the headers. Solution: unknown. I would like to see something like the gtk-config script generated during the complete kernel build which would provide all needed information including compiler command. External modules could get the complete command line by running sh /usr/src/kernel-foo-headers/kmod-build --compile foo.c
- the build system also tries to write in the kernel source directory. This is simply not acceptable if /usr is mounted read-only or if you try to build external modules as user. The only good solution I see is using some temporary directory to write run-time files. I tried setting different variables in Makefile but that did not help, and the build scripts are not documented consistent enough to be easy to understand.
MfG, Eduard. -- Wußten Sie schon... ... daß "finish" gar nicht finnisch ist, sondern englisch? [unhandled content-type:application/pgp-signature] | |