https://github.com/mrkct/pi0-os
A from-scratch operating system for the raspberry pi zero
https://github.com/mrkct/pi0-os
Last synced: 2 months ago
JSON representation
A from-scratch operating system for the raspberry pi zero
- Host: GitHub
- URL: https://github.com/mrkct/pi0-os
- Owner: mrkct
- Created: 2023-10-14T17:18:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-25T11:11:33.000Z (4 months ago)
- Last Synced: 2025-03-17T01:47:46.054Z (2 months ago)
- Language: C
- Homepage:
- Size: 5.87 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pi0-os
A fully from scratch operating system the QEMU ARM "virt" machine
and the Raspberry Pi Zero.
Still need to find a good name for it.There's barely a GUI or any usable software, but you can run DOOM:
## How to try it out
The easiest way to try it out is to install `qemu-system-arm`, download a package
from the CI pipeline and run the script inside it.
That will start a QEMU instance setup with peripherals and a disk image with all
the available programs for you to play with.## Build instructions
There is a Docker image that can be used to build the project.
You cannot use it to run QEMU though, so you'll have to install `qemu-system-arm`
separately outside of it, and also `make`.To build using Docker, run the following commands:
```
docker build -t pi0-os .
docker run -v $(pwd):/pi0-os pi0-os
```This will build the kernel, all of the userland programs and automatically
create a disk image.Running `make qemu` will start the QEMU instance using the built kernel
and disk image.## Debugging and stuff
Here's a useful `.gdbinit`, add it to your `kernel/` directory.
```
target remote localhost:1234
file kernel.elf
add-symbol-file boot/boot.elf
````make qemu-gdb` will start QEMU with the GDB stub enabled and paused.
On another terminal, run `gdb-multiarch` inside the `kernel/` directory
and it will automatically attach to the running QEMU instance and load
the symbols file for both the kernel and the bootloader.### Reverse debugging
`RECORD=1 make qemu` will record the execution of QEMU.
`REPLAY=1 make qemu-gdb` will replay the recorded execution