From: acevest Date: Mon, 15 May 2023 15:23:45 +0000 (+0800) Subject: bochs boot from cdrom; improve mkiso.sh X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=21116c82929056fbd4558f113997404fea2de8af;p=kernel.git bochs boot from cdrom; improve mkiso.sh --- diff --git a/.bochsrc b/.bochsrc index 04ffc27..c4df170 100644 --- a/.bochsrc +++ b/.bochsrc @@ -762,6 +762,7 @@ ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9 # ata3-slave: type=cdrom, path=iso.sample, status=inserted #======================================================================= ata0-master: type=disk, mode=flat, path="HD.IMG", model="Generic aBCd" +ata0-slave: type=cdrom, path=kernel.iso, status=inserted #ata0-master: type=disk, mode=flat, path="30M.sample" #ata0-master: type=disk, mode=flat, path="30M.sample", cylinders=615, heads=6, spt=17 #ata0-master: type=disk, mode=flat, path="c.img", cylinders=0 # autodetect @@ -783,7 +784,7 @@ ata0-master: type=disk, mode=flat, path="HD.IMG", model="Generic aBCd" # boot: cdrom, floppy, disk #======================================================================= #boot: floppy -boot: disk +boot: cdrom #======================================================================= # FLOPPY_BOOTSIG_CHECK: disabled=[0|1] diff --git a/mkiso.sh b/mkiso.sh index 5795da3..00f6c95 100755 --- a/mkiso.sh +++ b/mkiso.sh @@ -1,4 +1,14 @@ -CONTAINER_ID=78a + +if [ $# -ne 1 ]; then + docker ps -a + echo "input containerid " + read CONTAINER_ID +else + CONTAINER_ID=$1 +fi + +echo "container id ${CONTAINER_ID}" + docker exec -it $CONTAINER_ID /bin/bash -c "cd /root/workspace/kernel && ./scripts/mkiso.sh"