3

I seek to use the Pi as an educational tool to learn about programming a machine from the ground-up. In a perfect scenario, the first instruction executed after the firmware on ROM, and everything thereafter, should be something I write.

Unfortunately, as far as I'm aware, there is no way around this for the Pi. Broadcom stuck basically all the cool stuff into their closed-source GPU blob which we are forced to load.

With this in mind, is there any way to actually do what the Pi was meant to do? I.e. learn about how all this stuff works?

For example, drawing to a screen. From what I've found, the lowest-level available solution on the Pi is to request a frame buffer from VideoCore using the mailbox system, then write into that buffer, and the GPU checks that buffer and magically outputs to the screen. But how does the contents of the buffer actually get written to the screen? It's still just as much as a mystery as using something like Win32 to blit a buffer to the screen.

zach
  • 89
  • 3

1 Answers1

4

People have been writing hobby operating systems and bare metal code since 2012 for the Raspberry Pi. I think you fixation on the closed-source GPU blob is misguided - the lack of official public USB controller docs has been a bigger obstacle. Check out the Bare Metal subforum at https://www.raspberrypi.org/forums/viewforum.php?f=72 in any case.

To your framebuffer comment : GPUs are (to me) an abstraction unto itself - write to memory and it magically appears on screen. This is their very purpose if i am not mistaken.

A system like fignition or the Parallax Propeller (both have a distinct educational aspect) might be a better choice here because it is more obvious and transparent how the video is actually generated.

Another option might be to refuse using HDMI/Composite and driving an display over the GPIO yourself.

flakeshake
  • 6,244
  • 1
  • 16
  • 35