-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
62 lines (48 loc) · 2.08 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
===============================================================================
LancelOS arm-kernel
===============================================================================
Description:
-------------------------------------------------------------------------------
The goal is to write a simple ARM kernel for Raspberry (only Pi 2 for now but
it won't be too hard to port) in Zig.
I want to understand how my computer work and I like learning by doing.
This is not and will never be intended for any kind of production environment.
Features:
-------------------------------------------------------------------------------
[x] Boot
[x] UART Read/Write
[x] Kernel/Userspace memory separation
[x] "device file" model
[x] open, read, write, close syscalls (on char devices only)
[x] brk syscall, malloc/free in userspace
[x] Framebuffer Read/Write
[x] Virtual TTY with a home-made font :)
[ ] Keyboard
[ ] File system
[x] Multiple processes running at the same time, context switching
[ ] Non system-blocking syscalls
[ ] Pipe
[ ] Userspace shell
... Maybe more, don't know yet
Usage:
-------------------------------------------------------------------------------
You need to have the bare-metal ARM cross-assembly/link tools install
On Archlinux it's extra/arm-none-eabi-binutils
As well as the zig compiler and qemu if you want to test it on your machine.
You can build the kernel with:
make
This will build the kernel to an ./init.bin file
To launch it in qemu:
make qemu-screen
License:
-------------------------------------------------------------------------------
This project is licensed under the "THE GAME LICENSE"
Resources:
-------------------------------------------------------------------------------
https://wiki.osdev.org
https://developer.arm.com/documentation/ddi0595/2021-12/AArch32-Registers
@AsahiLina's explanation of CVE-2022-32947 is a very entertaining way to
understand page tables https://www.youtube.com/watch?v=hDek2cp0dmI
BROADCOM BCM2837 ARM Peripherals datasheet
https://linux-kernel-labs.github.io/refs/heads/master/index.html
https://www.kernel.org/doc/html/latest/index.html