summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authornatrixaeria <upezu@student.kit.edu>2019-10-24 18:30:08 +0200
committernatrixaeria <upezu@student.kit.edu>2019-10-24 18:30:08 +0200
commit6638df9adb455ccdedd3eebc1efd7962b742588f (patch)
tree1396fe735b951d060f6b9ffc77a8c7d5b576c280 /kernel
parent37f9d5593d9f10ef7a697a6d9d0cebdf258ff362 (diff)
Adapt build script to new file system
Diffstat (limited to 'kernel')
-rwxr-xr-xkernel/build.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/build.sh b/kernel/build.sh
index 4f25a2e..530c253 100755
--- a/kernel/build.sh
+++ b/kernel/build.sh
@@ -1,10 +1,11 @@
#!/usr/bin/sh
-ASM_PATH="./"
+ASM_PATH="src/"
TARGET_PATH="target/"
TMP_PATH="$TARGET_PATH/temp/"
OBJ_PATH="$TMP_PATH"
-LINK_SCRIPT_PATH="./"
+LINK_SCRIPT_PATH="src/"
+GRUB_CFG_PATH="src/grub.cfg"
remove_target() {
rm -rf $TARGET_PATH &> /dev/null
@@ -31,7 +32,12 @@ build_kernel_elf() {
build_kernel_iso_from_elf() {
create_target
- echo NIY: build kernel from elf
+ mkdir $TMP_PATH/isofiles &> /dev/null
+ mkdir $TMP_PATH/isofiles/boot &> /dev/null
+ mkdir $TMP_PATH/isofiles/boot/grub &> /dev/null
+ cp $TARGET_PATH/kernel.bin $TMP_PATH/isofiles/boot &> /dev/null
+ cp $GRUB_CFG_PATH $TMP_PATH/isofiles/boot/grub/grub.cfg &> /dev/null
+ grub-mkrescue -d /usr/lib/grub/i386-pc -o $TARGET_PATH/uff.iso $TMP_PATH/isofiles
}
build_kernel_iso() {