Thinus Viljoen wrote: > Hi > > I am trying to get RTnet running under RTAI kernel space, basically as > described in > > http://www.mail-archive.com/rtnet-users@lists.sourceforge.net/msg01127.html > > I am using RTnet 0.9.2, RTAI 3.3 Vulcano, kernel 2.6.15.1. > > The basic RTAI and RTnet installations seems fine: the RTAI test > programs work, rtping works, I can compile and execute the RTnet (user > space) example shipped with the code, etc. > > I run into problems trying to compile a basic kernel-space RTnet > application, however. It seems that the "sockaddr_in" structure is > declared in > /usr/include/netinet/in.h > while > /usr/src/linux/include/linux/module.h > and > /usr/src/linux/include/linux/kernel.h > is required to compile a kernel module (please correct me if I am > wrong). > > I added /usr/include as an include path, in order to include
NEVER include user-space headers in kernel space (typically, vice versa is true as well). Look out for the related kernel header instead, e.g. lxr.free-electrons.com can help in those cases (http://lxr.free-electrons.com/ident?i=sockaddr_in) > netinet/in.h. When I include all three of these files I get a number of > errors. The first one is: > > /usr/include/stdint.h:37: error: redefinition of typedef ‘int8_t’ > include/linux/types.h:108: error: previous declaration of ‘int8_t’ was > here > > Can anyone help me? > > (As an aside: why isn't there a RTAI kernel mode example included with > 0.9.x ? It would have saved me a lot of sweat, tears and swearwords) I do understand. Let me explain: We used to have almost only kernel-space examples in older versions (LXRT was not usable that days). Those got outdated and I also wanted to push more useful user-space examples in, specifically to direct more commercial users on a sane path. You may know, there exist quite strong opinions about non-GPL kernel space modules: "Closed source Linux kernel modules are illegal" (Greg Kroah-Hartman, kernel developer). We now have a few Xenomai module examples again. But regarding RTAI you have to note that it is only "passively" supported since development and testing of RTnet completely switched to Xenomai last year. I typically run a simple compile test before release, but RTAI-specific contributions like examples depend on the RTAI users. So, if you want to share your code with others, you are welcome! Given your code is in reasonable shape, I will definitely merge it. Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users