GSoC 2020: [rtems/rsb]: Error while adding ptp support. This time building for xilinx_zynq_a9_qemu

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 5 04:08:44 UTC 2020


On 04/06/2020 20:29, Mritunjay Sharma wrote:

>
>
> On Thu, Jun 4, 2020 at 11:07 PM Sebastian Huber 
> <sebastian.huber at embedded-brains.de 
> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>
>     On 04/06/2020 16:22, Gedare Bloom wrote:
>
>     >>> In the github version this code is conditional on sys/cpuset.h
>     being present.
>     >>>
>     > Well, we do have a sys/cpuset.h in newlib. It doesn't have these BSD
>     > definitions though. Probably either:
>     > 1. Add more stuff to sys/cpuset.h to make it support BSDisms. This
>     > would mean adding cpuset_setaffinity support in rtems, I guess.
>     > 2. Figure out how to disable the conditional code using the
>     > cpuset_setaffinity function.
>     The <sys/cpuset.h> is already as compatible as possible to glibc and
>     FreeBSD. There is always room for improvement, however, in this
>     area it
>     will be difficult.
>
>
> Please it would be kind of you all to guide on what is the best thing 
> I can do next. It is looking
> a little difficult. If something similar has been done earlier, 
> sharing it can be a lot helpful to take a cue.

Configure scripts are sometimes confused that Newlib provides the glibc 
and FreeBSD CPU set APIs. In this case it seems a FreeBSD system was 
detected and it tries to use some proprietary system calls such as 
cpuset_setaffinity(). If you encounter things like this, I would look at 
the man page:

https://www.freebsd.org/cgi/man.cgi?query=cpuset_setaffinity&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE&arch=default&format=html

Then you have to evaluate if this stuff makes sense on RTEMS. Is it 
really needed? Otherwise you can disable it via an #ifndef __rtems__ define.



More information about the devel mailing list