Skip to content

Commit f9a573d

Browse files
committed
conf/evalsoc: mention about prebuilt kvmtool and guest linux kernel 6.10 + rootfs image added in repo
nuclei qemu require 2025.10 version and customized soc config evalsoc.json see https://doc.nucleisys.com/nuclei_tools/qemu/intro.html#description-of-parameters Signed-off-by: Huaqi Fang <[email protected]>
1 parent d554b54 commit f9a573d

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ See [How to evaluate Nuclei Linux SDK in docker](https://github.com/Nuclei-Softw
2222
- Build dependencies
2323
- packages: see [apt.txt](.github/apt.txt)
2424
- python pip packages: [pipreq.txt](.github/pipreq.txt)
25-
- Get prebuilt qemu and openocd 2025.02 from [Nuclei Development Tools](https://nucleisys.com/download.php#tools)
25+
- Get prebuilt qemu and openocd 2025.10 from [Nuclei Development Tools](https://nucleisys.com/download.php#tools)
2626
- Setup qemu and openocd and add it into **PATH**
2727
- mtools version >= 4.0.24
2828

conf/evalsoc/linux_kvm_hypervisor_user_guide.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
硬件:NUCLEI RISC-V Core with hypervisor extension
66
软件:Linux SDK + kvmtool/qemu 工具
77

8+
> [!NOTE]
9+
> - 本分支支持的是带AIA控制器的EvalSoC, 中断编号相对之前版本发生了变化,没法直接使用default nuclei qemu配置,本仓库提供的 `conf/evalsoc/evalsoc.json` 配合 Nuclei Qemu 2025.10版本即可正常使用
10+
> - 相关的Qemu环境适配工作已经搞定,可以直接使用
11+
812
## 1.编译kvmtool虚拟化应用程序
913

14+
> - 本分支最新代码已经将 预编译好的 `kvmtool` + `Guest Linux Kernel 6.10` + `rootfs.img` 放在了 conf/evalsoc/kvm 目录下
15+
> - 因此如果不想重新编译这些工具,可以直接跳过 1 + 2 步骤,也不需要手动拷贝这些工具了,这个已经做到Makefile里面
16+
> 自动拷贝过去,只需要登录 host linux 内核以后执行 `./kvm/kvm.sh` 或者 `./kvm/qemu.sh` 即可体验, 执行log参见 d554b5406e
17+
1018
kvmtool 是一个轻量级的工具,用于在 Linux 上托管 KVM 客户机,它是一个纯虚拟化工具,仅支持运行相同架构的客户机。
1119
*如果使用``dev_nuclei_6.12_v3_hypervisor_aia``分支跑虚拟化,可以使用linux sdk自带的qemu工具,此步骤可跳过。*
1220

@@ -73,11 +81,15 @@ make SOC=evalsoc CORE=ux900fd bootimages -j4
7381
cd ..
7482
```
7583

76-
将前面编译的lkvm-static,guest linux内核Image 拷贝到rootfs中,重新编译rootfs。
84+
> [!CAUTION]
85+
> **注意**:在linux上使用aia中断控制器时,dts中cpu节点个数要按照实际情况来写,不支持自动探测不存在的core,因为ipi通过msi中断来实现,imsic在core内部,core不存在时,imsic对应的地址我们硬件没有实现,所以软件dts 配置的cpu core数目要小于等于硬件cpu core数目。
86+
87+
将前面编译的``lkvm-static``,guest linux内核``Image`` 拷贝到rootfs中,重新编译rootfs。
7788

7889
*注意:如果使用``dev_nuclei_6.12_v3_hypervisor_aia``分支,则可以使用linux sdk中编译的qemu工具来跑虚拟化,不需要使用lkvm-static*
7990

8091
```shell
92+
# 如果是使用我们仓库里面预编译好的kvm tool和guest linux kernel,下面的命令不需要运行
8193
cp kvmtool/lkvm-static nuclei-linux-sdk/work/evalsoc/buildroot_initramfs_sysroot/usr/bin/
8294
cp linux/arch/riscv/boot/Image nuclei-linux-sdk/work/evalsoc/buildroot_initramfs_sysroot/usr/bin/
8395
cd nuclei-linux-sdk
@@ -1224,4 +1236,4 @@ hart isa : rv64imafdcv_zicbom_zicntr_zicsr_zifencei_zihpm_smstateen_ssaia
12241236
/ # mount -t 9p -o trans=virtio host_share /fromhost
12251237
/ # cd /fromhost/
12261238
1227-
```
1239+
```

0 commit comments

Comments
 (0)