Merge pull request #103 from phil-opp/qemu-cdrom

Use `-cdrom` instead of `-drive` as it's shorter
This commit is contained in:
Philipp Oppermann
2016-01-02 16:35:01 +01:00
5 changed files with 8 additions and 8 deletions

View File

@@ -28,10 +28,10 @@ clean:
@rm -rf build @rm -rf build
run: $(iso) run: $(iso)
@qemu-system-x86_64 -drive format=raw,file=$(iso) -s @qemu-system-x86_64 -cdrom $(iso) -s
debug: $(iso) debug: $(iso)
@qemu-system-x86_64 -drive format=raw,file=$(iso) -s -S @qemu-system-x86_64 -cdrom $(iso) -s -S
gdb: gdb:
@rust-os-gdb/bin/rust-gdb "build/kernel-x86_64.bin" -ex "target remote :1234" @rust-os-gdb/bin/rust-gdb "build/kernel-x86_64.bin" -ex "target remote :1234"

View File

@@ -9,7 +9,7 @@ To make QEMU listen for a gdb connection, we add the `-s` flag to the `run` targ
```make ```make
run: $(iso) run: $(iso)
@qemu-system-x86_64 -drive format=raw,file=$(iso) -s @qemu-system-x86_64 -cdrom $(iso) -s
``` ```
This allows us to connect a debugger at any time, for example to investigate why a panic occurred. This allows us to connect a debugger at any time, for example to investigate why a panic occurred.
@@ -17,7 +17,7 @@ To wait for a debugger connection on startup, we add a `debug` target to the Mak
```make ```make
debug: $(iso) debug: $(iso)
@qemu-system-x86_64 -drive format=raw,file=$(iso) -s -S @qemu-system-x86_64 -cdrom $(iso) -s -S
``` ```
It is identical to the `run` target except for the additional `-S` flag. This flag causes QEMU to freeze on startup and wait until a debugger is connected. Now it _should_ be possible to connect gdb. It is identical to the `run` target except for the additional `-S` flag. This flag causes QEMU to freeze on startup and wait until a debugger is connected. Now it _should_ be possible to connect gdb.

View File

@@ -214,7 +214,7 @@ Now it's time to boot our OS. We will use [QEMU]:
[QEMU]: https://en.wikipedia.org/wiki/QEMU [QEMU]: https://en.wikipedia.org/wiki/QEMU
``` ```
qemu-system-x86_64 -drive format=raw,file=os.iso qemu-system-x86_64 -cdrom os.iso
``` ```
![qemu output](/images/qemu-ok.png) ![qemu output](/images/qemu-ok.png)
@@ -268,7 +268,7 @@ clean:
@rm -r build @rm -r build
run: $(iso) run: $(iso)
@qemu-system-x86_64 -drive format=raw,file=$(iso) @qemu-system-x86_64 -cdrom $(iso)
iso: $(iso) iso: $(iso)

View File

@@ -232,7 +232,7 @@ Such a boot loop is most likely caused by some [CPU exception][exception table].
[Triple Fault]: http://wiki.osdev.org/Triple_Fault [Triple Fault]: http://wiki.osdev.org/Triple_Fault
``` ```
> qemu-system-x86_64 -d int -no-reboot -drive format=raw,file=build/os-x86_64.iso > qemu-system-x86_64 -d int -no-reboot -cdrom build/os-x86_64.iso
SMM: enter SMM: enter
... ...
SMM: after RSM SMM: after RSM

View File

@@ -707,7 +707,7 @@ A QEMU boot load indicates that some CPU exception occured. We can see all throw
[qemu debugging]: {% post_url 2015-09-02-set-up-rust %}#debugging [qemu debugging]: {% post_url 2015-09-02-set-up-rust %}#debugging
```bash ```bash
> qemu-system-x86_64 -d int -no-reboot -drive format=raw,file=build/os-x86_64.iso > qemu-system-x86_64 -d int -no-reboot -cdrom build/os-x86_64.iso
... ...
check_exception old: 0xffffffff new 0xe check_exception old: 0xffffffff new 0xe
0: v=0e e=0002 i=0 cpl=0 IP=0008:000000000010ab97 pc=000000000010ab97 0: v=0e e=0002 i=0 cpl=0 IP=0008:000000000010ab97 pc=000000000010ab97