<div dir="ltr"><div class="gmail_default" style="font-size:small">Ping.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 2, 2020 at 2:44 PM Niteesh G. S. <<a href="mailto:niteesh.gs@gmail.com">niteesh.gs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I went through some of my previous conversations to summarize the various directories</div><div class="gmail_default" style="font-size:small">suggested by people. Maybe this will help to come up with a conclusion.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In my first porting commit, I placed the files under cpukit/libfreebsd this caused issues like</div><div class="gmail_default" style="font-size:small">accessing BSP dependent functions like bsp_fdt_get() therefore Christian suggested moving</div><div class="gmail_default" style="font-size:small">the files to bsps/shared.</div><div class="gmail_default" style="font-size:small"><a href="https://lists.rtems.org/pipermail/devel/2020-May/059959.html" target="_blank">https://lists.rtems.org/pipermail/devel/2020-May/059959.html</a></div><div class="gmail_default" style="font-size:small">I then posted the patches on the mailing lists after moving the files to bsps/shared. After this</div><div class="gmail_default" style="font-size:small">Sebastian suggested moving these back to cpukit since they are BSP independent. And add</div><div class="gmail_default" style="font-size:small">an API to register FDTs since this would allow for unit testing. But later instead of API we</div><div class="gmail_default" style="font-size:small">started using linker wrappers.</div><div class="gmail_default" style="font-size:small"><a href="https://lists.rtems.org/pipermail/devel/2020-May/059978.html" target="_blank">https://lists.rtems.org/pipermail/devel/2020-May/059978.html</a><br></div><div class="gmail_default" style="font-size:small"><a href="https://lists.rtems.org/pipermail/devel/2020-June/060025.html" target="_blank">https://lists.rtems.org/pipermail/devel/2020-June/060025.html</a><br></div><div class="gmail_default" style="font-size:small">Gedare also suggested having the files in cpukit since this would allow for easier synchronization</div><div class="gmail_default" style="font-size:small">with FreeBSD.</div><div class="gmail_default" style="font-size:small"><a href="https://lists.rtems.org/pipermail/devel/2020-May/059807.html" target="_blank">https://lists.rtems.org/pipermail/devel/2020-May/059807.html</a><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small">Niteesh.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 30, 2020 at 1:03 AM Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 29, 2020 at 12:33 PM Christian Mauderer <<a href="mailto:oss@c-mauderer.de" target="_blank">oss@c-mauderer.de</a>> wrote:<br>
><br>
><br>
><br>
> On 29/07/2020 20:21, Gedare Bloom wrote:<br>
> > On Wed, Jul 29, 2020 at 12:10 PM Christian Mauderer <<a href="mailto:oss@c-mauderer.de" target="_blank">oss@c-mauderer.de</a>> wrote:<br>
> >><br>
> >> On 29/07/2020 19:55, Gedare Bloom wrote:<br>
> >>> On Wed, Jul 29, 2020 at 10:44 AM Christian Mauderer <<a href="mailto:oss@c-mauderer.de" target="_blank">oss@c-mauderer.de</a>> wrote:<br>
> >>>><br>
> >>>> On 29/07/2020 18:07, Gedare Bloom wrote:<br>
> >>>>> On Wed, Jul 15, 2020 at 12:32 AM G S Niteesh Babu <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>> wrote:<br>
> >>>>>><br>
> >>>>>> ---<br>
> >>>>>> spec/build/testsuites/libtests/grp.yml | 3 +<br>
> >>>>>> .../testsuites/libtests/openfirmware01.yml | 20 +++<br>
> >>>>>> testsuites/libtests/openfirmware01/init.c | 147 ++++++++++++++++++<br>
> >>>>>> .../openfirmware01/openfirmware01.doc | 29 ++++<br>
> >>>>>> .../openfirmware01/openfirmware01.scn | 2 +<br>
> >>>>>> testsuites/libtests/openfirmware01/some.c | 52 +++++++<br>
> >>>>>> testsuites/libtests/openfirmware01/some.dts | 54 +++++++<br>
> >>>>>> testsuites/libtests/openfirmware01/some.h | 15 ++<br>
> >>>>>> 8 files changed, 322 insertions(+)<br>
> >>>>>> create mode 100644 spec/build/testsuites/libtests/openfirmware01.yml<br>
> >>>>>> create mode 100644 testsuites/libtests/openfirmware01/init.c<br>
> >>>>>> create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.doc<br>
> >>>>>> create mode 100644 testsuites/libtests/openfirmware01/openfirmware01.scn<br>
> >>>>>> create mode 100644 testsuites/libtests/openfirmware01/some.c<br>
> >>>>>> create mode 100644 testsuites/libtests/openfirmware01/some.dts<br>
> >>>>>> create mode 100644 testsuites/libtests/openfirmware01/some.h<br>
> >>>>>><br>
> >>>>>> diff --git a/spec/build/testsuites/libtests/grp.yml b/spec/build/testsuites/libtests/grp.yml<br>
> >>>>>> index f1de6cd75f..56e84d2c89 100644<br>
> >>>>>> --- a/spec/build/testsuites/libtests/grp.yml<br>
> >>>>>> +++ b/spec/build/testsuites/libtests/grp.yml<br>
> >>>>>> @@ -11,6 +11,7 @@ install: []<br>
> >>>>>> ldflags:<br>
> >>>>>> - -Wl,--wrap=printf<br>
> >>>>>> - -Wl,--wrap=puts<br>
> >>>>>> +- -Wl,--wrap=bsp_fdt_get<br>
> >>>>>> links:<br>
> >>>>>> - role: build-dependency<br>
> >>>>>> uid: optbin2c<br>
> >>>>>> @@ -312,6 +313,8 @@ links:<br>
> >>>>>> uid: write<br>
> >>>>>> - role: build-dependency<br>
> >>>>>> uid: writev<br>
> >>>>>> +- role: build-dependency<br>
> >>>>>> + uid: openfirmware01<br>
> >>>>>> type: build<br>
> >>>>>> use-after:<br>
> >>>>>> - rtemstest<br>
> >>>>>> diff --git a/spec/build/testsuites/libtests/openfirmware01.yml b/spec/build/testsuites/libtests/openfirmware01.yml<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..8feb69eb1e<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/spec/build/testsuites/libtests/openfirmware01.yml<br>
> >>>>>> @@ -0,0 +1,20 @@<br>
> >>>>>> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause<br>
> >>>>>> +build-type: test-program<br>
> >>>>>> +cflags: []<br>
> >>>>>> +copyrights:<br>
> >>>>>> +- Copyright (C) 2020 Niteesh G S<br>
> >>>>>> +cppflags: []<br>
> >>>>>> +cxxflags: []<br>
> >>>>>> +enabled-by: true<br>
> >>>>>> +features: c cprogram<br>
> >>>>>> +includes: []<br>
> >>>>>> +ldflags: []<br>
> >>>>>> +links: []<br>
> >>>>>> +source:<br>
> >>>>>> +- testsuites/libtests/openfirmware01/init.c<br>
> >>>>>> +- testsuites/libtests/openfirmware01/some.c<br>
> >>>>>> +stlib: []<br>
> >>>>>> +target: testsuites/libtests/openfirmware01.exe<br>
> >>>>>> +type: build<br>
> >>>>>> +use-after: []<br>
> >>>>>> +use-before: []<br>
> >>>>>> diff --git a/testsuites/libtests/openfirmware01/init.c b/testsuites/libtests/openfirmware01/init.c<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..fc38e6c513<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/testsuites/libtests/openfirmware01/init.c<br>
> >>>>>> @@ -0,0 +1,147 @@<br>
> >>>>>> +/* SPDX-License-Identifier: BSD-2-Clause */<br>
> >>>>>> +<br>
> >>>>>> +/*<br>
> >>>>>> + * Copyright (C) <2020> Niteesh G S <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>><br>
> >>>>>> + *<br>
> >>>>>> + * Redistribution and use in source and binary forms, with or without<br>
> >>>>>> + * modification, are permitted provided that the following conditions<br>
> >>>>>> + * are met:<br>
> >>>>>> + * 1. Redistributions of source code must retain the above copyright<br>
> >>>>>> + * notice, this list of conditions and the following disclaimer.<br>
> >>>>>> + * 2. Redistributions in binary form must reproduce the above copyright<br>
> >>>>>> + * notice, this list of conditions and the following disclaimer in the<br>
> >>>>>> + * documentation and/or other materials provided with the distribution.<br>
> >>>>>> + *<br>
> >>>>>> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
> >>>>>> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
> >>>>>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
> >>>>>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE<br>
> >>>>>> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
> >>>>>> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
> >>>>>> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<br>
> >>>>>> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
> >>>>>> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
> >>>>>> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>
> >>>>>> + * POSSIBILITY OF SUCH DAMAGE.<br>
> >>>>>> + */<br>
> >>>>>> +<br>
> >>>>>> +#ifdef HAVE_CONFIG_H<br>
> >>>>>> +#include "config.h"<br>
> >>>>>> +#endif<br>
> >>>>>> +<br>
> >>>>>> +#include <tmacros.h><br>
> >>>>>> +#include <stdio.h><br>
> >>>>>> +#include <stdlib.h><br>
> >>>>>> +#include <libfdt.h><br>
> >>>>>> +#include <sys/endian.h><br>
> >>>>>> +#include <dev/ofw/openfirm.h><br>
> >>>>>> +<br>
> >>>>>> +#include "some.h"<br>
> >>>>>> +<br>
> >>>>>> +#define BUF_SIZE 100<br>
> >>>>>> +<br>
> >>>>>> +const char rtems_test_name[] = "OpenFirmWare 01";<br>
> >>>>>> +<br>
> >>>>>> +const void *__wrap_bsp_fdt_get(void);<br>
> >>>>>> +const void *__real_bsp_fdt_get(void);<br>
> >>>>>> +<br>
> >>>>>> +const void *__wrap_bsp_fdt_get(void)<br>
> >>>>>> +{<br>
> >>>>>> + if (some_bin != NULL) {<br>
> >>>>>> + return &some_bin[0];<br>
> >>>>>> + }<br>
> >>>>>> + return __real_bsp_fdt_get();<br>
> >>>>>> +}<br>
> >>>>>> +<br>
> >>>>>> +static void Init(rtems_task_argument arg)<br>
> >>>>>> +{<br>
> >>>>>> + int rv;<br>
> >>>>>> + phandle_t d;<br>
> >>>>>> + phandle_t l;<br>
> >>>>>> + phandle_t t;<br>
> >>>>>> + phandle_t root;<br>
> >>>>>> + phandle_t temp;<br>
> >>>>>> + uint32_t *arr;<br>
> >>>>>> + char buf[BUF_SIZE];<br>
> >>>>>> + char *bufp;<br>
> >>>>>> + ssize_t buf_len;<br>
> >>>>>> +<br>
> >>>>>> + TEST_BEGIN();<br>
> >>>>>> + buf_len = sizeof(buf);<br>
> >>>>>> +<br>
> >>>>>> + /*<br>
> >>>>>> + * Cannot use fdt_path_offset to compare because<br>
> >>>>>> + * the OF interface uses the offset from the ftdp<br>
> >>>>>> + * to the node as phandle.<br>
> >>>>>> + */<br>
> >>>>>> + root = OF_finddevice("/");<br>
> >>>>>> + rtems_test_assert(root == 56);<br>
> >>>>>> +<br>
> >>>>>> + root = OF_peer(0);<br>
> >>>>>> + rtems_test_assert(root == 56);<br>
> >>>>>> +<br>
> >>>>>> + d = OF_child(root);<br>
> >>>>>> + temp = OF_finddevice("/d");<br>
> >>>>>> + rtems_test_assert(d == temp);<br>
> >>>>>> +<br>
> >>>>>> + temp = OF_parent(d);<br>
> >>>>>> + rtems_test_assert(root == temp);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_getprop(d, "e", buf, buf_len);<br>
> >>>>>> + rtems_test_assert(rv != -1);<br>
> >>>>>> + rtems_test_assert(strcmp(buf, "f") == 0);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_hasprop(d, "g");<br>
> >>>>>> + rtems_test_assert(rv == 1);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_getproplen(root, "model");<br>
> >>>>>> + rtems_test_assert(rv == 2);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_nextprop(d, "e", buf, buf_len);<br>
> >>>>>> + rtems_test_assert(rv == 1);<br>
> >>>>>> + rtems_test_assert(strcmp(buf, "g") == 0);<br>
> >>>>>> +<br>
> >>>>>> + l = OF_finddevice("/m@1248");<br>
> >>>>>> + rv = OF_searchprop(l, "model", buf, buf_len);<br>
> >>>>>> + rtems_test_assert(rv != -1);<br>
> >>>>>> + rtems_test_assert(strcmp(buf, "c") == 0);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_getprop_alloc(root, "compatible", (void **)&bufp);<br>
> >>>>>> + rtems_test_assert(rv != -1);<br>
> >>>>>> + rtems_test_assert(strcmp(bufp, "a,b") == 0);<br>
> >>>>>> + OF_prop_free(bufp);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_getprop_alloc_multi(l, "n", sizeof(*arr), (void **)&arr);<br>
> >>>>>> + rtems_test_assert(rv == 2);<br>
> >>>>>> + rtems_test_assert(arr[0] == htobe32(0xdeadbeef));<br>
> >>>>>> + rtems_test_assert(arr[1] == htobe32(0x12345678));<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_getencprop_alloc_multi(l, "n", sizeof(*arr), (void **)&arr);<br>
> >>>>>> + rtems_test_assert(rv == 2);<br>
> >>>>>> + rtems_test_assert(arr[0] == 0xdeadbeef);<br>
> >>>>>> + rtems_test_assert(arr[1] == 0x12345678);<br>
> >>>>>> +<br>
> >>>>>> + t = OF_finddevice("/t");<br>
> >>>>>> + rv = OF_nextprop(t, "u", buf, buf_len);<br>
> >>>>>> + rtems_test_assert(rv == 0);<br>
> >>>>>> +<br>
> >>>>>> + rv = OF_nextprop(d, "e", buf, buf_len);<br>
> >>>>>> + rtems_test_assert(rv == 1);<br>
> >>>>>> +<br>
> >>>>><br>
> >>>>> ok, so these are intended to be application-visible. The interface is<br>
> >>>>> not standard though, as far as I know. So, I think we need to ensure<br>
> >>>>> we provide an RTEMS-friendly namespace for this OF API, and make sure<br>
> >>>>> the header files are properly arranged for visibility/layering.<br>
> >>>>><br>
> >>>>> Everything else seems fine to me in a quick glance.<br>
> >>>><br>
> >>>> Hello Gedare,<br>
> >>>><br>
> >>>> the interface is ported from FreeBSD. It's an internal one in FreeBSD<br>
> >>>> but I think it is useful for application drivers too.<br>
> >>>><br>
> >>>> What would you suggest regarding the namespace. I'm not a big fan of<br>
> >>>> changing imported FreeBSD code.<br>
> >>>><br>
> >>><br>
> >>> Background: The problem we have to avoid is polluting the user<br>
> >>> namespace. Software in kernel space, such as FreeBSD and other<br>
> >>> monolithic kernels, don't have that problem.<br>
> >>><br>
> >>> I haven't studied the usage closely, I guess the pinmux is the main<br>
> >>> thing, but I'd like to understand if the FreeBSD symbols need to be<br>
> >>> exposed.<br>
> >>><br>
> >>> Would it be feasible to introduce an rtems-branded API for this stuff,<br>
> >>> and provide a wrapper in libbsd for compatibility? Imagine something<br>
> >>> like....<br>
> >>><br>
> >>> <rtems/dev/openfirmware.h><br>
> >>> rtems_openfirmware_finddevice(char *s);<br>
> >>><br>
> >>> freebsd-compat:<br>
> >>> #define OF_finddevice rtems_openfirmware_finddevice<br>
> >>><br>
> >>> You could even then reuse other ofw interfaces, like:<br>
> >>> linux-compat:<br>
> >>> #define of_finddevice rtems_openfirmware_finddevice<br>
> >>><br>
> >>> Just for example.<br>
> >>><br>
> >>> This way, we only pollute the namespace if someone pulls in the bsd library.<br>
> >>><br>
> >>> If the FreeBSD symbols have to be available inside RTEMS to support<br>
> >>> drivers without libbsd, then I would rather see the symbols converted<br>
> >>> to macros that link to namespace-friendly functions instead.<br>
> >>><br>
> >>> Gedare<br>
> >><br>
> >> The main problem was that the openfirmware stuff is ported from FreeBSD<br>
> >> and someone (don't remember exactly who, possible that it was me)<br>
> >> suggestet that the ported files should be placed in cpukit rather than<br>
> >> in the BSP section. With that it's quite hard to use the interfaces in a<br>
> >> BSP driver without installing some headers.<br>
> >><br>
> ><br>
> > Let's step back for one minute and determine the requirements for the<br>
> > ofw support.<br>
> ><br>
> > Clearly it needs to be available for BSP code to use.<br>
> ><br>
> > Does it need to be available for user application (non-BSP) code?<br>
><br>
> Not really. Maybe could be usefull for closed BSPs with drivers that are<br>
> not put back to RTEMS. But as an open source project I don't think that<br>
> we have to take these into account as long as non of us needs the feature.<br>
><br>
Then we don't need a public API. That is a bit easier. Closed BSPs can<br>
poke under the hood if they need to, and we don't need to really care<br>
as you say.<br>
<br>
> ><br>
> > Does it need to be available for any driver frameworks in cpukit?<br>
><br>
> Not as far as I can tell. Of course it would be possible to say that it<br>
> _is_ a driver framework.<br>
><br>
Right, but if the code base itself does not need to be accessed from<br>
within cpukit, then it doesn't need to be in the cpukit.<br>
<br>
> ><br>
> > Does it need to be available for libbsd?<br>
><br>
> Can be usefull to reduce the duplication of code in libbsd and RTEMS.<br>
><br>
<br>
In this case though, libbsd could still provide the headers, if the<br>
code can be found/linked through the installed rtems. So, it seems to<br>
me that we don't need to have public headers at all. Then, this entire<br>
piece of code can reside in the bsps/ layer and can be namespaced like<br>
other bsp code if necessary.<br>
<br>
> ><br>
> > I think answers to those 3 questions will help to decide what<br>
> > direction to proceed.<br>
> ><br>
> >>><br>
> >>>> Best regards<br>
> >>>><br>
> >>>> Christian<br>
> >>>><br>
> >>>>><br>
> >>>>>> + TEST_END();<br>
> >>>>>> +<br>
> >>>>>> + rtems_test_exit(0);<br>
> >>>>>> +}<br>
> >>>>>> +<br>
> >>>>>> +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<br>
> >>>>>> +#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER<br>
> >>>>>> +<br>
> >>>>>> +#define CONFIGURE_MAXIMUM_TASKS 1<br>
> >>>>>> +<br>
> >>>>>> +#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION<br>
> >>>>>> +<br>
> >>>>>> +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br>
> >>>>>> +<br>
> >>>>>> +#define CONFIGURE_INIT<br>
> >>>>>> +<br>
> >>>>>> +#include <rtems/confdefs.h><br>
> >>>>>> \ No newline at end of file<br>
> >>>>>> diff --git a/testsuites/libtests/openfirmware01/openfirmware01.doc b/testsuites/libtests/openfirmware01/openfirmware01.doc<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..a9d2085798<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/testsuites/libtests/openfirmware01/openfirmware01.doc<br>
> >>>>>> @@ -0,0 +1,29 @@<br>
> >>>>>> +This file describes the directives and concepts tested by this test set.<br>
> >>>>>> +<br>
> >>>>>> +test set name: openfirmware01<br>
> >>>>>> +<br>
> >>>>>> +directives:<br>
> >>>>>> +<br>
> >>>>>> + - OF_peer<br>
> >>>>>> + - OF_child<br>
> >>>>>> + - OF_parent<br>
> >>>>>> + - OF_getproplen<br>
> >>>>>> + - OF_getprop<br>
> >>>>>> + - OF_getencprop<br>
> >>>>>> + - OF_hasprop<br>
> >>>>>> + - OF_searchprop<br>
> >>>>>> + - OF_searchencprop<br>
> >>>>>> + - OF_getprop_alloc<br>
> >>>>>> + - OF_getprop_alloc_multi<br>
> >>>>>> + - OF_getencprop_alloc<br>
> >>>>>> + - OF_getencprop_alloc_multi<br>
> >>>>>> + - OF_prop_free<br>
> >>>>>> + - OF_nextprop<br>
> >>>>>> + - OF_setprop<br>
> >>>>>> + - OF_canon<br>
> >>>>>> + - OF_finddevice<br>
> >>>>>> + - OF_package_to_path<br>
> >>>>>> +<br>
> >>>>>> +concepts:<br>
> >>>>>> +<br>
> >>>>>> + - Ensure that some openfimware functions work as expected.<br>
> >>>>>> diff --git a/testsuites/libtests/openfirmware01/openfirmware01.scn b/testsuites/libtests/openfirmware01/openfirmware01.scn<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..38abbdfc45<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/testsuites/libtests/openfirmware01/openfirmware01.scn<br>
> >>>>>> @@ -0,0 +1,2 @@<br>
> >>>>>> +*** BEGIN OF TEST OPENFIRMWARE 1 ***<br>
> >>>>>> +*** END OF TEST OPENFIRMWARE 1 ***<br>
> >>>>>> diff --git a/testsuites/libtests/openfirmware01/some.c b/testsuites/libtests/openfirmware01/some.c<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..5eed911204<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/testsuites/libtests/openfirmware01/some.c<br>
> >>>>>> @@ -0,0 +1,52 @@<br>
> >>>>>> +/*<br>
> >>>>>> + * Declarations for C structure representing binary file some.bin<br>
> >>>>>> + *<br>
> >>>>>> + * WARNING: Automatically generated -- do not edit!<br>
> >>>>>> + */<br>
> >>>>>> +<br>
> >>>>>> +#include <sys/types.h><br>
> >>>>>> +<br>
> >>>>>> +const unsigned char some_bin[] = {<br>
> >>>>>> + 0xd0, 0x0d, 0xfe, 0xed, 0x00, 0x00, 0x01, 0xd8, 0x00, 0x00, 0x00, 0x38,<br>
> >>>>>> + 0x00, 0x00, 0x01, 0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x11,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,<br>
> >>>>>> + 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x00, 0x61, 0x2c, 0x62, 0x00, 0x00, 0x00, 0x00, 0x03,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1a,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x26, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x09, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x68, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x68, 0x40, 0x31, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x02,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x61, 0x6c, 0x69, 0x61,<br>
> >>>>>> + 0x73, 0x65, 0x73, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x30, 0x2f, 0x6d, 0x40, 0x31, 0x32, 0x34, 0x38, 0x00,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x6d, 0x40, 0x31, 0x32,<br>
> >>>>>> + 0x34, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x32, 0xde, 0xad, 0xbe, 0xef, 0x12, 0x34, 0x56, 0x78,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x34,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,<br>
> >>>>>> + 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x44, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x74, 0x00, 0x00, 0x00,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,<br>
> >>>>>> + 0x00, 0x00, 0x00, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62,<br>
> >>>>>> + 0x6c, 0x65, 0x00, 0x23, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2d,<br>
> >>>>>> + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x00, 0x23, 0x73, 0x69, 0x7a, 0x65, 0x2d,<br>
> >>>>>> + 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00,<br>
> >>>>>> + 0x67, 0x00, 0x77, 0x00, 0x6b, 0x00, 0x6e, 0x00, 0x6c, 0x69, 0x6e, 0x75,<br>
> >>>>>> + 0x78, 0x2c, 0x70, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x00, 0x70, 0x00,<br>
> >>>>>> + 0x72, 0x00, 0x75, 0x00,<br>
> >>>>>> +};<br>
> >>>>>> +<br>
> >>>>>> +const size_t some_bin_size = sizeof(some_bin);<br>
> >>>>>> diff --git a/testsuites/libtests/openfirmware01/some.dts b/testsuites/libtests/openfirmware01/some.dts<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..ac15825b17<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/testsuites/libtests/openfirmware01/some.dts<br>
> >>>>>> @@ -0,0 +1,54 @@<br>
> >>>>>> +/*<br>
> >>>>>> + * Copyright (c) 2015 embedded brains GmbH. All rights reserved.<br>
> >>>>>> + *<br>
> >>>>>> + * embedded brains GmbH<br>
> >>>>>> + * Dornierstr. 4<br>
> >>>>>> + * 82178 Puchheim<br>
> >>>>>> + * Germany<br>
> >>>>>> + * <<a href="mailto:rtems@embedded-brains.de" target="_blank">rtems@embedded-brains.de</a>><br>
> >>>>>> + *<br>
> >>>>>> + * The license and distribution terms for this file may be<br>
> >>>>>> + * found in the file LICENSE in this distribution or at<br>
> >>>>>> + * <a href="http://www.rtems.org/license/LICENSE" rel="noreferrer" target="_blank">http://www.rtems.org/license/LICENSE</a>.<br>
> >>>>>> + */<br>
> >>>>>> +<br>
> >>>>>> +/dts-v1/;<br>
> >>>>>> +<br>
> >>>>>> +/ {<br>
> >>>>>> + compatible = "a,b";<br>
> >>>>>> + #address-cells = <1>;<br>
> >>>>>> + #size-cells = <2>;<br>
> >>>>>> + model = "c";<br>
> >>>>>> +<br>
> >>>>>> + d {<br>
> >>>>>> + e = "f";<br>
> >>>>>> + g;<br>
> >>>>>> +<br>
> >>>>>> + h@0 {<br>
> >>>>>> + };<br>
> >>>>>> +<br>
> >>>>>> + h@1 {<br>
> >>>>>> + w = <123>;<br>
> >>>>>> + };<br>
> >>>>>> + };<br>
> >>>>>> +<br>
> >>>>>> + aliases {<br>
> >>>>>> + k = "/m@1248";<br>
> >>>>>> + };<br>
> >>>>>> +<br>
> >>>>>> + l: m@1248 {<br>
> >>>>>> + n = <0xdeadbeef 0x12345678>;<br>
> >>>>>> +<br>
> >>>>>> + o {<br>
> >>>>>> + p;<br>
> >>>>>> + };<br>
> >>>>>> +<br>
> >>>>>> + q {<br>
> >>>>>> + r = "s";<br>
> >>>>>> + };<br>
> >>>>>> + };<br>
> >>>>>> +<br>
> >>>>>> + t {<br>
> >>>>>> + u = <&l>;<br>
> >>>>>> + };<br>
> >>>>>> +};<br>
> >>>>>> diff --git a/testsuites/libtests/openfirmware01/some.h b/testsuites/libtests/openfirmware01/some.h<br>
> >>>>>> new file mode 100644<br>
> >>>>>> index 0000000000..e2e0135e68<br>
> >>>>>> --- /dev/null<br>
> >>>>>> +++ b/testsuites/libtests/openfirmware01/some.h<br>
> >>>>>> @@ -0,0 +1,15 @@<br>
> >>>>>> +/*<br>
> >>>>>> + * Extern declarations for C structure representing binary file some.bin<br>
> >>>>>> + *<br>
> >>>>>> + * WARNING: Automatically generated -- do not edit!<br>
> >>>>>> + */<br>
> >>>>>> +<br>
> >>>>>> +#ifndef __some_h<br>
> >>>>>> +#define __some_h<br>
> >>>>>> +<br>
> >>>>>> +#include <sys/types.h><br>
> >>>>>> +<br>
> >>>>>> +extern const unsigned char some_bin[];<br>
> >>>>>> +extern const size_t some_bin_size;<br>
> >>>>>> +<br>
> >>>>>> +#endif<br>
> >>>>>> --<br>
> >>>>>> 2.17.1<br>
> >>>>>><br>
> >>>>> _______________________________________________<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/listinfo/devel</a><br>
> >>>>><br>
> >>><br>
> ><br>
</blockquote></div>
</div>
</blockquote></div>