*it doesn't work as well with my name as it did with Linus
This is a long term project in which I hope to build a simple operating system for the Raspberry Pi.
See doc/Setup.md.
An OS is a huge undertaking, and there are lots of milestones to reach before you can really claim to have an OS. Here are the things I currently have accomplished.
- Simple HDMI framebuffer, with line drawing
- Framebuffer console output
- Serial input/output, on both the Mini UART and PL011 UART
- Simple printf formatting for either serial or framebuffer
Some things that are on the horizon:
- Support more format specifiers in string formatting (not a very high priority right now)
- Process abstraction, with time slices and scheduling. No memory protections yet. Separate stack.
- Memory segmentation
- USB keyboard input (a major undertaking)
- FAT32 filesystem implementation
This would get me to my first milestone. Here is the current set of milestones that I have in mind:
- A minimal shell that supports keyboard input. Basic utilities to explore the file system (probably read-only). Future features will be exposed as commands until I have the ability to create an init process.
- The ability to enter "user-mode" and run something. This will require me to figure out the MMU and how I will manage memory for processes (even though process won't actually exist yet).
- A real "process" abstraction, complete with a system call interface and a few system calls. At this point, the process code will likely be copied from the kernel image into the user-mode memory space, rather than trying to support ELF.
- A real "file" abstraction, with an implementation that supports the console. At this point, a process should be able to read and write to the console as its "stdin" and "stdout".
- Some sort of scheduling system (brain-dead simple first). The important thing is to be able to set time slices, run the process in a time slice, and then transition back into kernel-mode in order to schedule something else.
- Some form of interrupt handling that respects processes. This way, the USB driver could use interrupts to get input.
- A real user-mode shell as init!
- Process management system calls so that you can create a new process.
- ELF support? Some sort of format for storing executables.
Like I said, this is a truly long-term project.
There are a lot of great resources that have helped me:
- Baking Pi
- dwelch67's collection of bare-metal examples
- BCM2835 perpiherals datasheet
- PrimeCell UART (PL011) datasheet
I'd like to release this under Revised BSD, as per usual.