cd ~
mkdir cache
cd ~/cache
wget -c https://download.qemu.org/qemu-9.0.0.tar.xz
tar -xvf qemu-9.0.0.tar.xz
mkdir ~/path
mkdir ~/cache/qemu-9.0.0-build
cd ~/cache/qemu-9.0.0-build
../qemu-9.0.0/configure --target-list=riscv64-softmmu,riscv64-linux-user --prefix=/home/$(whoami)/path
make -j $(nproc)
make install
export PATH="/home/$(whoami)/path/bin:$PATH"
mkdir ~/oerv_qemu
cd ~/oerv_qemu
wget https://repo.openeuler.org/openEuler-24.03-LTS/virtual_machine_img/riscv64/RISCV_VIRT_CODE.fd
wget https://repo.openeuler.org/openEuler-24.03-LTS/virtual_machine_img/riscv64/RISCV_VIRT_VARS.fd
wget https://repo.openeuler.org/openEuler-24.03-LTS/virtual_machine_img/riscv64/fw_dynamic_oe_2403_penglai.bin
wget https://repo.openeuler.org/openEuler-24.03-LTS/virtual_machine_img/riscv64/openEuler-24.03-LTS-riscv64.qcow2.xz
xz -d openEuler-24.03-LTS-riscv64.qcow2.xz
# 下载完成后,可以按需修改start_vm.sh文件中的参数
wget https://repo.openeuler.org/openEuler-24.03-LTS/virtual_machine_img/riscv64/start_vm.sh
chmod +x start_vm.sh
./start_vm.sh
# root用户密码默认为openEuler12#$
ssh -p 12055 root@localhost