aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-08-28 14:58:53 +0100
committerJames Barnett <noreply@jamesbarnett.xyz>2018-08-28 14:58:53 +0100
commite88de0162cff8bbad80972c1b92355b9d2db0213 (patch)
tree625f5544459177fbe54161bc89887b0288a36c29 /build.sh
parentf85dc5011b3ff2342c6129eafb038ae11fef44a3 (diff)
downloadtinyOS-e88de0162cff8bbad80972c1b92355b9d2db0213.tar.xz
tinyOS-e88de0162cff8bbad80972c1b92355b9d2db0213.zip
Add bootable kernel with basic print function
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..febb1eb
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+mkdir -p bin
+rm -f bin/*
+nasm -f elf32 kernel-bootstrap.asm -o bin/kernel-bootstrap.o
+gcc -m32 -std=c99 -c kernel.c -o bin/kernelc.o
+ld -m elf_i386 -T link.ld -o bin/kernel bin/kernel-bootstrap.o bin/kernelc.o