Messages in this thread | | | Date | Fri, 17 Dec 1999 20:01:19 -0500 | From | "Theodore Y. Ts'o" <> | Subject | Re: [PATCH] asm*/resource.h fix for glibc |
| |
Date: Fri, 17 Dec 1999 12:09:41 +0300 From: Michael Barabanov <baraban@igp.mgo.rssi.ru>
BTW, there's a lot more than include files to compiling third-party kernel modules: absense or presense of -D__SMP__, -IPATH_TO_THE_KERNEL_SOURCES/include, other compiler flags like -m486, etc.
PCMCIA and ALSA, for example, have to use complex scripts that parse .config etc to get this information.
For simple drivers, the only thing that really matters is (a) whether or not the kernel is SMP, and (b) whether or not the kernel is using modversions. The rest can be grabbed from the kernel header files, and in fact you can grab (a) and (b) from the kernel header files as well --- assuming that the kernel headers match the kernel you are running.
You can also test the values of (a) and (b) of the running kernel by interrogating /proc. Both of these are rather complex, and it would be nice if there was a simpler way of doing things, but it's also not hard to grab the shell scripts used by the Rocketport driver, or the Makefile in the serial driver, and just use that for your project.
- Ted
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |