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.


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"

:-/

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to