<div dir="auto"><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 27, 2020, 2:13 AM Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 2020-01-27 at 02:00 -0800, Alejandro Enedino Hernandez Samaniego wrote:<br>
&gt; Create HelloWorld examples that run on several of the QEMU architectures<br>
&gt; supported by the build system.<br>
&gt; <br>
&gt; This recipe can be used by anyone to understand how baremetal applications<br>
&gt; can be built using OpenEmbedded and how the wiring to set them up could be.<br>
&gt; <br>
&gt; This should also facilitate creating/extending the OE testing infrastructure<br>
&gt; to allow baremetal applications or RTOSs to be tested in the same way that<br>
&gt; Linux currently is.<br>
&gt; <br>
&gt; This can easily be extended to work on other MACHINES in the future.<br>
&gt; <br>
&gt; To run this example:<br>
&gt; <br>
&gt; # Source the oe environment as usual<br>
&gt; $ source oe-init-buildenv<br>
&gt; <br>
&gt; # Set TCLIBC to either newlib or baremetal<br>
&gt; $ echo &quot;TCLIBC = \&quot;newlib\&quot;&quot; &gt;&gt; ./conf/local.conf<br>
&gt; <br>
&gt; # Use one of the supported architectures (qemuarm64, qemuarm or qemuarmv5)<br>
&gt; $ echo &quot;MACHINE = \&quot;qemuarm64\&quot;&quot; &gt;&gt; ./conf/local.conf<br>
&gt; <br>
&gt; # Build<br>
&gt; $ bitbake baremetal-helloworld<br>
&gt; <br>
&gt; # Launch QEMU<br>
&gt; $ runqemu<br>
&gt; <br>
&gt; runqemu - INFO - Running bitbake -e ...<br>
&gt; runqemu - INFO - Continuing with the following parameters:<br>
&gt; KERNEL: [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.bin]<br>
&gt; MACHINE: [qemuarm64]<br>
&gt; FSTYPE: [bin]<br>
&gt; ROOTFS: [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.bin]<br>
&gt; CONFFILE: [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.qemuboot.conf]<br>
&gt; <br>
&gt; Hello OpenEmbedded!<br>
<br>
Looks good.<br>
<br>
Should this be in meta-skeleton? That sublayer generally has our<br>
configuration example tests in as far as I can tell...<br>
<br>
Do you plan to add an oe-selftest for this?<br>
<br>
Cheers,<br>
<br>
Richard<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">Hey Richard,</span><br style="font-family:sans-serif"></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">I do, that&#39;s exactly the plan, I&#39;m working on both oe-selftest and runtime testing cases for this, I&#39;m just doing it in chunks.</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Cheers,</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Alejandro</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote></div></div></div>