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