That reminds me of a three week, three person group project I had back when I was in university. There were a couple of topics we could pick from, including writing a very simple operating system from scratch. I asked the professors if we could instead port MINIX3 to the Raspberry Pi (given that it already had an ARM port to the BeagleBoard) and they accepted.
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.
No comments yet
dleslie · 1h ago
We did this sort of thing at SFU some 25-30 years ago; though we stopped short of running an OS and compiler on it, and it wasn't a group project.
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:
That looks like the game-version of nand2tetris which I enjoyed doing a while back too (as another suggestion).
b0a04gl · 22m ago
while building altogether cpu + compiler + os ,there's no platform under you. you're the platform.. every bug you hit is a law of your system.. most of us debug through layers someone else wrote. here, even the rules are homemade..op debugged his own rules
Tepix · 1h ago
Very impressive! Low end work is often tedious and time consuming, especially if you lack the essentials like a debugger.
73kl4453dz · 35m ago
Until you've used an oscilloscopes to debug your buggy kprintf, you haven't lived.
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.
No comments yet
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:
https://store.steampowered.com/app/1444480/Turing_Complete/
https://news.ycombinator.com/item?id=24680109
The actual list of sites who have built their own CPUs: https://www.homebrewcpuring.org/