[PATCH] doc/raspberrypi: Added instructions for raspberrypi

Gedare Bloom gedare at rtems.org
Sun Jan 5 16:58:05 UTC 2020


On Sun, Jan 5, 2020 at 6:56 AM Christian Mauderer <list at c-mauderer.de> wrote:
>
> Hello Niteesh,
>
> thanks for extending the documentation. That's very valuable.
>
> I had some white space bugs again when applying:
>
> `````
> .git/rebase-apply/patch:68: trailing whitespace.
>
> .git/rebase-apply/patch:77: trailing whitespace.
>      arm-rtems5-gdb hello.exe
> .git/rebase-apply/patch:85: trailing whitespace.
>
> .git/rebase-apply/patch:86: trailing whitespace.
>
> .git/rebase-apply/patch:85: new blank line at EOF.
> +
> `````
>
> It's possible that for some code block it's necessary but there are at
> least two that are not necessary.
>
> For my workflow it was very useful to enable colors in git to get rid of
> most of these errors. You can do that by the following command:
>
>     git config --global color.ui auto
>
> With this you very clear red marks for white space errors in "git diff"
> and similar commands.
>
> Depending on your editor you might can enable some visual hints right in
> the editor too.
>
> On 05/01/2020 13:46, G S Niteesh wrote:
> > Added instructions to run examples on raspberrypi.
> > ---
> >  user/bsps/arm/raspberrypi.rst | 75 ++++++++++++++++++++++++++++++++++-
> >  1 file changed, 74 insertions(+), 1 deletion(-)
> >
> > diff --git a/user/bsps/arm/raspberrypi.rst b/user/bsps/arm/raspberrypi.rst
> > index 4ef75bd..653f8a7 100644
> > --- a/user/bsps/arm/raspberrypi.rst
> > +++ b/user/bsps/arm/raspberrypi.rst
> > @@ -5,4 +5,77 @@
> >  raspberrypi
> >  ===========
> >
> > -TODO.
> > +This BSP support's `raspberrypi 1` and `raspberrypi 2` currently.
> I think the official form is "Raspberry Pi X". At least it's used in
> that form on the start page of raspberrypi.org.
>
support's -> supports (no apostrophe)

> > +The support for `raspberrypi 3` is work under progress.
> > +The default bootloader on the raspberrypi which is used to boot raspbian
> > +or other OS can be also used to boot RTEMS. U-boot can also be used
> > +but it a personal preferance.
>
> "preference" (I think?)
>
Yes. I'm not really sure what the sentence means though, I would
remove the phrase about "personal preference" and just leave it as
U-boot can also be used.

> > +
> > +Setup up SD card
remove redundant 'up'

> > +----------------
> > +
> > +The raspberrypi's have an unconventional booting mechanism. The GPU
remove apostrophe from "raspberrypi's"

> > +boots first, initializes itself, runs the bootloader and start the CPU.
start->starts

> > +The bootloader looks for a kernel image, by default the kernel images must
> > +have name of form `kernel*.img` but this can be changed by adding `kernel=<img_name>`
>
> Please try to keep 80 Characters when possible. In this case break
> before `kernel...
add 'a' in "have a name"
add 'the' in "of the form"
And make the line break as suggested, before the second kernel or adding.


>
> > +to config.txt.
> > +
> > +You must provide the required files for the GPU to proceed. These files
> > +can be downloded from this link https://github.com/raspberrypi/firmware/tree/master/boot
>
> "downloaded"
>
> 80 Characters again.
>
I think there is a way to typeset links to URLs, look at other docs
for examples.

> > +.You can remove the kernel*.img if you want, but don't touch the other files.
>
> The dot should have one space to "You" and it should be in one line
> together with the previous sentence.
>
> > +
> > +Copy these files in to a SD card with FAT filesystem.
> > +
> > +Kernel image
> > +------------
> > +
> > +We will be running the hello.exe on raspberrypi 2. Other examples can be
>
> Is there a reason why you emphasized the board name above but not here?
>
> It's not limited to the samples from the RTEMS tests. So maybe change
> that to something like:
>
> "The following steps show how to run hello.exe on a Raspberry Pi 2.
> Other executables can be processed in a similar way."
>
> > +found under testsuites.
> > +
> > +To create the kernel image:
> > +
> > +.. code-block:: none
> > +
> > +     arm-rtems5-objcopy -Obinary hello.exe kernel.img
> > +
> > +Copy the kernel image to the SD card.
> > +
> > +Make sure you have these lines below in your config.txt.
> > +
> > +.. code-block:: none
> > +
> > +     enable-uart=1
> > +     kernel_address=0x200000
> > +     kernel=kernel.img
> > +
> > +Testing
> > +-------
> > +
> > +Qemu along with GDB can be used for debugging, but it only supports
> > +``raspberrpi2`` and emulation is also incomplete. So some of the features
>
> Again a different style for the board name.
>
And misspelt, "y" is missing in raspberrypi2.

> > +might not work as expected.
> > +
> > +Make sure you have latest version of qemu, older ones don't support
> > +raspberrypi.
>
> I'm not a native speaker but that sentence somehow sounds odd. Are you
> sure it's correct?
>
It has a comma splice and missing some articles, try:
"Make sure you have the latest version of qemu, because older ones
don't support raspberrypi."

> > +
> > +.. code-block:: none
> > +
> > +     qemu-system-arm -M raspi2 -m 1G -kernel hello.exe -serial mon:stdio -nographic -S -s
> > +
> > +This starts qemu and creates a socket at port ``1234`` for GDB to connect.
specify: localhost:1234 by default.

> > +
> > +In a new terminal, run GDB using
> > +
> > +.. code-block:: none
> > +
> > +     arm-rtems5-gdb hello.exe
> > +     tar remote:1234
> > +     load
> > +
> > +This will connect GDB to qemu and loads the application.
loads->load

Keep the plural sense consistent.

> > +
> > +**Note**: Add ``set scheduler-locking on`` in GDB if you have any issues running
> > +the examples.
> > +
> > +
> > +
> >


More information about the devel mailing list