Start using the zig build system

Start using zig build system
This commit is contained in:
Sam Tebbs 2019-04-30 10:43:40 +01:00 committed by SamTebbs33
parent def383249e
commit 47f68ceb9c
5 changed files with 145 additions and 33 deletions

View file

@ -1,5 +1,26 @@
Compile: zig build-exe kmain.zig -target i386-freestanding --linker-script link.ld
# Pluto
Run: qemu-system-i386 -kernel kmain -curses
## Build
Requires *xorriso* and the grub tools (such as *grub-mkrescue*).
```
mkdir -p bin/kernel
mkdir -p bin/iso/boot/grub
zig build
```
To exit qemu: Esc + 2, type `quit`
Note that the `mkdir` invocations are only needed once. See `zig build --help` for a list of options.
## Run
```
zig build run
```
To debug the kernel:
```
zig build run -Ddebug=true
zig build debug
```
# Test
```
zig build test
```