<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 7:11 PM, Andre Marques <span dir="ltr"><<a href="mailto:andre.lousa.marques@gmail.com" target="_blank">andre.lousa.marques@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 04/04/14 20:19, Joel Sherrill wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 4/4/2014 1:15 PM, Gedare Bloom wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The license looked fine to me.<br>
</blockquote>
+1<br>
<br>
As always, we just need to be careful on a file per file basis just in case<br>
something else in rpi-boot has a different license.<br>
</blockquote>
<br></div>
All files in rpi-boot use a similar licence, so I will be using some code from rpi-boot as a base for this.</blockquote><div><br></div><div>Great.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Apr 3, 2014 at 10:06 PM, Alan Cudmore <<a href="mailto:alan.cudmore@gmail.com" target="_blank">alan.cudmore@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 From my limited research, it looks like the emmc controller in the Raspberry<br>
Pi BCM2835 may be the way to go.<br>
It looks like it is a high level controller for the SD/MMC card slot on the<br>
Pi.<br>
<br>
Since this is a custom controller, I don't think there would be an existing<br>
driver in RTEMS.<br>
<br>
It seems that this emmc controller in the Pi may handle different types of<br>
cards, and at a higher level than just using the SPI bus to access the card.<br>
( This is based on some searches of conversations on the raspberry pi forums<br>
, not my experience )<br>
<br>
You would have to write a driver for this emmc controller and provide the<br>
interface to libblock for the file system interface on RTEMS. The code you<br>
have linked above for rpi-boot looks like it has a permissive license, so it<br>
*may* be possible to use this code in the RTEMS driver. There is some other<br>
potentially useful code in there too.<br>
</blockquote></blockquote></blockquote>
<br></div>
The mailbox access, mmio read and write and the timer code will also be usefull, and not only for emmc. This timer code differs from the misc/timer.h currently in the raspberrypi BSP, as it waits a certain amount of time (until some register gets updated). The misc/timer.h is a benchmark timer, so one of them would have to be renamed or reorganized.<br>

<br></blockquote><div><br></div><div>Can an RTEMS timer be used for the mailbox communication? </div><div>Also, I don't think the benchmark timer code in the RTEMS Raspberry Pi BSP is functional.</div><div><br></div>
<div>I have been contacted by someone who is currently working on a console driver for the BSP, and has been able to display fonts. We may want to include him, because I think the graphics code uses mailbox communication to the GPU. </div>
<div><br></div><div>It is very interesting that the GPU is running a commercial RTOS, and we will be communicating to it with RTEMS.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

My plan was to have at the root of the raspberrypi BSP a folder "emmc" for the emmc driver code, and the mailbox, mmio and timer on the misc folder, with the headers on the include folder. What do you think?<br>

<br>
I have been trying the rpi-boot emmc code for the past week, and I modified the hello test to use the emmc driver (an overly simplified version of the rpi-boot, just to read the slot info register for now), and my compilation process has been:<br>

<br>
1. Add/change files in Raspberrypi BSP<br>
2. Update Makefile.am<br>
3. Run bootstrap -p and bootstrap from the RaspberryPi BSP folder<br>
4. (Re)configure RTEMS<br>
5. make and make install RTEMS from the root folder<br>
<br></blockquote><div>That is pretty much what I do. Although it might be possible to test drivers and code in the RKI image, then integrate it into the RTEMS tree when it is ready.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I have been using the --enable-maintainer-mode, but I am not sure about exacly what it simplifies, because I always needed to do those steps for it to compile and link correctly.<br></blockquote><div><br></div><div>I don't know what this does either..</div>
<div><br></div><div><br></div><div>Alan</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--André Marques<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I'll have to try the serial bootloader, I am also close to ordering an<br>
inexpensive JTAG adapter to try loading and debugging through JTAG. uboot is<br>
another possibility, using a TFTP server.<br>
<br>
Alan<br>
<br>
<br>
<br>
<br>
On Wed, Apr 2, 2014 at 12:02 PM, Andre Marques<br>
<<a href="mailto:andre.lousa.marques@gmail.com" target="_blank">andre.lousa.marques@gmail.com</a><u></u>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I'm intending to work in the SD card support for the Raspberry Pi BSP,<br>
using the SD mode instead of the SPI mode.<br>
<br>
The references I have gathered so far for this are as follows:<br>
<br>
The Raspberry Pi SOC guide: Broadcom BCM2835 Peripherals Guide (Chapter 5<br>
- EMMC)<br>
<br>
The simplified SD standard -<br>
<a href="https://www.sdcard.org/downloads/pls/simplified_specs/" target="_blank">https://www.sdcard.org/<u></u>downloads/pls/simplified_<u></u>specs/</a><br>
<br>
And the following github code -<br>
<a href="https://github.com/jncronin/rpi-boot/blob/master/emmc.c" target="_blank">https://github.com/jncronin/<u></u>rpi-boot/blob/master/emmc.c</a><br>
<br>
There is also the libchip/i2c/spi-sd-card libi2c driver, which can also be<br>
a reference (even though it uses SPI).<br>
<br>
Now, the questions:<br>
<br>
Should I use the Generic Disk Device driver, as the<br>
libchip/i2c/spi-sd-card ?<br>
<br>
Is there any driver using the SD mode for sd card access, or using an emmc<br>
interface currently in the RTEMS code base? I haven't found any.<br>
<br>
On a side note, I managed to send RTEMS applications to the RPi though the<br>
UART interface using the xmodem protocol.<br>
<br>
For that I used the following bootloader<br>
<br>
<a href="https://github.com/dwelch67/raspberrypi/tree/master/bootloader05" target="_blank">https://github.com/dwelch67/<u></u>raspberrypi/tree/master/<u></u>bootloader05</a><br>
<br>
It takes me 2 minutes to send 1 MB of data to the RPi, but this could be<br>
improved if it used 1024 byte block transfer instead of the default of 128.<br>
The bootloader loads the transfered program to memory and runs it. Then the<br>
RPi must be rebooted so a new program can be sent.<br>
<br>
It may not be the best way, but only requires an usb-to-uart cable, and<br>
avoids the current SD card "dance" to run programs on the Pi.<br>
<br>
Thank you for your time.<br>
<br>
--André Marques<br>
<br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
</blockquote></blockquote>
<br>
</div></div></blockquote></div><br></div></div>