Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hgruniaux/pi-kachulm_os
A mini OS kernel for Raspberry PI 3 and 4
https://github.com/hgruniaux/pi-kachulm_os
baremetal kernel os rasberrypi raspberry-pi raspberry-pi-3 raspberry-pi-4
Last synced: 28 days ago
JSON representation
A mini OS kernel for Raspberry PI 3 and 4
- Host: GitHub
- URL: https://github.com/hgruniaux/pi-kachulm_os
- Owner: hgruniaux
- License: other
- Created: 2024-02-17T13:56:24.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-11T13:34:24.000Z (7 months ago)
- Last Synced: 2024-04-12T18:08:18.583Z (7 months ago)
- Topics: baremetal, kernel, os, rasberrypi, raspberry-pi, raspberry-pi-3, raspberry-pi-4
- Language: C++
- Homepage:
- Size: 322 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Pi-kachULM_OS
## Building the kernel
To build the kernel you will need to install a aarch64 GCC compiler, `cmake` and `mtools`:
- On Ubuntu, something like that:
```shell
sudo apt install gcc-aarch64-linux-gnu make cmake mtools
```
Try to install the latest available version of GCC.
- On macOS,
```shell
brew install gcc make cmake mtools
```
should suffice if you are on a M1/M2 CPU. [To be tested]
- On Windows, good luck. See MinGW or search internet.Then, you just need you execute in the project directory:
```shell
# Change aarch64-linux-gnu- by whatever is named GCC for aarch64 on your system.
cmake -S . -Bbuild -DGCC_PREFIX=aarch64-linux-gnu- --toolchain=cmake/GCCToolchain.cmake
make -j -C build kernel-img
```## Testing the kernel
You can either run the kernel on real Raspberry PI (at least version 3 required) hardware.
Or use QEMU. First, you need to install it:
- On ubuntu,
```shell
sudo apt install qemu-system-arm
```
- On macOS,
```shell
brew install qemu
```Then to run the kernel, just type:
```shell
# You may need to change qemu-system-aarch64 by whatever is QEMU for aarch64 is named on your computer.
qemu-system-aarch64 -M raspi3b -serial stdio -kernel build/kernel/kernel8.img -dtb doc/DeviceTree/pi3.dtb -device loader,file=build/binfs/fs.img,addr=0x18000000,force-raw=on
```## The userspace file structure
- `/`: The root
- `/bin`: all the executables of the user space
- `/bin/init`: ELF program for aarch, the first program started by the OS.
- `/bin/credits`: ELF program for aarch, displaying credits on screen
- `/bin/slides`: ELF program for aarch, used for the presentation
- `/bin/explorer`: ELF program for aarch, a file explorer
- `/wallpaper.jpg`: The window manager wallpaper.
- `/slides/`: The slides used by the `slides` user program.