summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {