Raspberry Pi: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
m typo
m →‎Boot-from-serial kernel: Spelling and grammar fixes
Line 73: Line 73:
==Boot-from-serial kernel==
==Boot-from-serial kernel==


The RPi boots the kernel directly form SD card and only from SD card. There is no other option. While devloping this becomes tiresome since one has to constantly swap the SD card from the RPi to a SD card reader and back. Writing the kernel to the SD card over and over also wears out the card. Plus the SD card slot is somewhat fragile, several people have reported that they broke it accidentally. Overall not an ideal solution. So what can we do abou that?
The RPi boots the kernel directly from an SD card and only from an SD card. There is no other option. While developing this becomes tiresome since one has to constantly swap the SD card from the RPi to a SD card reader and back. Writing the kernel to the SD card over and over also wears out the card. Plus the SD card slot is somewhat fragile; several people have reported that they broke it accidentally. Overall not an ideal solution. So what can we do about that?


I've written a small bootloader named [https://github.com/mrvn/raspbootin Raspbootin] based on the Tutorial in C above that loads the real kernel from the serial port. Raspbootin is acompanied by Raspbootcom ([https://github.com/mrvn/raspbootin same repository]) that acts as a boot server and terminal program. Using the two I only need to reboot my RPi to get it to boot the latest kernel. That makes testing both faster and saver for the hardware.
I've written a small bootloader named [https://github.com/mrvn/raspbootin Raspbootin] based on the Tutorial in C above that loads the real kernel from the serial port. Raspbootin is acompanied by Raspbootcom ([https://github.com/mrvn/raspbootin same repository]) that acts as a boot server and terminal program. Using the two I only need to reboot my RPi to get it to boot the latest kernel. This makes testing both faster and safer for the hardware.


Raspbootin is completely transparent for your kernel. It preserves the r0, r1 and r2 registers and ATAGs placed into memory by the GPU for your kernel. So weather you boot your kernel directly from SD Card or with Raspbootin via serial port makes no difference to your code.
Raspbootin is completely transparent for your kernel. It preserves the r0, r1 and r2 registers and ATAGs placed into memory by the GPU for your kernel. So whether you boot your kernel directly from an SD card or with Raspbootin via serial port makes no difference to your code.


===Raspbootin serial protocol===
===Raspbootin serial protocol===