<div dir="ltr">I haven't tested it, but it should be possible if using u-boot. I wanted to try<div>this out but didn't have the time due to my university's tight academics. I</div><div>currently use a setup in which the kernel images are transferred through serial,</div><div>but it is really slow.</div><div><br></div><div>I will try this out, once I am free.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 13, 2020 at 12:18 AM Joel Sherrill <<a href="mailto:joel.sherrill@gmail.com" target="_blank">joel.sherrill@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="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 12, 2020, 9:51 AM Jiri Gaisler <<a href="mailto:jiri@gaisler.se" target="_blank">jiri@gaisler.se</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>
<p>You should build devel/qemu4 with RSB, the older devel/qemu does
not build on newer systems ...</p></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto">Also is there anyway to boot RTEMS executables from the network? Manually replacing the kernel image in the SD is not conducive to automated testing.</div><div dir="auto"><br></div><div dir="auto">If you don't know how to do that, the doc looks ok without assuming the recommended changes happen. It would just be nice to know how to automate testing the Pi's.</div><div dir="auto"></div><div dir="auto"><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"><div>
<p>Jiri.<br>
</p>
<p><br>
</p>
<div>On 1/12/20 4:48 PM, Niteesh wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I can't build QEMU using RSB, there seems to be a
problem with GLib(see attachment)
<div>but I had no problem building it from the source. Should I
just mention build qemu from</div>
<div>source?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jan 7, 2020 at 11:12
PM Niteesh <<a href="mailto:gsnb.gn@gmail.com" rel="noreferrer" target="_blank">gsnb.gn@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">I didn't use the QEMU build from RSB, I built
it from the source directly for another project
<div>I'll try QEMU from RSB, and will also add instructions
for it in a couple of days.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Jan 7, 2020 at
1:00 AM Gedare Bloom <<a href="mailto:gedare@rtems.org" rel="noreferrer" 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 Mon, Jan 6, 2020 at
11:25 AM Niteesh <<a href="mailto:gsnb.gn@gmail.com" rel="noreferrer" target="_blank">gsnb.gn@gmail.com</a>>
wrote:<br>
><br>
> Do you want to add a build section or just add in a
statement that states "it was built<br>
> using xx version of RSB"?<br>
><br>
<br>
Just a simple statement. Don't even need to mention a
specific<br>
version, if they use RSB to build QEMU it should just
work, right?<br>
<br>
> On Mon, Jan 6, 2020 at 11:51 PM Gedare Bloom <<a href="mailto:gedare@rtems.org" rel="noreferrer" target="_blank">gedare@rtems.org</a>> wrote:<br>
>><br>
>> On Mon, Jan 6, 2020 at 2:47 AM Christian Mauderer
<<a href="mailto:list@c-mauderer.de" rel="noreferrer" target="_blank">list@c-mauderer.de</a>> wrote:<br>
>> ><br>
>> > Looks a lot better.<br>
>> ><br>
>> > On 05/01/2020 20:19, G S Niteesh wrote:<br>
>> > > Added instructions to run examples on
raspberrypi.<br>
>> > > ---<br>
>> > > user/bsps/arm/raspberrypi.rst | 74
++++++++++++++++++++++++++++++++++-<br>
>> > > 1 file changed, 73 insertions(+), 1
deletion(-)<br>
>> > ><br>
>> > > diff --git
a/user/bsps/arm/raspberrypi.rst
b/user/bsps/arm/raspberrypi.rst<br>
>> > > index 4ef75bd..7eccca5 100644<br>
>> > > --- a/user/bsps/arm/raspberrypi.rst<br>
>> > > +++ b/user/bsps/arm/raspberrypi.rst<br>
>> > > @@ -5,4 +5,76 @@<br>
>> > > raspberrypi<br>
>> > > ===========<br>
>> > ><br>
>> > > -TODO.<br>
>> > > +This BSP supports `Raspberry Pi 1` and
`Raspberry Pi 2` currently.<br>
>> > > +The support for `Raspberry Pi 3` is
work under progress.<br>
>> > > +The default bootloader on the
raspberrypi which is used to boot raspbian<br>
>> ><br>
>> > raspberrypi -> Raspberry Pi<br>
>> > raspbian -> Raspbian<br>
>> ><br>
>> > > +or other OS can be also used to boot
RTEMS. U-boot can also be used.<br>
>> > > +<br>
>> > > +Setup SD card<br>
>> > > +----------------<br>
>> > > +<br>
>> > > +The Raspberry Pis have an
unconventional booting mechanism. The GPU<br>
>> > > +boots first, initializes itself, runs
the bootloader and starts the CPU.<br>
>> > > +The bootloader looks for a kernel
image, by default the kernel images must<br>
>> > > +have a name of the form `kernel*.img`
but this can be changed by adding<br>
>> ><br>
>> > Please highlight all files in the same way.
Other BSPs use the following<br>
>> > syntax:<br>
>> ><br>
>> > The ``ticker.exe`` elf file must be
translated ...<br>
>> ><br>
>> > So here it is:<br>
>> ><br>
>> > `kernel*.img` -> ``kernel*.img``<br>
>> ><br>
>> > > +`kernel=<img_name>` to
config.txt.<br>
>> ><br>
>> > config.txt -> ``config.txt``<br>
>> ><br>
>> > > +<br>
>> > > +You must provide the required files
for the GPU to proceed. These files<br>
>> > > +can be downloaded from this<br>
>> > > +`link <<a href="https://github.com/raspberrypi/firmware/tree/master/boot" rel="noreferrer noreferrer" target="_blank">https://github.com/raspberrypi/firmware/tree/master/boot</a>>`_.<br>
>> ><br>
>> > I would suggest:<br>
>> ><br>
>> > ... can be downloaded from<br>
>> > `the Raspberry Pi Firmware Repository<br>
>> > <<a href="https://github.com/raspberrypi/firmware/tree/master/boot" rel="noreferrer noreferrer" target="_blank">https://github.com/raspberrypi/firmware/tree/master/boot</a>>`_.<br>
>> ><br>
>> > I think you shouldn't break links so if this
is too long you can<br>
>> > exceptionally break the 80 character rule.
It's done for other links too.<br>
>> ><br>
>> > > +You can remove the kernel*.img if you
want, but don't touch the other files.<br>
>> ><br>
>> > kernel*.img -> ``kernel*.img``<br>
>> ><br>
>> > > +<br>
>> > > +Copy these files in to a SD card with
FAT filesystem.<br>
>> > > +<br>
>> > > +Kernel image<br>
>> > > +------------<br>
>> > > +<br>
>> > > +The following steps show how to run
hello.exe on a Raspberry Pi 2.<br>
>> ><br>
>> > hello.exe -> ``hello.exe``<br>
>> ><br>
>> > > +The same instructions can be applied
to Raspberry Pi 1 also.<br>
>> > > +Other executables can be processed in
a similar way.<br>
>> > > +<br>
>> > > +To create the kernel image:<br>
>> > > +<br>
>> > > +.. code-block:: none<br>
>> > > +<br>
>> > > + arm-rtems5-objcopy -Obinary
hello.exe kernel.img<br>
>> > > +<br>
>> > > +Copy the kernel image to the SD card.<br>
>> > > +<br>
>> > > +Make sure you have these lines below
in your config.txt.<br>
>> > > +<br>
>> > > +.. code-block:: none<br>
>> > > +<br>
>> > > + enable-uart=1<br>
>> > > + kernel_address=0x200000<br>
>> > > + kernel=kernel.img<br>
>> > > +<br>
>> > > +Testing<br>
>> > > +-------<br>
>> ><br>
>> > Maybe change that chapter to "Emulation" or
"Testing using QEMU". When<br>
>> > reading I had expected a hardware setup in
this chapter after the<br>
>> > SD-card has been prepared in the previous
one.<br>
>> ><br>
>> > > +<br>
>> > > +Qemu along with GDB can be used for
debugging, but it only supports<br>
>> ><br>
>> > Please always use the capitalization that
the project uses. In this case:<br>
>> ><br>
>> > Qemu -> QEMU<br>
>> ><br>
>> > > +``Raspberry Pi 2`` and the emulation
is also incomplete. So some of the<br>
>> ><br>
>> > Again: One formatting for one phrase. So
that would be:<br>
>> ><br>
>> > ``Raspberry Pi 2`` -> Raspberry Pi 2<br>
>> ><br>
>> > > +features might not work as expected.<br>
>> > > +<br>
>> > > +Make sure you have latest version of
qemu, because older ones don't support<br>
>> ><br>
>> > qemu -> QEMU<br>
>> ><br>
>> My only other comment is if this version is built
by RSB already it is<br>
>> worth mentioning here.<br>
>><br>
>> > > +Raspberry Pi.<br>
>> > > +<br>
>> > > +.. code-block:: none<br>
>> > > +<br>
>> > > + qemu-system-arm -M raspi2 -m 1G
-kernel hello.exe -serial mon:stdio -nographic -S -s<br>
>> > > +<br>
>> > > +This starts qemu and creates a socket
at port ``localhost:1234`` for GDB to<br>
>> ><br>
>> > qemu -> QEMU<br>
>> ><br>
>> > > +connect.<br>
>> > > +<br>
>> > > +In a new terminal, run GDB using<br>
>> > > +<br>
>> > > +.. code-block:: none<br>
>> > > +<br>
>> > > + arm-rtems5-gdb hello.exe<br>
>> > > + tar remote:1234<br>
>> > > + load<br>
>> > > +<br>
>> > > +This will connect GDB to qemu and load
the application.<br>
>> ><br>
>> > qemu -> QEMU<br>
>> ><br>
>> > > +<br>
>> > > +**Note**: Add ``set scheduler-locking
on`` in GDB if you have any issues<br>
>> > > +running the examples.<br>
>> > > \ No newline at end of file<br>
>> > ><br>
</blockquote>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
devel mailing list
<a href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></pre>
</blockquote>
</div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>
</blockquote></div>