1 Star 0 Fork 108

夜阑/2024-exercises-stage-2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qemu.sh 902 Bytes
一键复制 编辑 原始数据 按行查看 历史
夜阑 提交于 2024-06-16 14:44 . Finished
#!/bin/bash
# 设置参数
MACHINE="virt"
CPU="rv64"
MEMORY="1G"
DEVICE="virtio-blk-device,drive=hd"
DRIVE="file=/home/hongyu/Eulix/2024-exercises-virtual-machines/stage-1.qcow2,if=none,id=hd"
VIRTFS="local,id=lee,path=/home/hongyu/Eulix/2024-exercises-stage-2,mount_tag=lee,security_model=passthrough"
BIOS="/usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf"
KERNEL="/usr/lib/u-boot/qemu-riscv64_smode/uboot.elf"
RNG_OBJECT="rng-random,filename=/dev/urandom,id=rng"
RNG_DEVICE="virtio-rng-device,rng=rng"
CONSOLE="nographic"
APPEND="root=LABEL=rootfs console=ttyS0"
# 执行qemu-system-riscv64
sudo qemu-system-riscv64 \
-machine "$MACHINE" \
-cpu "$CPU" \
-m "$MEMORY" \
-device "$DEVICE" \
-drive "$DRIVE" \
-virtfs "$VIRTFS" \
-bios "$BIOS" \
-kernel "$KERNEL" \
-object "$RNG_OBJECT" \
-device "$RNG_DEVICE" \
-nographic \
-append "$APPEND"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/the-end-of-the-night/2024-exercises-stage-2.git
git@gitee.com:the-end-of-the-night/2024-exercises-stage-2.git
the-end-of-the-night
2024-exercises-stage-2
2024-exercises-stage-2
master

搜索帮助