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