summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-17 10:25:35 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-17 10:25:35 +0200
commit5bc8549a8d7f5c9644f878fe3ca55761663a2fd0 (patch)
tree93613f66d792af3ab5d0e516ff17eb2daf3c4575 /Makefile
parentb6924d994ccdbe86ea67351d3c94600e14f5ed1f (diff)
downloadTCE-5bc8549a8d7f5c9644f878fe3ca55761663a2fd0.tar.gz
TCE-5bc8549a8d7f5c9644f878fe3ca55761663a2fd0.zip
Now booting on CD-ROM.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 18 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index d63478d..bb759b8 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ QemuCmd = qemu-system-i386
BasePath = $(shell pwd)
SrcPath = $(BasePath)/src
-Floppy = TCE.fl.img
+Cdrom = TCE.iso
all:
@for p in $(Projects); do \
@@ -36,20 +36,24 @@ commit: mrproper
git commit -a; exit 0
git push origin
-floppy:
- mkdir mnt; exit 0
- sudo mount $(Floppy) mnt -o loop
- sudo ./copy_fdd.sh
- sleep 0.3
- sudo umount mnt
-
-
-bochs: all floppy
+$(Cdrom): menu_cdrom.lst src/kernel/kernel.elf src/user/test/test.elf
+ mkdir -p cdrom/boot/grub
+ if [ ! -e cdrom/boot/grub/stage2_eltorito ]; then \
+ echo "Please copy grub's stage2_eltorito to cdrom/boot/grub."; \
+ exit -1; \
+ fi
+ cp menu_cdrom.lst cdrom/boot/grub/menu.lst
+ cp src/kernel/kernel.elf cdrom
+ cp src/user/test/test.elf cdrom
+ genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 \
+ -boot-info-table -input-charset ascii -A TCE -o $(Cdrom) cdrom
+
+bochs: all $(Cdrom)
bochs -f bochs.cfg
-qemu: all floppy
- $(QemuCmd) -fda $(Floppy) -m 32
+qemu: all $(Cdrom)
+ $(QemuCmd) -cdrom $(Cdrom) -m 32
-qemu-gdb: all floppy
- $(QemuCmd) -fda $(Floppy) -m 32 -s -S & gdb src/kernel/kernel.elf -x gdb-cmd
+qemu-gdb: all $(Cdrom)
+ $(QemuCmd) -cdrom $(Cdrom) -m 32 -s -S & gdb src/kernel/kernel.elf -x gdb-cmd