summaryrefslogtreecommitdiff
path: root/image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'image.sh')
-rwxr-xr-ximage.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/image.sh b/image.sh
new file mode 100755
index 0000000..e15f4ca
--- /dev/null
+++ b/image.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+imagefile=uefi.img
+loaderfile=loader/loader.efi
+kernelfile=kernel/kernel.os
+
+if [[ ! -f ${imagefile} ]]; then
+ dd if=/dev/zero of=${imagefile} bs=1024 count=1440
+ mformat -i uefi.img -f1440 ::
+fi
+
+mcopy -i ${imagefile} -Do ${loaderfile} ::
+mmd -i ${imagefile} -Do ::adasoft
+mmd -i ${imagefile} -Do ::adasoft/sophia
+mcopy -i ${imagefile} ${kernelfile} -Do ::adasoft/sophia
+