A: You have to enable both: "[ ] POSIX API" and "[ ] Compile tests" in the Test and Examples subsystem (when configuring RTAI using e.g. make menuconfig).
Q: I have download a pristine kernel 2.4.20 from www.kernel.org for my Redhat9.0 machine. I also applied rtai patch (patch -p1 </home/rtai/rtai-24.1.11/patches/patch-2.4.20-rthal5g>) on that pristine kernel and compiled it sucessfully. But When I built rtai, it gave me error messages:
make: Entering directory `/home/rtai/rtai-24.1.11/usposix' cc -I -Wall -Wstrict-prototypes -O2 -I/home/rtai/rtai-24.1.11/include -I. -c -o condtest.o condtest.c In file included from /home/rtai/rtai-24.1.11/include/rtai_usp_posix.h:31, from condtest.c:24: /usr/include/asm/atomic.h:40:2: warning: #warning Using kernel header in userland program. BAD!
A: >You should remove the folders /usr/include/asm and /usr/include/linux and >replace them with symlinks to the asm and linux include folders of your patched >kernel.
What you need to do is make sure the include path is arranged source headers find /usr/src/linux/include/* instead of /usr/include/* when building kernel stuff, and vice versa when building userland stuff.
You *want* these to be different.
A: My main problem happened when enabling the Linux kernel option "Set version information on all module symbols" (which should be disabled anyway if you want to generate a kernel for RTAI).