<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">On Fri, Nov 20, 2020 at 2:50 PM Christian Mauderer <<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On a last test before I wanted to push it, I found a problem (sorry). On <br>
BSPs that rely on a FDT the test doesn't work:<br></blockquote><div><div class="gmail_default" style="font-size:small">No problem :).</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
You wrap bsp_fdt_get and return another FDT. So as soon as one driver of <br>
the BSP needs the original FDT, that driver won't work any more.<br>
<br>
I think I remember that problem from the Beagle too. Didn't you have a <br>
version where you have enabled the wrapper later? If not: I added a <br>
suggestion below.</blockquote><div><span class="gmail_default" style="font-size:small">Really sorry since it has been a couple of months now I don't exactly</span></div><div><span class="gmail_default" style="font-size:small">remember what all I tried.</span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Am 03.11.20 um 19:18 schrieb G S Niteesh Babu:<br>
> Added a basic test for the implemented RTEMS OFW<br>
> API.<br>
> ---<br>
> spec/build/testsuites/libtests/grp.yml | 2 +<br>
> spec/build/testsuites/libtests/ofw01.yml | 21 +++<br>
> testsuites/libtests/ofw01/init.c | 187 +++++++++++++++++++++++<br>
> testsuites/libtests/ofw01/ofw01.doc | 29 ++++<br>
> testsuites/libtests/ofw01/ofw01.scn | 2 +<br>
> testsuites/libtests/ofw01/some.c | 72 +++++++++<br>
> testsuites/libtests/ofw01/some.dts | 76 +++++++++<br>
> testsuites/libtests/ofw01/some.h | 15 ++<br>
> 8 files changed, 404 insertions(+)<br>
> create mode 100644 spec/build/testsuites/libtests/ofw01.yml<br>
> create mode 100644 testsuites/libtests/ofw01/init.c<br>
> create mode 100644 testsuites/libtests/ofw01/ofw01.doc<br>
> create mode 100644 testsuites/libtests/ofw01/ofw01.scn<br>
> create mode 100644 testsuites/libtests/ofw01/some.c<br>
> create mode 100644 testsuites/libtests/ofw01/some.dts<br>
> create mode 100644 testsuites/libtests/ofw01/some.h<br>
> <br>
> diff --git a/spec/build/testsuites/libtests/grp.yml b/spec/build/testsuites/libtests/grp.yml<br>
> index b9ca014b0d..1aa136854a 100644<br>
> --- a/spec/build/testsuites/libtests/grp.yml<br>
> +++ b/spec/build/testsuites/libtests/grp.yml<br>
> @@ -316,6 +316,8 @@ links:<br>
> uid: write<br>
> - role: build-dependency<br>
> uid: writev<br>
> +- role: build-dependency<br>
> + uid: ofw01<br>
> type: build<br>
> use-after:<br>
> - rtemstest<br>
> diff --git a/spec/build/testsuites/libtests/ofw01.yml b/spec/build/testsuites/libtests/ofw01.yml<br>
> new file mode 100644<br>
> index 0000000000..8517c58bad<br>
> --- /dev/null<br>
> +++ b/spec/build/testsuites/libtests/ofw01.yml<br>
> @@ -0,0 +1,21 @@<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>
> +- -Wl,--wrap=bsp_fdt_get<br>
> +links: []<br>
> +source:<br>
> +- testsuites/libtests/ofw01/init.c<br>
> +- testsuites/libtests/ofw01/some.c<br>
> +stlib: []<br>
> +target: testsuites/libtests/ofw01.exe<br>
> +type: build<br>
> +use-after: []<br>
> +use-before: []<br>
> diff --git a/testsuites/libtests/ofw01/init.c b/testsuites/libtests/ofw01/init.c<br>
> new file mode 100644<br>
> index 0000000000..82ee5eb11f<br>
> --- /dev/null<br>
> +++ b/testsuites/libtests/ofw01/init.c<br>
> @@ -0,0 +1,187 @@<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 <ofw/ofw.h><br>
> +#include <bsp/fdt.h><br>
> +<br>
> +#include "some.h"<br>
> +<br>
> +#define BUF_SIZE 100<br>
> +<br>
> +const char rtems_test_name[] = "OFW 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>
<br>
Instead of some_bin: Add another pointer like "test_fdt". That should be <br>
initialized with NULL and should be set to "some_bin" in Init ...<br>
<br>
> + return &some_bin[0];<br>
> + }<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 c;<br>
> + phandle_t a;<br>
> + phandle_t b;<br>
> + phandle_t q;<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>
> + rtems_ofw_memory_area reg;<br>
> + rtems_ofw_memory_area regs[2];<br>
> + rtems_vector_number intr;<br>
> + rtems_vector_number intrs[2];<br>
> + TEST_BEGIN();<br>
> + buf_len = sizeof(buf);<br>
<br>
... here. After setting test_fdt here, you have to call rtems_ofw_init <br>
again so that the new test-FDT is used. It's a bit of a hack. But it <br>
allows the drivers on FDT based boards to initialize correctly.<br></blockquote><div> </div><div><div class="gmail_default" style="font-size:small">The rtems_ofw_init is an internal static function. Can we expose this through</div></div><div class="gmail_default" style="font-size:small">the API?</div><div> </div><div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small">Niteesh.</div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> + /*<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 = rtems_ofw_find_device("/");<br>
> + rtems_test_assert(root == 56);<br>
> +<br>
> + root = rtems_ofw_peer(0);<br>
> + rtems_test_assert(root == 56);<br>
> +<br>
> + d = rtems_ofw_child(root);<br>
> + temp = rtems_ofw_find_device("/d");<br>
> + rtems_test_assert(d == temp);<br>
> +<br>
> + temp = rtems_ofw_parent(d);<br>
> + rtems_test_assert(root == temp);<br>
> +<br>
> + rv = rtems_ofw_get_prop(d, "e", buf, buf_len);<br>
> + rtems_test_assert(rv != -1);<br>
> + rtems_test_assert(strcmp(buf, "f") == 0);<br>
> +<br>
> + rv = rtems_ofw_has_prop(d, "g");<br>
> + rtems_test_assert(rv == 1);<br>
> +<br>
> + rv = rtems_ofw_get_prop_len(root, "model");<br>
> + rtems_test_assert(rv == 2);<br>
> +<br>
> + rv = rtems_ofw_next_prop(d, "e", buf, buf_len);<br>
> + rtems_test_assert(rv == 1);<br>
> + rtems_test_assert(strcmp(buf, "g") == 0);<br>
> +<br>
> + l = rtems_ofw_find_device("/m@1248");<br>
> + rv = rtems_ofw_search_prop(l, "model", buf, buf_len);<br>
> + rtems_test_assert(rv != -1);<br>
> + rtems_test_assert(strcmp(buf, "c") == 0);<br>
> +<br>
> + rv = rtems_ofw_get_prop_alloc(root, "compatible", (void **)&bufp);<br>
> + rtems_test_assert(rv != -1);<br>
> + rtems_test_assert(strcmp(bufp, "a,b") == 0);<br>
> +<br>
> + rtems_ofw_free(bufp);<br>
> + rv = rtems_ofw_get_prop_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 = rtems_ofw_get_enc_prop_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 = rtems_ofw_find_device("/t");<br>
> + rv = rtems_ofw_next_prop(t, "u", buf, buf_len);<br>
> + rtems_test_assert(rv == 0);<br>
> +<br>
> + rv = rtems_ofw_next_prop(d, "e", buf, buf_len);<br>
> + rtems_test_assert(rv == 1);<br>
> +<br>
> + a = rtems_ofw_find_device("/a");<br>
> + rv = rtems_ofw_get_reg(a, ®, sizeof(reg));<br>
> + rtems_test_assert(rv == 1);<br>
> + rtems_test_assert(reg.start == 0x1234);<br>
> + rtems_test_assert(reg.size == 0x10);<br>
> +<br>
> + b = rtems_ofw_find_device("/a/b");<br>
> + rv = rtems_ofw_get_reg(b, ®s[0], sizeof(regs));<br>
> + rtems_test_assert(rv == 2);<br>
> + rtems_test_assert(regs[0].start == 0x8234);<br>
> + rtems_test_assert(regs[0].size == 0x10);<br>
> + rtems_test_assert(regs[1].start == 0xf468);<br>
> + rtems_test_assert(regs[1].size == 0x10);<br>
> +<br>
> + c = rtems_ofw_find_device("/c");<br>
> + rv = rtems_ofw_get_reg(c, ®, sizeof(reg));<br>
> + rtems_test_assert(rv == -1);<br>
> +<br>
> + a = rtems_ofw_find_device("/a");<br>
> + rv = rtems_ofw_get_interrupts(a, &intr, sizeof(intr));<br>
> + rtems_test_assert(rv == 1);<br>
> + rtems_test_assert(intr == 0x1);<br>
> +<br>
> + c = rtems_ofw_find_device("/c");<br>
> + rv = rtems_ofw_get_interrupts(c, &intrs[0], sizeof(intrs));<br>
> + rtems_test_assert(rv == 2);<br>
> + rtems_test_assert(intrs[0] == 0x1);<br>
> + rtems_test_assert(intrs[1] == 0x2);<br>
> +<br>
> + q = rtems_ofw_find_device("/c/q");<br>
> + rv = rtems_ofw_node_status(q);<br>
> + rtems_test_assert(rv == true);<br>
> +<br>
> + TEST_END();<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>
> diff --git a/testsuites/libtests/ofw01/ofw01.doc b/testsuites/libtests/ofw01/ofw01.doc<br>
> new file mode 100644<br>
> index 0000000000..6a28c847d8<br>
> --- /dev/null<br>
> +++ b/testsuites/libtests/ofw01/ofw01.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>
> + - rtems_ofw_peer<br>
> + - rtems_ofw_child<br>
> + - rtems_ofw_parent<br>
> + - rtems_ofw_get_prop_len<br>
> + - rtems_ofw_get_prop<br>
> + - rtems_ofw_get_enc_prop<br>
> + - rtems_ofw_has_prop<br>
> + - rtems_ofw_search_prop<br>
> + - rtems_ofw_search_enc_prop<br>
> + - rtems_ofw_get_prop_alloc<br>
> + - rtems_ofw_get_prop_alloc_multi<br>
> + - rtems_ofw_get_enc_prop_alloc<br>
> + - rtems_ofw_get_enc_prop_alloc_multi<br>
> + - rtems_ofw_free<br>
> + - rtems_ofw_next_prop<br>
> + - rtems_ofw_set_prop<br>
> + - rtems_ofw_canon<br>
> + - rtems_ofw_find_device<br>
> + - rtems_ofw_package_to_path<br>
> +<br>
> +concepts:<br>
> +<br>
> + - Ensure that some openfimware functions work as expected.<br>
> diff --git a/testsuites/libtests/ofw01/ofw01.scn b/testsuites/libtests/ofw01/ofw01.scn<br>
> new file mode 100644<br>
> index 0000000000..007675e374<br>
> --- /dev/null<br>
> +++ b/testsuites/libtests/ofw01/ofw01.scn<br>
> @@ -0,0 +1,2 @@<br>
> +*** BEGIN OF TEST OFW 1 ***<br>
> +*** END OF TEST OFW 1 ***<br>
> \ No newline at end of file<br>
> diff --git a/testsuites/libtests/ofw01/some.c b/testsuites/libtests/ofw01/some.c<br>
> new file mode 100644<br>
> index 0000000000..91251e71b0<br>
> --- /dev/null<br>
> +++ b/testsuites/libtests/ofw01/some.c<br>
> @@ -0,0 +1,72 @@<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, 0x02, 0xcf, 0x00, 0x00, 0x00, 0x38,<br>
> + 0x00, 0x00, 0x02, 0x70, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x11,<br>
> + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f,<br>
> + 0x00, 0x00, 0x02, 0x38, 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, 0x01, 0x6f, 0x00, 0x00, 0x00,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,<br>
> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x71, 0x00, 0x00, 0x00,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e,<br>
> + 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,<br>
> + 0x00, 0x00, 0x00, 0x01, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,<br>
> + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01,<br>
> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,<br>
> + 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08,<br>
> + 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x10,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x46,<br>
> + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00,<br>
> + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x10, 0x00,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x4d,<br>
> + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x62, 0x00, 0x00, 0x00,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x42,<br>
> + 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x24, 0x68,<br>
> + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,<br>
> + 0x00, 0x00, 0x00, 0x01, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,<br>
> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x03,<br>
> + 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x01,<br>
> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01,<br>
> + 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08,<br>
> + 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00,<br>
> + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x58,<br>
> + 0x6f, 0x6b, 0x61, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,<br>
> + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09,<br>
> + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x00, 0x23,<br>
> + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2d, 0x63, 0x65, 0x6c, 0x6c,<br>
> + 0x73, 0x00, 0x23, 0x73, 0x69, 0x7a, 0x65, 0x2d, 0x63, 0x65, 0x6c, 0x6c,<br>
> + 0x73, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x67, 0x00, 0x77, 0x00,<br>
> + 0x6b, 0x00, 0x6e, 0x00, 0x70, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x00,<br>
> + 0x70, 0x00, 0x72, 0x00, 0x75, 0x00, 0x72, 0x65, 0x67, 0x00, 0x72, 0x61,<br>
> + 0x6e, 0x67, 0x65, 0x73, 0x00, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75,<br>
> + 0x70, 0x74, 0x73, 0x00, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x00,<br>
> +};<br>
> +<br>
> +const size_t some_bin_size = sizeof(some_bin);<br>
> diff --git a/testsuites/libtests/ofw01/some.dts b/testsuites/libtests/ofw01/some.dts<br>
> new file mode 100644<br>
> index 0000000000..6ed8aeb069<br>
> --- /dev/null<br>
> +++ b/testsuites/libtests/ofw01/some.dts<br>
> @@ -0,0 +1,76 @@<br>
> +/*<br>
> + * Copyright (c) 2020 Niteesh G S <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>>. All rights reserved.<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>
> + a {<br>
> + compatible = "a";<br>
> + reg = <0x1234 0x10>;<br>
> + ranges = <0x1000 0x8000 0x400 0x2000 0xF000 0x1000>;<br>
> + interrupts = <0x1>;<br>
> +<br>
> + b {<br>
> + reg = <0x1234 0x10 0x2468 0x10>;<br>
> + };<br>
> + };<br>
> +<br>
> + c {<br>
> + ranges;<br>
> + interrupts = <0x1 0x2 0x3>;<br>
> +<br>
> + q {<br>
> + reg = <0x4800 0x200>;<br>
> + status = "okay";<br>
> + };<br>
> + };<br>
> +};<br>
> diff --git a/testsuites/libtests/ofw01/some.h b/testsuites/libtests/ofw01/some.h<br>
> new file mode 100644<br>
> index 0000000000..e2e0135e68<br>
> --- /dev/null<br>
> +++ b/testsuites/libtests/ofw01/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>
<br>
-- <br>
--------------------------------------------<br>
embedded brains GmbH<br>
Christian MAUDERER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
Phone: +49-89-18 94 741 - 18<br>
Fax: +49-89-18 94 741 - 08<br>
PGP: Public key available on request.<br>
<br>
embedded brains GmbH<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
</blockquote></div></div>