<div dir="ltr">Hi,<div><br></div><div>I made the required changes and got SOEM to compile. It is still untested and I'm getting the following error, but the library builds well. </div><div><br></div><div><div><font face="monospace, monospace">RTEMS Source Builder - Set Builder, 4.11 (7db7be3ae7e0 modified)</font></div><div><font face="monospace, monospace">Build Set: 4.11/net/soem</font></div><div><font face="monospace, monospace">config: net/soem.cfg</font></div><div><font face="monospace, monospace">package: soem-sparc-rtems4.11-1</font></div><div><font face="monospace, monospace">git: clone: git://<a href="http://github.com/lounick/SOEM.git">github.com/lounick/SOEM.git</a> -> sources/git/SOEM.git</font></div><div><font face="monospace, monospace">git: checkout: git://<a href="http://github.com/lounick/SOEM.git">github.com/lounick/SOEM.git</a> => integrate-with-RTEMS</font></div><div><font face="monospace, monospace">building: soem-sparc-rtems4.11-1</font></div><div><font face="monospace, monospace">error: copying tree: /home/niko/rtems/rsb/rtems/build/tmp/soem-sparc-rtems4.11-1-root-niko -> /home/niko/rtems/rsb/rtems/build/tmp/sb-niko/4.11/net/soem: [Errno 2] No such file or directory: '/home/niko/rtems/rsb/rtems/build/tmp/soem-sparc-rtems4.11-1-root-niko'</font></div><div><font face="monospace, monospace">Build Set: Time 0:00:02.307659</font></div><div><font face="monospace, monospace">Build FAILED</font></div></div><div><br></div><div>I will be attending a conference and won't be able to work on it till the end of the month. I am attaching the patch plus the build log in case someone has time to give it a try and find any issues. Else I will try to test it once I'm back.</div><div><br></div><div>Cheers,</div><div>Niko</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 11, 2017 at 3:19 PM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Sep 11, 2017 at 7:26 AM, Nicolas Tsiogkas <span dir="ltr"><<a href="mailto:lou.nick@gmail.com" target="_blank">lou.nick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Chris,<div><br></div><div>minor update on the progress.</div><div><br></div><div>I managed to start the compilation correctly on Friday. Of course it fails as the source needs to be modified.</div></div></blockquote><div><br></div></span><div>Hopefully it is not much and it is ways in which they assumed Linux not POSIX<br>or not deeply embedded. Feel free to ask questions on issues. You tend to</div><div>see similar issues over and over.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>On that front I haven't heard back from people responsible for the ethernet driver and if libbsd is in their scope.</div></div></blockquote><div><br></div></span><div>From a porting perspective, I would not worry about this. The package should be written to the</div><div>standard networking APIs. The legacy stack or libbsd will have the same core APIs although</div><div>libbsd will have a more complete set and have a more recent and robust set of device drivers.</div><div><br></div><div>NOTE: The pc support needs updating. It broke when the core libbsd code was last</div><div>updated to be using a later FreeBSD version. There should be a ticket describing</div><div>the issue. I don't know if this impacts you or not.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>In general which are the options? Libbsd and standard RTEMS networking stack? I will try to evaluate both and have something compiling by Friday hopefully, so I can test and create the patches.</div></div></blockquote><div><br></div></span><div>Yes. The stack in the RTEMS tree is an older FreeBSD port with IPV4 only</div><div>and a limited set of newer device drivers. A lot of the older BSPs have device</div><div>drivers for it. It is missing a few POSIX network APIs  but that doesn't seem to</div><div>have ever caused anyone issues.</div><div><br></div><div>The new libbsd stack is much more modern, feature, uses standard FreeBSD</div><div>network drivers, IPV4, IPV6, etc. It also includes USB host and early Wifi</div><div>support.</div><div><br></div><div>If at all possible you want to use the libbsd stack. But for the purposes</div><div>of porting/compiling alone, it doesn't matter much. Thanks to careful </div><div>engineering, with RTEMS you use the same header files independent</div><div>of the underlying stack. Port to one and you should have a port to</div><div>the other until it comes to actual network configuration issues.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><br></div><div>Cheers,</div><div>Niko</div></div><div class="m_5857720294402440251HOEnZb"><div class="m_5857720294402440251h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 5:40 PM, Nicolas Tsiogkas <span dir="ltr"><<a href="mailto:lou.nick@gmail.com" target="_blank">lou.nick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Chris for your input.<div><br></div><div>I think I've used a cmake gui once in 2008 or 2009 and never did that to myself again. :P</div><div><br></div><div>I started creating the required cmake extensions for SOEM. I hope to have something trying to compile by monday sometime. I'll keep you posted.</div><div><br></div><div>Cheers,</div><div>Niko</div></div><div class="m_5857720294402440251m_-5593917114405527594HOEnZb"><div class="m_5857720294402440251m_-5593917114405527594h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 3:57 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 06/09/2017 19:56, Nicolas Tsiogkas wrote:<br>
> I'm trying to integrate SOEM with RTEMS (<a href="https://devel.rtems.org/ticket/3120" rel="noreferrer" target="_blank">https://devel.rtems.org/ticke<wbr>t/3120</a><br>
</span>> <<a href="https://devel.rtems.org/ticket/3120" rel="noreferrer" target="_blank">https://devel.rtems.org/ticke<wbr>t/3120</a>>)<br>
<br>
Thank you for creating the ticket.<br>
<span><br>
> As I am trying to create the appropriate bset and cfg files I noticed that all<br>
> the packages built are based on autoconf to be built.<br>
<br>
</span>This reflects the nature of the packages we currently support and nothing more.<br>
<span><br>
> SOEM on the other hand is only providing CMake as a build tool.<br>
<br>
</span>This should be fine if the implementation in SOEM is ok.<br>
<span><br>
> I have found instructions on using CMake with RTEMS<br>
> (<a href="https://lists.rtems.org/pipermail/devel/2016-March/013800.html" rel="noreferrer" target="_blank">https://lists.rtems.org/piper<wbr>mail/devel/2016-March/013800.h<wbr>tml</a>)<br>
><br>
> The question is if it would be more sensible to create a build environment for<br>
> SOEM based on autotools or try to use CMake somehow?<br>
<br>
</span>I do not think there is a need. The upstream project has selected cmake and we<br>
should respect that.<br>
<span><br>
> I doubt that changing the build system will be easily accepted upstream.<br>
<br>
</span>Agreed.<br>
<br>
The RSB scripts will invoke cmake so this bit is easy. The part you need to work<br>
with the upstream project is getting a cross-complier build to work. How well<br>
this works depends on how the cmake build scripts in the project are<br>
implemented. Carefully constructed cmake build scripts and the judicious use of<br>
the command line `-D` options can be used to configure and/or build the package.<br>
<br>
I should warn you, use the cmake gui and tui tool at your own risk, if you step<br>
in there you may never return as the same person.<br>
<br>
The key file in the RSB is rtems-bsp.cfg [1]. It wraps a private package config<br>
implementation that parses an installed BSP's build configuration [2] and<br>
updates the internal RSB data [3].<br>
<br>
I suggest you get the package to build from the command line for a BSP. This<br>
will be the compiler name and cflags. What you end up with will be available in<br>
the macros in rtems-bsp.cfg.<br>
<br>
Have a look in the BSP installed .pc file for the flags to use, ie do a `find .<br>
-name \*.pc` from the RTEMS installed prefix path.<br>
<br>
My (publicly denied) cmake experience with RTEMS is configure header tests can<br>
be fragile if there is cmake nesting.<br>
<br>
Chris<br>
<br>
[1] <a href="https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-so<wbr>urce-builder/tree/rtems/config<wbr>/rtems-bsp.cfg</a><br>
[2] <a href="https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg#n64" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-so<wbr>urce-builder/tree/rtems/config<wbr>/rtems-bsp.cfg#n64</a><br>
[3] <a href="https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg#n81" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-so<wbr>urce-builder/tree/rtems/config<wbr>/rtems-bsp.cfg#n81</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br></div></div>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br></blockquote></div><br></div></div>
</blockquote></div><br></div>