44# - `PLATFORM`: Target platform in the `platforms` directory
55# - `SMP`: Number of CPUs
66# - `LOG:` Logging level: warn, error, info, debug, trace
7- # - `MEDIUM:` Boot Medium Type: ramdisk-cpio, virtio-blk
87# - `EXTRA_CONFIG`: Extra config specification file
98# - `OUT_CONFIG`: Final config file that takes effect
109# * QEMU options:
@@ -17,15 +16,12 @@ PLATFORM ?=
1716SMP ?= 1
1817LOG ?= debug
1918
20- # 下面的目前还没用, 现在需要手动去cargo.toml中修改, 后面补上
21- MEDIUM ?= ramdisk-cpio
22-
2319OUT_CONFIG ?= $(PWD ) /.axconfig.toml
2420EXTRA_CONFIG ?=
2521
2622# QEMU options
2723DISK: = disk.img
28- SBI: = rustsbi/target/riscv64imac -unknown-none-elf/release/rustsbi-prototyper-payload.elf
24+ SBI ?= rustsbi/target/riscv64gc -unknown-none-elf/release/rustsbi-prototyper-payload.elf
2925RAMDISK_CPIO: =ramdisk.cpio
3026
3127export AX_CONFIG_PATH =$(OUT_CONFIG )
@@ -44,13 +40,10 @@ oldconfig: _axconfig-gen
4440
4541clean :
4642 cargo clean
47- cd rustsbi && cargo clean
43+ test -d " rustsbi " && cd rustsbi && cargo clean
4844 rm -f $(OUT_CONFIG )
4945
5046build : clean defconfig all
5147
52- ramdiskcpio :
53- qemu-system-riscv64 -m 128M -serial mon:stdio -bios $(SBI ) -nographic -machine virt -device loader,file=$(RAMDISK_CPIO ) ,addr=0x84000000
54-
55- virtiodisk :
56- qemu-system-riscv64 -m 128M -serial mon:stdio -bios $(SBI ) -nographic -machine virt -device virtio-blk-pci,drive=disk0 -drive id=disk0,if=none,format=raw,file=$(DISK )
48+ qemu-run :
49+ qemu-system-riscv64 -m 128M -serial mon:stdio -bios $(SBI ) -nographic -machine virt -nographic -machine virt -device virtio-blk-pci,drive=disk0 -drive id=disk0,if=none,format=raw,file=$(DISK )
0 commit comments