aboutsummaryrefslogtreecommitdiff
path: root/make_cdrom.sh
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-10 16:12:03 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-10 16:12:03 +0100
commit48c1c4dcc449d05e9950a861e165f456e0d583a1 (patch)
tree1107e6a6779d16824055e358eb04a45fc5365b63 /make_cdrom.sh
parentc6068c0bce5cf764846e775d3509b1a82af4a0e5 (diff)
downloadkogata-48c1c4dcc449d05e9950a861e165f456e0d583a1.tar.gz
kogata-48c1c4dcc449d05e9950a861e165f456e0d583a1.zip
Rename & cleanup.
Diffstat (limited to 'make_cdrom.sh')
-rwxr-xr-xmake_cdrom.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/make_cdrom.sh b/make_cdrom.sh
index b481fcc..d67b3ec 100755
--- a/make_cdrom.sh
+++ b/make_cdrom.sh
@@ -1,17 +1,34 @@
#!/bin/sh
-mkdir -p cdrom/boot/grub
-
if [ ! -e cdrom/boot/grub/stage2_eltorito ]; then
+ mkdir -p cdrom/boot/grub
echo "Please copy grub's stage2_eltorito to cdrom/boot/grub."
exit -1
fi
-cp menu_cdrom.lst cdrom/boot/grub/menu.lst
+# Copy system files to CDROM
+
cp src/kernel/kernel.bin cdrom; strip cdrom/kernel.bin
cp src/apps/init/init.bin cdrom; strip cdrom/init.bin
+
cp README.md cdrom
+# Setup config files
+
+cat > cdrom/boot/grub/menu.lst <<EOF
+timeout 10
+default 0
+
+title kogata OS
+kernel /kernel.bin root=io:/disk/atapi0 root_opts=l init=root:/init.bin
+
+title kogata OS without root
+kernel /kernel.bin init=io:/mod/init.bin
+module /init.bin
+EOF
+
+# Generate CDROm image
+
genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -input-charset ascii \
-A kogata-os -o cdrom.iso cdrom