<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 22, 2020 at 6:27 AM Niteesh <<a href="mailto:gsnb.gn@gmail.com">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"><div dir="ltr">On Wed, Jan 22, 2020 at 2:30 AM Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>> wrote:<br></div><div dir="ltr"><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">Hello Niteesh,<br>
<br>
you had two different "v3" patches. Therefore I missed this one. I<br>
thought there was still a review comment from Gedare pending (which he<br>
added at the v2 patch but after the first v3 has been sent).</blockquote><div> </div><div>I have added instruction about installing QEMU from RSB as he said.</div><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"> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 12/01/2020 19:47, G S Niteesh wrote:<br>
> Added instructions to run examples on raspberrypi.<br>
> ---<br>
> user/bsps/arm/raspberrypi.rst | 85 ++++++++++++++++++++++++++++++++++-<br>
> 1 file changed, 84 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/user/bsps/arm/raspberrypi.rst b/user/bsps/arm/raspberrypi.rst<br>
> index 4ef75bd..8e4b38c 100644<br>
> --- a/user/bsps/arm/raspberrypi.rst<br>
> +++ b/user/bsps/arm/raspberrypi.rst<br>
> @@ -5,4 +5,87 @@<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 Raspberry Pi which is used to boot Raspbian<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>
> +`kernel=<img_name>` to ``config.txt``.<br>
> +<br>
> +You must provide the required files for the GPU to proceed. These files<br>
> +can be downloaded from<br>
> +`the Raspberry Pi Firmware Repository <<a href="https://github.com/raspberrypi/firmware/tree/master/boot" rel="noreferrer" target="_blank">https://github.com/raspberrypi/firmware/tree/master/boot</a>>`_.<br>
> +You can remove the ``kernel*.img`` files if you want too, but don't touch the other files.<br>
<br>
This line seems a bit long. Please break at 80 chars. The link above it<br>
is OK to violate that rule because it would most likely not work with a<br>
line break.<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>
> +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 using QEMU<br>
> +------------------<br>
> +<br>
> +QEMU can be built using RSB. Navigate to ``<SOURCE_BUILDER_DIR>/rtems``<br>
> +and run this command.<br>
> +<br>
> +.. code-block:: none<br>
> +<br>
> + ../source-builder/sb-set-builder --prefix=<TOOLCHAIN_DIR> devel/qemu4.bset<br>
> +<br>
> +**Note**: Replace ``<SOURCE_BUILDER_DIR>`` and ``<TOOLCHAIN_DIR>`` with the correct<br>
> +path of the directories. For example, if you used quick-start section as your reference, these<br>
> +two will be ``$HOME/quick-start/src/rsb`` and ``$HOME/quick-start/rtems/5`` respectively,<br>
<br>
Again: Please use a 80 char limit (except for the code block).<br>
<br>
> +<br>
> +QEMU along with GDB can be used for debugging, but it only supports<br>
> +Raspberry Pi 2 and the emulation is also incomplete. So some of the<br>
> +features might not work as expected.<br>
> +<br>
> +Make sure your version of QEMU > v2.6, because older ones don't support<br>
<br>
"...of QEMU is newer than v2.6 ..."<br>
<br>
For most readers it's much faster to read a text without cryptic<br>
abbreviations.<br>
<br>
> +Raspberry Pi's.<br>
<br>
I have to be honest: I'm not sure here. As far as I know the apostroph<br>
(') is a sign that you left something out. I'm not sure whether there<br>
are cases in English where you use it other than that case. But I would<br>
say that you didn't leave anything out in "Pi's" and therefore the<br>
plural should be "Pis" even if it looks odd.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Some comment from a native speaker?</blockquote></div></div></div></blockquote><div> </div><div>Any update on this? As I have said, I added instructions for passing DTB file, I will</div><div>send the patch once this issue is resolved.</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_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote></div></div></div></blockquote><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_quote"><div></div><div>And we also have to add instructions for including the DTB file. I'll make the</div><div>changes you mentioned and also add instructions for including DTB.</div><div>I'll send in the patch, once we get a confirmation from a native speaker, anyhow</div><div>I googled, and I think it should be Pis. The <b>'s </b>symbolizes possessiveness. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<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>
> +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 will load the application.<br>
> +<br>
> +**Note**: Add ``set scheduler-locking on`` in GDB if you have any issues<br>
> +running the examples.<br>
> <br>
</blockquote></div></div>
</div>
</blockquote></div></div>