Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
openeuler_risc-v_qemu_install [2022/02/23 11:26] – [系统时间] misaka00251 | openeuler_risc-v_qemu_install [2023/04/28 02:34] (current) – Disclaimer misaka00251 | ||
---|---|---|---|
Line 3: | Line 3: | ||
不要忘记安装最新版的 [[https:// | 不要忘记安装最新版的 [[https:// | ||
- | 去 [[https:// | + | 去 [[https:// |
- | * fw_payload_oe.elf | + | * fw_payload_oe.elf |
* openEuler-preview.riscv64.qcow2 | * openEuler-preview.riscv64.qcow2 | ||
Line 26: | Line 26: | ||
-append ' | -append ' | ||
-bios none | -bios none | ||
+ | </ | ||
+ | |||
+ | macOS 下启动: | ||
+ | |||
+ | <file powershell run.sh> | ||
+ | cmd=" | ||
+ | -machine virt -nographic \ | ||
+ | -display cocoa, | ||
+ | -smp " | ||
+ | -audiodev coreaudio, | ||
+ | -bios " | ||
+ | -drive file=" | ||
+ | -object rng-random, | ||
+ | -device virtio-vga \ | ||
+ | -device virtio-rng-device, | ||
+ | -device virtio-blk-device, | ||
+ | -device virtio-net-device, | ||
+ | -netdev user, | ||
+ | -device qemu-xhci -usb -device usb-kbd -device usb-tablet -device usb-audio, | ||
+ | |||
+ | eval $cmd | ||
</ | </ | ||
Line 33: | Line 54: | ||
qemu-system-riscv64 ` | qemu-system-riscv64 ` | ||
-nographic -machine virt ` | -nographic -machine virt ` | ||
- | -smp 2 -m 4G ` | + | -smp 8 -m 16G ` |
- | -kernel | + | -display sdl ` |
- | -drive file=openEuler-preview.riscv64.qcow2, | + | -kernel |
+ | -bios none ` | ||
+ | -drive file=openEuler-22.03-V2-xfce-qemu-preview.qcow2, | ||
+ | -device virtio-vga | ||
-device virtio-blk-device, | -device virtio-blk-device, | ||
-device virtio-net-device, | -device virtio-net-device, | ||
- | -netdev user, | + | -netdev user, |
- | -append ' | + | -device qemu-xhci -usb -device usb-kbd -device usb-tablet |
- | -bios none | + | -append ' |
</ | </ | ||
Line 50: | Line 74: | ||
默认的用户名为 '' | 默认的用户名为 '' | ||
+ | |||
+ | 注意,以下都很老了(已经不存在这些问题),仅仅作为存档用途出现在这里。 | ||
===== 软件源 ===== | ===== 软件源 ===== | ||
Line 67: | Line 93: | ||
[repository] | [repository] | ||
name=openEuler-risv-v | name=openEuler-risv-v | ||
- | baseurl=https:// | + | #baseurl=https:// |
+ | baseurl=https:// | ||
gpgcheck=0 | gpgcheck=0 | ||
</ | </ | ||
Line 114: | Line 141: | ||
# ln -sf / | # ln -sf / | ||
</ | </ | ||
+ | |||
+ | ===== Others ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | ==== 公共 CI 机器上编译用户模式的 QEMU ==== | ||
+ | |||
+ | 这里我们可以使用清华源来加快 git clone 的速度,然后转到最新版的分支用于构建: | ||
+ | |||
+ | < | ||
+ | $ git clone https:// | ||
+ | $ cd qemu | ||
+ | $ git checkout stable-6.1 | ||
+ | $ ./configure --target-list=riscv64-softmmu, | ||
+ | $ make | ||
+ | $ make install | ||
+ | </ | ||
+ | |||
+ | 上面的 prefix 可以自己定义位置,如果自定义了位置的话下面的 '' | ||
+ | |||
+ | 在编译成功之后,记得在 '' | ||
+ | |||
+ | <file bashrc .bashrc> | ||
+ | export QEMU_HOME=/ | ||
+ | export PATH=$QEMU_HOME/ | ||
+ | </ | ||
+ | |||
+ | 随后 '' | ||
+ | |||
+ | :!: 公共机器上无需再去 openEuler 官方下载相关文件,Wechat@nil 准备了一份放在了 / | ||
+ | |||
+ | ==== 我的虚拟环境没空间了 ==== | ||
+ | |||
+ | 这我还真在编译 openjdk 的时候遇到了。 | ||
+ | |||
+ | 首先关机,然后使用 '' | ||
+ | |||
+ | 然后使用 '' | ||
+ | |||
+ | 接下来,进入系统并安装 '' | ||
+ | |||
+ | 然后输入 '' |