What was supposed to be a reasonably straightforward project proved to be a huge challenge as we encountered numerous unforeseen technical difficulties. One particularly harrowing one was that the Raspberry Pi 3 booted into hypervisor mode instead of supervisor mode and QEMU's Raspberry Pi emulation accuracy was so abysmal back then to be borderline useless for osdev. I recall it took me an entire week of low-level hardware debugging just to figure that one out.
By the end, we pulled through and delivered a working port with UART, GPIO and framebuffer drivers that could run on the Raspberry Pi 2 and 3. We run our presentation with the port on real hardware, using a shell script that displayed bitmaps from the ramdisk and monitored GPIO pins to move slides forwards or backwards (I used a knife to short-circuit the pins as needed). It was by far the coolest presentation of all the groups just on originality alone and I think I still have the image of that SD card somewhere.
> I asked the professors if we could instead port MINIX3 to the Raspberry Pi
I think they were expecting you to fail.
> QEMU's Raspberry Pi emulation accuracy was so abysmal
When I did some hobby OS dev my strategy was to make it work on QEMU and then pray it would work on real hardware as well, which worked OK...
How did you handle the debugging the raspberry pi on real hardware?
Maybe, but I already had a reputation of being the dark wizard back then. If anything, the other students in my group went along with this because they knew I could overcome any problem... regardless of the cost on my sanity.
> How did you handle the debugging the raspberry pi on real hardware?
Painfully through serial output. I didn't have access to a JTAG probe at the time (I'm not even sure the Raspberry Pi could be debugged that way) and documentation was exceedingly poor.
After that experience, I refuse to debug anything hardware-related without at the very least a GDB stub.
This is Broadcom we're talking about, where that's par for the course. Personally I'd choose a SoC from AllWinner or Rockchip or even Mediatek over them.
The BCM2835-based ones can - I don't know about the modern ones - but you have to change the configuration on a couple of GPIOs to make it show up. (Which makes it difficult to debug early startup, unfortunately.)
Reminds me of shorting the two power-on pins on an ATX motherboard to start it without a switch installed. Obviously, your setup was far cooler. Nice work.
[1] https://news.ycombinator.com/item?id=41673634
On the other side... have also definitely used a pair of LEDs to try to debug an RTOS on a microcontroller with no JTAG access...
Tales from the terminal/dark side/h4x0r pro in da house!
For those interesting in trying this sort of experiment, but wish to have some guidance and accessible tooling, I highly recommend Turing Complete; you'll go from a few gates to a full computer. Components can be shared with the community; where you'll find things like a RiscV core and such. Anyhow, it's great fun. Do recommend. It's on Steam:
The actual list of sites who have built their own CPUs: https://www.homebrewcpuring.org/
https://en.wikipedia.org/wiki/Oric_(computer)
It still to this day has a thriving scene, lots of interesting quirky programs still being written for it. (https://oric.org/)
There is also a thriving hardware hacking scene of course, 21st century peripherals being brought to the user base, and so on.
One of the more interesting things (besides LOCI), is the orix system, which is a 'unix-like' environment for the Oric, which uses avariant of the 6502 cpu.
Its pretty cool - and fun if you're an Oric nerd - but if you like 'unix-like' systems for unusual platforms, put this one in your list to check out, as well:
https://orix.oric.org/twilighte-board-v0-6-user-manual/
Oh, yeah, I know 'unix-like' has a wide scale of sincerity, this is not quite there .. yet .. in terms of having all the unix bits, really .. but it is at least bootstrap in that kind of direction, for the Oric .. anyway ..