Ensure that you are using a Linux system (Native or WSL should both work) with all the specified dev dependencies installed. A setup script is coming in the future for Ubuntu and Arch.
After setting up the environment, create a directory build
then run make
should compile a new PiOS kernel image. Running make run
should spin up a
Raspberry Pi 1A+ emulator in QEMU and load the PiOS kernel.
To run the PiOS image on hardware, replace the kernel.img
in the boot sector
of a copy of Rasbian with the kernel.img
in the build
directory
(Not working at the moment).
- make (build automation)
- arm-none-eabi-gcc (compilation)
- qemu-system-arm (emulation)
- screen (serial port communication with hardware)
Do not run replace_img.sh
and restore_img.sh
if you don't know what exactly
the scripts do!
Code used for booting (boot/boot.s) and uart serial communication (drivers/bcm2835-uart.c), and linking (linker.ld) are accredited to wiki.osdev.org.
Link to article: Raspberry Pi Bare Bones