openSUSE:RISC-V

跳转至: 导航, 搜索

RISC-V 是由 RISC-V基金会 开发的自由开放的 RISC 指令集架构。

RISC-V 的 openSUSE 映像

openSUSE 支持一些 RISCV64 机器。 由于 RISC-V 支持仍在开发中,您在 RISCV64 的机器上运行 openSUSE 时可能会遇到错误或不稳定的情况。如果您发现任何问题,请向 openSUSE Bugzillamailing list 报告。 有关更多关于此类的信息,请参见 此处

在现实中的硬件上

以下是支持 RISC-V 机器的 openSUSE Tumbleweed 镜像。

Susemini.png
Version:
Tumbleweed Port Images
https://download.opensuse.org/ports/riscv/tumbleweed/images/
Susemini.png
Version:
Tumbleweed ISO Images
https://download.opensuse.org/ports/riscv/tumbleweed/iso/

使用 RISC-V 模拟器

提供的镜像可以在安装 Tumbleweed 的普通 PC 上通过 qemu 用户空间仿真或 qemu 系统仿真使用。

QEMU 用户空间仿真

从 "Port Images" 下载 rootfs。

Susemini.png
Version:
File Example
openSUSE-Tumbleweed-RISC-V-JeOS.riscv64-rootfs.riscv64-<BUILD_DATE>-Build<BUILD_NUMBER>.tar.xz

安装 qemu 和 systemd-machined:

 # zypper in qemu-linux-user systemd-container

将qemu注册为RISC-V二进制文件的处理程序:

 # qemu-binfmt-conf.sh --credential yes

让 systemd-nspawn 不使用私有网络 (见 man 5 systemd.nspawn):

 # mkdir /etc/systemd/nspawn
 # cat > /etc/systemd/nspawn/riscv.nspawn << EOF
 [Network]
 Private=off
 [Exec]
 PrivateUsers=off
 EOF

下载一个 RISC-V 容器并在 machined 中注册:

 # machinectl pull-tar --verify=no \
   http://download.opensuse.org/ports/riscv/tumbleweed/images/openSUSE-Tumbleweed-RISC-V-JeOS-devel.riscv64-rootfs.riscv64.tar.xz \
   riscv

注意:如果上面没有,或者您需要不同的镜像,请浏览该部分中列出的镜像目录 #在现实中的硬件上

启动容器:

 # machinectl start riscv

进入shell:

 # machinectl shell riscv

祝玩得开心...

QEMU 系统仿真

从 "Port Images" 链接下载 efi 镜像。

Susemini.png
Version:
File Example
openSUSE-Tumbleweed-RISC-V-JeOS-efi.riscv64-<BUILD_DATE>-Build<BUILD_NUMBER>.raw.xz

安装 qemu-extra:

 # zypper in qemu-extra guestfs-tools

将 raw 转换成 qcow2:

 # qemu-img convert -f raw -O qcow2 -c openSUSE-Tumbleweed-RISC-V-JeOS-efi.riscv64.raw openSUSE-Tumbleweed-RISC-V-JeOS-efi.riscv64.qcow2

提取镜像中的 /boot:

 # virt-copy-out -a openSUSE-Tumbleweed-RISC-V-JeOS-efi.riscv64.qcow2 /boot .

运行 qemu:

 # qemu-system-riscv64 -nographic -machine virt -m 4G \
   -device virtio-blk-device,drive=hd0 -drive file=${qcow2image},format=qcow2,id=hd0 \
   -device virtio-net-device,netdev=usernet -netdev user,id=usernet,hostfwd=tcp::22222-:22 \
   -kernel boot/u-boot.bin

通过 ssh 登录:

  # ssh localhost -p 22222   # root / linux