From 4168abe2176dae5e79bcd1e448c52d8358e1aeb9 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Thu, 7 Nov 2024 21:59:38 -0600 Subject: [PATCH] content: Add Prepare openEuler RISC-V section to Kata Add steps to guide the preparation of openEuler RISC-V 24.09 64-bit QEMU VM. Signed-off-by: Ruoqing He --- .../kata-on-openEuler-riscv64.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/cloud-native/kata-containers/kata-on-openEuler-riscv64.md b/src/cloud-native/kata-containers/kata-on-openEuler-riscv64.md index 8eb7fe6..0ab5ef4 100644 --- a/src/cloud-native/kata-containers/kata-on-openEuler-riscv64.md +++ b/src/cloud-native/kata-containers/kata-on-openEuler-riscv64.md @@ -32,3 +32,25 @@ export PATH=$PATH:/opt/qemu/bin . .bashrc ``` + +## Prepare openEuler RISC-V + +```sh +mkdir -p /opt/openEuler +pushd /opt/openEuler + +# Use 24.09 for the time being, you may choose what's latest +wget https://repo.openeuler.org/openEuler-24.09/virtual_machine_img/riscv64/RISCV_VIRT_CODE.fd +wget https://repo.openeuler.org/openEuler-24.09/virtual_machine_img/riscv64/RISCV_VIRT_VARS.fd +wget https://repo.openeuler.org/openEuler-24.09/virtual_machine_img/riscv64/openEuler-24.09-riscv64.qcow2.xz +wget https://repo.openeuler.org/openEuler-24.09/virtual_machine_img/riscv64/start_vm.sh + +# Tune command to work with QEMU greater than v9.0.2 +sed -i 's/-drive file="$drive",format=qcow2,id=hd0 \\/-drive file="$drive",format=qcow2,id=hd0,if=none \\/g' start_vm.sh + +# Extract qcow2 image +unxz openEuler-24.09-riscv64.qcow2.xz + +# Start VM, default account/password is root/openEuler12#$ +bash start_vm.sh +```