Wolfgang Grandegger wrote: > Jan Kiszka wrote: >> Wolfgang Grandegger wrote: >> >>> Jan Kiszka wrote: >>> >>>> Wolfgang Grandegger wrote: >>>> >>>> >>>>> Hi Jan, >>>>> >>>>> I have now finally a RTnet running on MPC860/FCC <-> MPC8260/EEPRO100. >>>>> Next I will test MPC860/SCC <-> MPC8260/FCC. A few fixes are >>>>> needed, one >>>>> with the compiler flags for module compilation. I think we should use >>>>> the same flags as the kernel uses to build it's modules. In old >>>>> Xenomai >>>>> or RTAI there was a way to get them automatically. What do you think? >>>> >>>> >>>> Yes, it's probably best to port this into current RTnet. Or is there an >>>> official interface now in recent 2.4 kernels to obtain them? >>> >>> I don't know. Is there one in 2.6? >> >> >> Not that I know. It's not needed because you build via >> >> "make -C <kernel_src> SUBDIRS=<your_module_src> modules", >> >> using the original make rules of the kernel. For me the question is how >> other external modules for 2.4 handle this. They all have the same >> problem like we do now. > > Yes, and for this reason the "flags capturing trick" was invented, I > guess. But to avoid trouble... > >> >> Of course we can install the "flags capturing trick" in configure that >> RTAI does for 2.4. But this is some code to copy and it seems to be >> arch-dependent as well: >> >> [configure.in of RTAI] >> ... >> kmod_cflags=`cd $srcdir/base/config/modules && make -s >> RTAI_LINUX_DIR=$RTAI_LINUX_DIR ARCH=$RTAI_TARGET_ARCH CC=$CC | grep >> '^RTAI_KMOD_CFLAGS='` >> eval $kmod_cflags >> if test "$RTAI_KMOD_CFLAGS" = ""; then >> AC_MSG_ERROR([Unable to retrieve compilation flags for kernel >> modules out of $RTAI_LINUX_DIR/Makefile]) >> fi >> ... >> case $RTAI_TARGET_ARCH in >> ... >> ppc) >> RTAI_TARGET_SUBARCH= >> RTAI_KMOD_CFLAGS="$RTAI_KMOD_CFLAGS -I${RTAI_LINUX_DIR}/arch/ppc" >> >> :-/ > > Hm, the include path is already included. When I do the following I get: > > make RTAI_LINUX_DIR=/temp/rtai/devel/linuxppc_2_4_devel ARCH=ppc > make -s -C /temp/rtai/devel/linuxppc_2_4_devel CC=cc > /temp/rtai/devel/linuxppc_2_4_devel/include/linux/modversions.h > make -s -C /temp/rtai/devel/linuxppc_2_4_devel CC=cc ARCH=ppc > SUBDIRS=/opt/eldk/ppc_8xx/root/rtai/kilauea/rtai-core/config/modules > modules > RTAI_KMOD_CFLAGS="-D__KERNEL__ > -I/temp/rtai/devel/linuxppc_2_4_devel/include -Wall -Wstrict-prototypes > -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer > -I/temp/rtai/devel/linuxppc_2_4_devel/arch/ppc -fsigned-char > -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -g > -ggdb -DMODULE -DEXPORT_SYMTAB -Wall" >
That's good. Ok, then just take over the capturing stuff. Could you do this? Thanks, Jan
signature.asc
Description: OpenPGP digital signature