LibBSD PowerPC motorola_shared BSP PCI Support

Joel Sherrill joel at rtems.org
Tue Oct 27 14:41:20 UTC 2020


On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes <junkes at fhi-berlin.mpg.de>
wrote:

> I am currently trying git rtems6.
>
> ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log
> powerpc_beatnik.log --no-clean --target=powerpc-rtems6
> --with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel
>
> works …
>
> Unfortunately It fails here:
>
> ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log libbsd.log
> --no-clean --target=powerpc-rtems6 --with-rtems-bsp=beatnik
> --host=powerpc-rtems6 6/rtems-libbsd
>
> ...
> [1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c
> In file included from
> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,
>                  from
> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,
>                  from ../../freebsd/sys/sys/libkern.h:216,
>                  from ../../freebsd/sys/sys/systm.h:543,
>                  from ../../freebsd/sys/sys/mbuf.h:42,
>                  from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> /home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error: conflicting
> declaration of C function 'void qsort_r(void*, size_t, size_t, int
> (*)(const void*, const void*, void*
> ), void*)'
>   309 | void qsort_r (void *__base, size_t __nmemb, size_t __size, int
> (*_compar)(const void *, const void *, void *), void *__thunk);
>       |      ^~~~~~~
> In file included from ../../freebsd/sys/sys/systm.h:543,
>                  from ../../freebsd/sys/sys/mbuf.h:42,
>                  from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:
> ../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration 'void
> qsort_r(void*, size_t, size_t, void*, int (*)(void*, const void*, const
> void*))'
>   211 | void  qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
>       |       ^~~~~~~
>
> Waf: Leaving directory
> `/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9
> 2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'
> Build failed
>  -> task in 'bsd' failed with exit status 1 (run with -v to display more
> information)
> shell cmd failed: /bin/sh -ex
> /home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build
> error: building
> rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1
>

I'm not sure why this would not have shown up before but the FreeBSD kernel
reuses some standard library method names with different signatures. The
file rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h renames a lot of
items to put them in a BSD namespace. qsort_r isn't in this list but
perhaps should be.

--joel

>
>
> Viele Grüße
> Heinz Junkes
> --
> Experience directly varies with equipment ruined.
>
>
>
> > On 27. Oct 2020, at 05:06, Chris Johns <chrisj at rtems.org> wrote:
> >
> > On 26/10/20 7:32 pm, Heinz Junkes wrote:
> >> Good morning Chris,
> >> i will now try out libbsd on a MVME6100 (beatnik).
> >> Is the mentioned patch in git?
> >
> > The PCI patch is in rtems-libbsd.git on the master and 6-freebsd-12
> branches.
> >
> >> Or do I have to prepare something special?
> >
> > Yes I think you may need to patch libbsd for the beatnik bvoard. I have
> not
> > looked at that board and the net drivers it needs. The current list is
> we have
> > in libbsd is:
> >
> >
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h?h=6-freebsd-12
> >
> > The BSP support is handled here:
> >
> >
> https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/include/bsp/nexus-devices.h?h=6-freebsd-12
> >
> > The define is based on the header guard for the BSP:
> >
> > https://git.rtems.org/rtems/tree/bsps/powerpc/beatnik/include/bsp.h#n25
> >
> > I hope this helps.
> >
> > Chris
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201027/173d4898/attachment-0001.html>


More information about the devel mailing list