aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorMarvin Borner2020-06-20 19:26:17 +0200
committerMarvin Borner2020-06-20 19:26:17 +0200
commite2a264fa749bcf7a332b0d474eb527d988531472 (patch)
treeae38a384cda40451d6919f3d1a09efa1fda85e9c /run
parentcdea72777ae088e865b1100436a7ece7d5877347 (diff)
Added static binary kernel loading
Diffstat (limited to 'run')
-rwxr-xr-xrun11
1 files changed, 6 insertions, 5 deletions
diff --git a/run b/run
index 3ed1240..24f5ee2 100755
--- a/run
+++ b/run
@@ -89,6 +89,7 @@ make_cross() {
}
make_build() {
+ rm -rf ./disk/bin/ ./disk/boot/
mkdir -p build/ disk/bin/ disk/boot
echo "Building..."
@@ -97,12 +98,13 @@ make_build() {
make
cd ..
- # Create disk image
- make_genext2fs
- /usr/local/bin/genext2fs -B 4096 -d disk/ -U -N 4096 -b 65536 build/disk.img
-
+ # Copy files
nasm src/entry.asm -f bin -o disk/boot/boot.bin
cp build/melvix.bin disk/boot/
+
+ # Create disk image
+ make_genext2fs
+ /usr/local/bin/genext2fs -B 1024 -d disk/ -U -N 1024 -b 65536 build/disk.img
dd if=disk/boot/boot.bin of=build/disk.img conv=notrunc
printf "Build finshed successfully!\n\n"
@@ -147,7 +149,6 @@ elif [ "${mode}" = "clean" ]; then
make_clean
elif [ "${mode}" = "test" ]; then
make_cross
- make_clean
make_build
make_sync &
make_test