https://en.altlinux.org/api.php?action=feedcontributions&user=Jqt4&feedformat=atomALT Linux Wiki - User contributions [en]2024-03-28T17:11:36ZUser contributionsMediaWiki 1.38.2https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=2101Ports/riscv64/QEMU2022-01-21T17:05:25Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
This page describes how to start riscv64 virtual machine via [https://www.qemu.org QEMU].<br />
<br />
QEMU, starting with version 6.0, includes OpenSBI firmware. For older QEMU versions, there are instructions how to obtain and use the firmware in [[#OpenSBI]] section below.<br />
<br />
Some ALT images for riscv64 include a VNC server that provides access to initial setup and graphical desktop (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900 from the virtual machine to the host machine. The parameters necessary for that are included into QEMU command lines below.<br />
<br />
== QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-tablet) working using U-boot boot loader.<br />
<br />
Here are the steps run images in QEMU:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support to run the ALT port on RISC-V. If your host system is running ALT x86_64, you need [https://packages.altlinux.org/en/sisyphus/srpms/qemu/ qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core qemu-device-display-virtio-gpu-gl qemu-ui-sdl seavgabios<br />
<br />
'''Step 1''': Download the recent version of <code>u-boot-qemu</code> for riscv64. You can use [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/ the link to the package on the official website of the Sisyphus repository]. Or find the package directly in the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ repository].<br />
<br />
Extract '''/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin''' file from the downloaded package. For example:<br />
<br />
rpm2cpio u-boot-qemu-*.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
'''Step 2''': Now you can start a virtual machine on QEMU via the following commands. Give directions in IMAGE to image and in UBOOT to u-boot that you got in step 1:<br />
<br />
<source lang="shell"><br />
$ IMAGE=/path/to/<image><br />
$ UBOOT=/path/to/u-boot.bin<br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-vga-gl,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -display sdl,gl=on<br />
</source><br />
<br />
If you need access via vnc, then you need to specify "-vnc: 1" instead of "-sdl" and connect to 5901 port (5900 port is taken for network forwarding):<br />
<br />
<source lang="shell"><br />
$ vncviewer localhost:5901<br />
</source><br />
<br />
== OpenSBI ==<br />
<br />
To run riscv64 virtual machine on older (pre-6.0) QEMU, you need OpenSBI (firmware) binary.<br />
<br />
Download the recent version of <code>opensbi</code>.<br />
You can use [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/opensbi/rpms/ the link to the package on the official website of the Sisyphus repository]. Or find the package directly in the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/riscv64/RPMS.classic/ repository].<br />
<br />
Extract '''/usr/share/opensbi/generic/firmware/fw_jump.elf''' file from the downloaded package. For example:<br />
<br />
rpm2cpio opensbi-*.rpm | cpio -vi --to-stdout './usr/share/opensbi/generic/firmware/fw_jump.elf' > fw_jump.elf<br />
<br />
Now you can start a virtual machine on QEMU via the following commands. Give directions in IMAGE to image, in UBOOT to u-boot, that you got in step 1, and in FIRM to fw_jump.elf.<br />
<br />
<source lang="shell"><br />
$ IMAGE=/path/to/<image><br />
$ UBOOT=/path/to/u-boot.bin<br />
$ FIRM=/path/to/fw_jump.elf<br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt \<br />
-bios "$FIRM" \<br />
-kernel "$UBOOT" \<br />
-m 2G -smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0,format=raw -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source><br />
<br />
If you need a graphical interface, run the VNC server in the image, for example, as described in [[Regular/riscv64#VNC]].<br />
<br />
Connect to VNC, for example:<br />
<br />
vncviewer localhost<br />
<br />
[[Category:RISC-V]]<br />
[[ru:Ports/riscv64/QEMU]]</div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=2100Ports/riscv64/QEMU2022-01-21T17:01:33Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
This page describes how to start riscv64 virtual machine via [https://www.qemu.org QEMU].<br />
<br />
QEMU, starting with version 6.0, includes OpenSBI firmware. For older QEMU versions, there are instructions how to obtain and use the firmware in [[#OpenSBI]] section below.<br />
<br />
Some older ALT images for QEMU include a VNC server that provides access to initial setup and graphical desktop (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900 from the virtual machine to the host machine. The parameters necessary for that are included into QEMU command lines below.<br />
<br />
== QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-tablet) working using U-boot boot loader.<br />
<br />
Here are the steps run images in QEMU:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support to run the ALT port on RISC-V. If your host system is running ALT x86_64, you need [https://packages.altlinux.org/en/sisyphus/srpms/qemu/ qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core qemu-device-display-virtio-gpu-gl qemu-ui-sdl seavgabios<br />
<br />
'''Step 1''': Download the recent version of <code>u-boot-qemu</code> for riscv64. You can use [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/ the link to the package on the official website of the Sisyphus repository]. Or find the package directly in the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ repository].<br />
<br />
Extract '''/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin''' file from the downloaded package. For example:<br />
<br />
rpm2cpio u-boot-qemu-*.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
'''Step 2''': Now you can start a virtual machine on QEMU via the following commands. Give directions in IMAGE to image and in UBOOT to u-boot that you got in step 1:<br />
<br />
<source lang="shell"><br />
$ IMAGE=/path/to/<image><br />
$ UBOOT=/path/to/u-boot.bin<br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-vga-gl,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -display sdl,gl=on<br />
</source><br />
<br />
If you need access via vnc, then you need to specify "-vnc: 1" instead of "-sdl" and connect to 5901 port (5900 port is taken for network forwarding):<br />
<br />
<source lang="shell"><br />
$ vncviewer localhost:5901<br />
</source><br />
<br />
== OpenSBI ==<br />
<br />
To run riscv64 virtual machine on older (pre-6.0) QEMU, you need OpenSBI (firmware) binary.<br />
<br />
Download the recent version of <code>opensbi</code>.<br />
You can use [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/opensbi/rpms/ the link to the package on the official website of the Sisyphus repository]. Or find the package directly in the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/riscv64/RPMS.classic/ repository].<br />
<br />
Extract '''/usr/share/opensbi/generic/firmware/fw_jump.elf''' file from the downloaded package. For example:<br />
<br />
rpm2cpio opensbi-*.rpm | cpio -vi --to-stdout './usr/share/opensbi/generic/firmware/fw_jump.elf' > fw_jump.elf<br />
<br />
Now you can start a virtual machine on QEMU via the following commands. Give directions in IMAGE to image, in UBOOT to u-boot, that you got in step 1, and in FIRM to fw_jump.elf.<br />
<br />
<source lang="shell"><br />
$ IMAGE=/path/to/<image><br />
$ UBOOT=/path/to/u-boot.bin<br />
$ FIRM=/path/to/fw_jump.elf<br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt \<br />
-bios "$FIRM" \<br />
-kernel "$UBOOT" \<br />
-m 2G -smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0,format=raw -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source><br />
<br />
If you need a graphical interface, run the VNC server in the image, for example, as described in [[Regular/riscv64#VNC]].<br />
<br />
Connect to VNC, for example:<br />
<br />
vncviewer localhost<br />
<br />
[[Category:RISC-V]]<br />
[[ru:Ports/riscv64/QEMU]]</div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=2099Ports/riscv64/QEMU2022-01-21T16:41:24Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
This page describes how to start riscv64 virtual machine via [https://www.qemu.org QEMU].<br />
<br />
QEMU, starting with version 6.0, includes OpenSBI firmware. For older QEMU versions, there are instructions how to obtain and use the firmware in [[#OpenSBI]] section below.<br />
<br />
Some older ALT images for QEMU include a VNC server that provides access to initial setup and graphical desktop (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900 from the virtual machine to the host machine. The parameters necessary for that are included into QEMU command lines below.<br />
<br />
== QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-tablet) working using U-boot boot loader.<br />
<br />
Here are the steps run images in QEMU:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support to run the ALT port on RISC-V. If your host system is running ALT x86_64, you need [https://packages.altlinux.org/en/sisyphus/srpms/qemu/ qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core qemu-device-display-virtio-gpu-gl qemu-ui-sdl seavgabios<br />
<br />
'''Step 1''': Download the recent version of <code>u-boot-qemu</code> for riscv64. You can use [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/ the link to the package on the official website of the Sisyphus repository]. Or find the package directly in the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ repository].<br />
<br />
Extract '''/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin''' file from the downloaded package. For example:<br />
<br />
rpm2cpio u-boot-qemu-*.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
'''Step 2''': Now you can start a virtual machine on QEMU via the following commands. Give directions in IMAGE to image and in UBOOT to u-boot that you got in step 1:<br />
<br />
<source lang="shell"><br />
$ IMAGE=<путь до образа><br />
$ UBOOT=<путь до u-boot.bin><br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-vga-gl,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -display sdl,gl=on<br />
</source><br />
<br />
If you need access via vnc, then you need to specify "-vnc: 1" instead of "-sdl" and connect to 5901 port (5900 port is taken for network forwarding):<br />
<br />
<source lang="shell"><br />
$ vncviewer localhost:5901<br />
</source><br />
<br />
== OpenSBI ==<br />
<br />
To run riscv64 virtual machine on older (pre-6.0) QEMU, you need OpenSBI (firmware) binary.<br />
<br />
Download the recent version of <code>opensbi</code>.<br />
You can use [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/opensbi/rpms/ the link to the package on the official website of the Sisyphus repository]. Or find the package directly in the [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ repository].<br />
<br />
Extract '''/usr/share/opensbi/generic/firmware/fw_jump.elf''' file from the downloaded package. For example:<br />
<br />
rpm2cpio opensbi-*.rpm | cpio -vi --to-stdout './usr/share/opensbi/generic/firmware/fw_jump.elf' > fw_jump.elf<br />
<br />
Now you can start a virtual machine on QEMU via the following commands. Give directions in IMAGE to image, in UBOOT to u-boot, that you got in step 1, and in FIRM to fw_jump.elf.<br />
<br />
<source lang="shell"><br />
$ IMAGE=<путь до образа><br />
$ UBOOT=<путь до u-boot.bin><br />
$ FIRM=<путь до fw_jump.elf><br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt \<br />
-bios "$FIRM" \<br />
-kernel "$UBOOT" \<br />
-m 2G -smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0,format=raw -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source><br />
<br />
If you need a graphical interface, run the VNC server in the image, for example, as described in [[Regular/riscv64#VNC]].<br />
<br />
Connect to VNC, for example:<br />
<br />
vncviewer localhost<br />
<br />
[[Category:RISC-V]]<br />
[[ru:Ports/riscv64/QEMU]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unmatched&diff=2096HiFive Unmatched2022-01-21T10:37:55Z<p>Jqt4: </p>
<hr />
<div>{{Stub}}<br />
<br />
[https://www.sifive.com/boards/hifive-unmatched HiFive Unmatched] from [https://www.sifive.com SiFive] is a Mini-ITX board powered by SiFive Freedom U740 SoC. It is supported by [[Ports/riscv64|Sisyphus riscv64 port]]. HiFive Umatched boards are used as build nodes for this port.<br />
<br />
The board is supported by un-def distribution kernel since 5.12.18-alt1.rv64 and u-boot since 2021.07-alt1.<br />
<br />
== ALT Images ==<br />
<br />
HiFive Unmatched is supported by weekly regular builds: [[Regular/riscv64]]. <br />
<br />
Images can be written via alt-rootfs-installer or manually.<br />
<br />
Graphical images (e.g. Xfce, MATE) are designed to work with a video card by default. If there is no video card, you can access the graphics via VNC: [[ Regular/riscv64#VNC ]].<br />
<br />
=== Write-in with alt-rootfs-installer ===<br />
<br />
HiFive Unmatched target is supported by alt-roofs-installer 0.5.2 or newer.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unmatched --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
You can add <tt>--vnc=1</tt> parameter here to enable the VNC server (e.g. if you don't have a video card installed). See [[ Regular/riscv64#VNC ]].<br />
<br />
== Installing images manually ==<br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root$ xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root$ udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for U-Boot SPL (Secondary Program Loader) and U-Boot :<br />
<br />
<source lang="shell"><br />
root$ sgdisk -a 1 \<br />
--new=3:34:2081 --change-name=3:'spl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4:2082:10273 --change-name=4:'uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' U-Boot SPL (Secondary Program Loader) and U-Boot binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download the latest version of the package u-boot-sifive. You can use the link from https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/.<br />
<br />
Extract files u-boot-spl.bin and u-boot.itb from the package and write them into partitions 2 и 3, respectively:<br />
<br />
<source lang="shell"><br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot-spl.bin' > u-boot-spl.bin<br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot.itb' > u-boot.itb<br />
root$ dd if=u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<source lang="shell"><br />
root$ parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root on NVME ===<br />
<br />
The file system can be copied to NVME and used as system root. For that, you can do the following.<br />
<br />
'''Create a partition on NVME using fdisk.''' For example. <br />
<br />
'''Format the partition''':<br />
<br />
mkfs.ext4 -m1 -L ROOT /dev/nvme0n1p1<br />
<br />
'''Mount the partition''':<br />
<br />
mount /dev/nvme0n1p1 /mnt<br />
<br />
'''Copy rootfs content to the NVME partition''':<br />
<br />
rsync -ax / /mnt<br />
<br />
The -x option allows to copy rootfs content only, and ignore other mounted file systems.<br />
Copying can take a long time.<br />
<br />
Have a look at UUID of NVME partition, for example, this way:<br />
<br />
lsblk -f<br />
NAME FSTYPE LABEL UUID ...<br />
...<br />
└─nvme0n1p1 ext4 1.0 ROOT dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Put this UUID value into <tt>/mnt/boot/extlinux/extlinux.conf</tt>:<br />
<br />
append root=UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Also, update the root partition UUID in <tt>/mnt/etc/fstab</tt>:<br />
<br />
UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 / ext4 ...<br />
<br />
=== EFI on NVME ===<br />
<br />
TBD.<br />
<br />
=== Grub ===<br />
<br />
TBD.<br />
<br />
<br />
[[ru:HiFive Unmatched]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unmatched&diff=2095HiFive Unmatched2022-01-21T10:28:02Z<p>Jqt4: </p>
<hr />
<div>{{Stub}}<br />
<br />
[https://www.sifive.com/boards/hifive-unmatched HiFive Unmatched] from [https://www.sifive.com SiFive] is a Mini-ITX board powered by SiFive Freedom U740 SoC. It is supported by [[Ports/riscv64|Sisyphus riscv64 port]]. HiFive Umatched boards are used as build nodes for this port.<br />
<br />
The board is supported by un-def distribution kernel since 5.12.18-alt1.rv64 and u-boot since 2021.07-alt1.<br />
<br />
== ALT Images ==<br />
<br />
HiFive Unmatched is supported by weekly regular builds: [[Regular/riscv64]]. <br />
<br />
Images can be written via alt-rootfs-installer or manually.<br />
<br />
Graphical images (e.g. Xfce, MATE) are designed to work with a video card by default. If there is no video card, you can access the graphics via VNC: [[ Regular/riscv64#VNC ]].<br />
<br />
=== Write-in with alt-rootfs-installer ===<br />
<br />
HiFive Unmatched target is supported by alt-roofs-installer 0.5.2 or newer.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unmatched --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
You can add <tt>--vnc=1</tt> parameter here to enable the VNC server (e.g. if you don't have a video card installed). See [[ Regular/riscv64#VNC ]].<br />
<br />
== Installing images manually ==<br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root$ xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root$ udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for U-Boot SPL (Secondary Program Loader) and U-Boot :<br />
<br />
<source lang="shell"><br />
root$ sgdisk -a 1 \<br />
--new=3:34:2081 --change-name=3:'spl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4:2082:10273 --change-name=4:'uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' U-Boot SPL (Secondary Program Loader) and U-Boot binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download the latest version of the package u-boot-sifive. You can use the link from https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/.<br />
<br />
Extract files u-boot-spl.bin and u-boot.itb from the package and write them into partitions 2 и 3, respectively:<br />
<br />
<source lang="shell"><br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot-spl.bin' > u-boot-spl.bin<br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot.itb' > u-boot.itb<br />
root$ dd if=u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<source lang="shell"><br />
root$ parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root on NVME ===<br />
<br />
The file system can be copied to NVME and and used as system root. For that, you can do the following.<br />
<br />
'''Create a partition on NVME using fdisk.''' For example. <br />
<br />
'''Format the partition''':<br />
<br />
mkfs.ext4 -m1 -L ROOT /dev/nvme0n1p1<br />
<br />
'''Mount the partition''':<br />
<br />
mount /dev/nvme0n1p1 /mnt<br />
<br />
'''Copy rootfs content to the NVME partition''':<br />
<br />
rsync -ax / /mnt<br />
<br />
The -x option allows to copy rootfs content only, and ignore other mounted file systems.<br />
Copying can take a long time.<br />
<br />
Have a look at UUID of NVME partition, for example, this way:<br />
<br />
lsblk -f<br />
NAME FSTYPE LABEL UUID ...<br />
...<br />
└─nvme0n1p1 ext4 1.0 ROOT dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Put this UUID value into <tt>/mnt/boot/extlinux/extlinux.conf</tt>:<br />
<br />
append root=UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Also, update the root partition UUID in <tt>/mnt/etc/fstab</tt>:<br />
<br />
UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 / ext4 ...<br />
<br />
=== EFI on NVME ===<br />
<br />
TBD.<br />
<br />
=== Grub ===<br />
<br />
TBD.<br />
<br />
<br />
[[ru:HiFive Unmatched]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unleashed&diff=2094HiFive Unleashed2022-01-21T09:47:20Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
[https://www.sifive.com SiFive] [https://www.sifive.com/boards/hifive-unleashed HiFive Unleashed] is a RISC‑V development board featuring the Freedom U540 SoC. Its production is discontinued, but it's still supported by [[Ports/riscv64|Sisyphus riscv64 port]].<br />
<br />
[[Regular/riscv64|Regular Images]] and [[Simply Linux 10]] were released for this board.<br />
<br />
== Quick start ==<br />
<br />
TBD.<br />
<br />
== Setup with alt-rootfs-installer ==<br />
<br />
Regular images starting from 20220120 cannot be written with the following command because they use U-Boot 2022.01. You can use the version of alt-rootfs-installer from the branch [https://git.altlinux.org/people/antohami/packages/alt-rootfs-installer.git?p=alt-rootfs-installer.git;a=shortlog;h=refs/heads/devel devel] by specifying <code>--target=sifive_unleashed</code>, or install manually. <br />
<br />
You need alt-roofs-installer version 0.5.2 or higher.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unleashed-opensbi --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
== Manual setup ==<br />
<br />
Starting with U-Boot 2022.01, a U-Boot SPL for Unleashed has been made (file <code>/usr/share/u-boot/sifive_unleashed/u-boot-spl.bin</code>), which is recommended to be used instead of FSBL.<br />
<br />
When using this U-Boot, installing an image for Unleashed is similar to Unmatched and can be done as described in [[HiFive_Unmatched#Installing_images_manually]].<br />
<br />
All references to the <code>usr/share/u-boot/sifive_unmatched</code> directory should be replaced with <code>usr/share/u-boot/sifive_unleashed</code>. <br />
<br />
=== Disk image ===<br />
<br />
To run images on SiFive HiFive Unleashed (FU540) SoC, follow these steps: <br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root# xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root# udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for First Stage BootLoader (FSBL) and U-Boot :<br />
<br />
<source lang="shell"><br />
root# sgdisk -a 1 \<br />
--new=3::+32K --change-name=3:'fsbl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4::+8M: --change-name=4:'opensbi-uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' First Stage BootLoader (FSBL) and OpenSBI binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root# dd if=/run/media/root/<UUID>/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/run/media/root/<UUID>/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download and install packages with FSBL and OpenSBI, then write down in partitions 3 and 4. For example, like this: <br />
<br />
<source lang="shell"><br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<br />
<source lang="shell"><br />
root# parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root filesystem image ===<br />
<br />
To run the SiFive HiFive Unleashed (FU540) SoC with one of the rootfs images one could proceed through the following steps:<br />
<br />
'''Step 0.''' Through this manual it is assumed that microSD card is at /dev/sdb. Let us create file systems at the microSD:<br />
<br />
<source lang="shell"><br />
root$ sgdisk -g --clear \<br />
--new=2::+32K --change-name=2:'fsbl' --typecode=2:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=3::+8M: --change-name=3:'opensbi-uboot' --typecode=3:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
--new=1::-0 --change-name=1:'root' --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \<br />
/dev/sdb<br />
root$ mkfs.ext4 /dev/sdb1<br />
root$ mount /dev/sdb1 /mnt<br />
root$ tar -xpvf hifive-unleashed-riscv64.tar.xz -C /mnt<br />
</source><br />
<br />
'''Step 1.a.''' The First Stage BootLoader (FSBL) and OpenSBI are placed inside the unpacked /mnt tree.<br />
Let us write them to the 2 and 3 partitions respectively, and then unmount /mnt partition.<br />
<br />
<source lang="shell"><br />
root$ dd if=/mnt/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/mnt/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 1.b.''' Alternative option: [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ download]<br />
and install the First Stage BootLoader (FSBL) and OpenSBI for FU540.<br />
<br />
For example:<br />
<br />
<source lang="shell"><br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 3.''' System at microSD is ready to boot. For a graphical system, the system setup is performed through [[Regular/riscv64#VNC|VNC]].<br />
<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=Simply_Linux_10&diff=2093Simply Linux 102022-01-20T16:09:06Z<p>Jqt4: </p>
<hr />
<div>{{Stub}}<br />
<br />
{| style="border:1px solid #AAA; background:#F9F9F9; margin: 0 0 1em 1em; padding:.2em; text-align:center; float: right;" class=noprint<br />
|[[Download]]<br />
|<!--[[Файл:Download.png|link=http://getalt.org/ru/simply/]]--><br />
|-<br />
|'''[https://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/x86_64/slinux-10.0-x86_64.iso x86_64]''' <small>(~5&nbsp;Гб)</small><br />
|-<br />
|[https://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/i586/slinux-10.0-i586.iso i586] <small>(~4.5&nbsp;Гб)</small><br />
|-<br />
|[https://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-10.0-aarch64.img.xz RPi 3] <small>[https://www.altlinux.org/Write/rootfs#%D0%97%D0%B0%D0%BF%D0%B8%D1%81%D1%8C_%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D0%B0_img_%D0%BD%D0%B0_SD-%D0%BA%D0%B0%D1%80%D1%82%D1%83 instruction (in Russian)]</small><br />
|-<br />
|[https://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-10.0-rpi4-aarch64.img.xz RPi 4] <small>[https://www.altlinux.org/Write/rootfs#%D0%97%D0%B0%D0%BF%D0%B8%D1%81%D1%8C_%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D0%B0_img_%D0%BD%D0%B0_SD-%D0%BA%D0%B0%D1%80%D1%82%D1%83 instruction (in Russian)]</small><br />
|-<br />
|[[elbrus/distributions|e2k, e2kv4, e2kv5]] <small>(available upon request)</small><br />
|-<br />
|'''[http://ftp.altlinux.org/pub/distributions/ALTLinux/p10/images/simply/ ftp.altlinux.org]'''<br />
|-<br />
|[http://http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/license.en.html license]<br />
|-<br />
|}<br />
<br />
== Simply Linux ==<br />
<br />
'''Simply Linux''' — Simply Linux is a Tenth Platform based distribution produced by BaseALT Ltd.<br />
<br />
== Features == <br />
<br />
Simply Linux is easy to install and user-friendly operating system that enables users to perform all of their day-to-day tasks without fearing viruses or wasting their time searching the Internet or stores for all the necessary software. Simply Linux is the operating system for everyone. It is easy to use, lightweight, functional and reliable. <br />
<br />
Simply Linux project is the Linux OS adapted for the user. The project's idea is to interest the user with Free Software by showing the comfort and convenience of working with it.<br />
<br />
The software suite includes more than 30 application software packages for most user needs as well as wide range of device drivers making peripherals use easier.<br />
<br />
You can find license terms for the distribution [http://http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/license.en.html here].<br />
<br />
=== Supported hardware ===<br />
Simply Linux 10 is released for the following hardware platforms:<br />
* [https://en.wikipedia.org/wiki/X86 x86] — 32-bit Intel and AMD processors;<br />
* [https://en.wikipedia.org/wiki/X86-64 x86_64] — 64-bit Intel and AMD processors;<br />
* [https://en.wikipedia.org/wiki/ARM_architecture aarch64] — 64-bit ARMv8-compatible processors;<br />
* [https://en.wikipedia.org/wiki/Elbrus_2000 e2k*] — 64-bit Elbrus processors<ref> [[https://www.altlinux.org/Эльбрус/архитектура|Elbrus e2k third to fifth]] (from 4С to 8СВ)</ref>; availability [[#Get images Simply Linux 10 for Elbrus|see below]].<br />
* [https://en.wikipedia.org/wiki/RISC-V riscv64] — 64-bit RISC-V processors.<br />
<br />
== Support ==<br />
<br />
<div style="border-left:3px solid #2590B7;border-right:3px solid #2590B7;padding:7px;margin-top: 7px;margin-bottom: 7px;background-color:#E0EEF3;">Simply Linux 10.0 distribution will be supported with security updates till (if not specified otherwise within provisioning terms):<br />
* '''December 31, 2024''' but not before half a year after new version release (11.0).</div><br />
<br />
=== Software versions as of release day ===<br />
==== 10.0 ====<br />
* Xfce 4.16 desktop environment<br />
* Linux kernel 5.10.88<br />
* LibreOffice 7.1.8.1 ("still")<br />
* Chromium 96 web browser<br />
* WINE 6.14.1 Win32 compatibility layer (x86 only)<br />
* GIMP 2.10.28 raster graphics editor<br />
* Inkscape 1.1 vector graphics editor<br />
* Systemd 249.7<br />
* Xorg 1.20.13<br />
* NetworkManager 1.32.12<br />
* Thunderbird 91.4.1<br />
* Audacious 4.1<br />
* Pidgin 2.14.3<br />
* VLC 3.0.16<br />
<br />
== Release date ==<br />
<br />
'''December 30, 2021'''<br />
<br />
== Download ==<br />
These ISO images are hybrid, i.e. suitable for writing onto both DVD media and USB Flash sticks.<br />
Use dd utility to [[write]] an image onto a USB thumbdrive (the whole device, not a partition; e.g. '''/dev/sdb''' and not /dev/sdb1).<br />
<br />
{{Attention|UNetbootin and UltraISO spoil the image instead of just writing it onto a flash drive, thus '''not recommended'''.}}<br />
'''System requirements'''<br />
{|class="standard"<br />
|-<br />
!Distribution<br />
!Minimal RAM size<br />
!Recommended RAM size<br />
!Hard disk space<br />
|-<br />
|Simply Linux 10||1 ГБ|| 2+ ГБ|| 30+ ГБ<br />
|-<br />
|Simply Linux live 10||1 ГБ|| 2+ ГБ|| 20+ ГБ<br />
|}<br />
<br />
Image flavours:<br />
* multiboot image with Install, Live and Rescue modes;<br />
* live image (installation possible either).<br />
<!--<br />
Official [https://torrent.altlinux.org/ torrent tracker].<br />
--><br />
<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/x8664/slinux-10.0-x8664.iso<br />
|name=slinux-10.0 (x86_64)<br />
|size=5,1<br />
|md5sum=c1ece143e4d436b1fc836dd8224187a8<br />
|filelist=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/x8664/slinux-10.0-x8664.iso.txt<br />
}}<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/x8664/slinux-live-10.0-x8664.iso<br />
|name=slinux-live-10.0 (x86_64)<br />
|size=1,8<br />
|md5sum=9e542614f5a469650ca3d11eadeda12f<br />
}}<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/i586/slinux-10.0-i586.iso<br />
|name=slinux-10.0 (i586)<br />
|size=4,5<br />
|md5sum=b61e3086aa5c495b9b2a02c0d6986af0<br />
|filelist=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/586/slinux-10.0-i586.iso.txt<br />
}}<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/i586/slinux-live-10.0-i586.iso<br />
|name=slinux-live-10.0 (i586)<br />
|size=1,7<br />
|md5sum=cd3387d24e1744bdc4c2cfa9b5ef370c<br />
}}<br />
<br />
Images for aarch64 are also supported by Baikal-M.<br />
<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-10.0-aarch64.iso<br />
|name=slinux-10.0 (aarch64)<br />
|size=3,7<br />
|md5sum=e7777fcc75872f1c1af754aafeca90be<br />
|filelist=http://ftp.altlinux.org/pub/distributions/ALTLinux/p10/images/workstation/aarch64/slinux-10.0-aarch64.iso.txt<br />
}}<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-live-10.0-aarch64.iso<br />
|name=slinux-live-10.0 (aarch64)<br />
|size=1,6<br />
|md5sum=d7e2dd6e0cf31ac8c43bd1c82e40c3e0<br />
}}<br />
<!--<br />
== Download filesystem images ==<br />
<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-9.1-aarch64.tar.xz<br />
|name=slinux-9.1 для Raspberry Pi 3 и других ARMv8<br />
|size=1,1<br />
|md5sum=10e6b08d8c84a492d900d2d434e05b00<br />
}}<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-tegra-9.1-aarch64.tar.xz<br />
|name=slinux-tegra-9.1 для Nvidia Jetson Nano<br />
|size=1,3<br />
|md5sum=1a7676030e6a237375e1e4154cea41ef<br />
}}<br />
Записать образ файловой системы можно по [[https://www.altlinux.org/write/rootfs|этой инструкции]].<br />
--><br />
== Download filesystem image ==<br />
<br />
{{Note|SD card image is preferred for installation on Raspberry Pi 4. File system image published for informational purposes only.}}<br />
{{ISO<br />
|iso=http://ftp.altlinux.org/pub/distributions/ALTLinux/p10/images/simply/aarch64/slinux-10.0-rpi4-aarch64.tar.xz<br />
|name=Simply Linux 10 for Raspberry Pi 4 and Raspberry Pi 3<br />
|size=1,3<br />
|md5sum=ba2f84ebf087d22489ce8c2f0747af27<br />
}}<br />
<br />
A filesystem image can be written for Raspberry Pi 4 following [https://www.altlinux.org/Write/rootfs#Raspberry_Pi_4 this guide] (in Russian).<br />
<br />
== Download SD card images ==<br />
<br />
{{ISO<br />
|iso=http://distrib-coffee.ipsl.jussieu.fr/pub/linux/altlinux/p10/images/simply/aarch64/slinux-10.0-aarch64.img.xz<br />
|name=Simply Linux 10 for Raspberry Pi 3 and other ARMv8<br />
|size=1,3<br />
|md5sum=f41d00543865ec40ab68a03d3f724136<br />
}}<br />
{{ISO<br />
|iso=http://ftp.altlinux.org/pub/distributions/ALTLinux/p10/images/simply/aarch64/slinux-10.0-rpi4-aarch64.img.xz<br />
|name=Simply Linux 10 for Raspberry Pi 4 and Raspberry Pi 3<br />
|size=1,3<br />
|md5sum=2874a1c4501994662035a31784d4e7ea<br />
}}<br />
An SD card image can be written onto media following [https://www.altlinux.org/Write/rootfs#%D0%97%D0%B0%D0%BF%D0%B8%D1%81%D1%8C_%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D0%B0_img_%D0%BD%D0%B0_SD-%D0%BA%D0%B0%D1%80%D1%82%D1%83 this guide] (in Russian).<br />
<br />
<br />
{{ISO<br />
|iso=http://ftp.altlinux.org/pub/distributions/ALTLinux/p10/images/simply/riscv64/slinux-10.0-riscv64.img.xz<br />
|name=Simply Linux 10 for HiFive Unleashed, Unmatched and QEMU riscv64<br />
|size=0,9<br />
|md5sum=8122232c013554e7c866a3be53c7b0f7<br />
}}<br />
Write in instructions are on the boards dedicated pages and QEMU: [[HiFive Unmatched]], [[HiFive Unleashed]], [[Ports/riscv64/QEMU|QEMU]].<br />
<br />
Before running in QEMU the img.xz image should be unpacked into img.<br />
<br />
<!--<br />
== Download image QEMU for RISC-V ==<br />
<br />
{{ISO<br />
|iso=https://mirror.yandex.ru/altlinux/p9/images/simply/riscv/slinux-qemu-9.1-riscv64.qcow2c<br />
|name=Simply Linux 10 для RISC-V<br />
|size=1,1<br />
|md5sum=5ffede5df4d092a7c1f36fdf24e1e656<br />
}}<br />
--><br />
<br />
== Get images Simply Linux 10 for Elbrus ==<br />
<br />
Simply Linux 10 distribution kit for [[Elbrus]] is available upon [http://basealt.ru/about/contacts/ written request] of the equipment holders.<br />
<br />
Workstations supported "[http://www.ineum.ru/elbrus_401-pc Elbrus 401-РС]" ([[elbrus/architechture|e2k]]), "[http://www.ineum.ru/elbrus_801-pc Elbrus 801-РС]" ([[elbrus/architechture|e2kv4]]) и "Elbrus 901-РС" ([[elbrus/architechture|e2kv5]]), including [[elbrus/gorunuch|multi seat variants]]<!--; experimental support available "[http://www.ineum.ru/elbrus_101-pc Elbrus 101-РС]" (more work is required with the 3D-accelerator) и "Elbrus 201-РС" (e2kv6) -->. Work on a system with a processor "[[Elbrus-16С]]" (v6) checked.<br />
<br />
Images are intended [[write|to be written to a flash drive]] using the script contained in them {{cmd | write.sh}}; also note [[https://www.altlinux.org/эльбрус/загрузчик|the selection order of boot media]] (in Russian).<br />
<br />
The distribution kit is based on the Linux kernel 5.4.163.<br />
<br />
== Screenshots ==<br />
<br />
<gallery perrow="4"><br />
Image:SL10_Desktop.png|Simply Linux 10, Desktop<br />
Image:SL10_Menu.png|Simply Linux 10, Menu<br />
Image:SL10_Apps.png|Simply Linux 10, Application<br />
</gallery><br />
<br />
== See also ==<br />
<br />
* Previous version [[Simply_Linux_9|Simply Linux 9]]<br />
<br />
{{Category navigation|title=Platform Ten|category=PlatformTen|sortkey={{SUBPAGENAME}}}}<br />
{{Category navigation|title=Distribution|category=Distribution|sortkey={{SUBPAGENAME}}}}<br />
<br />
[[Category:PlatformTen]]<br />
[[Category:Releases]]<br />
[[ru:Simply Linux 10]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unleashed&diff=2092HiFive Unleashed2022-01-20T15:57:27Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
[https://www.sifive.com SiFive] [https://www.sifive.com/boards/hifive-unleashed HiFive Unleashed] is a RISC‑V development board featuring the Freedom U540 SoC. Its production is discontinued, but it's still supported by [[Ports/riscv64|Sisyphus riscv64 port]].<br />
<br />
[[Regular/riscv64|Regular Images]] and [[Simply Linux 10]] were released for this board.<br />
<br />
== Quick start ==<br />
<br />
TBD.<br />
<br />
== Setup with alt-rootfs-installer ==<br />
<br />
You need alt-roofs-installer version 0.5.2 or higher.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unleashed-opensbi --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
== Manual setup ==<br />
<br />
Starting with U-Boot 2022.01, a U-Boot SPL for Unleashed has been made (file <code>/usr/share/u-boot/sifive_unleashed/u-boot-spl.bin</code>), which is recommended to be used instead of FSBL.<br />
<br />
When using this U-Boot, installing an image for Unleashed is similar to Unmatched and can be done as described in [[HiFive_Unmatched#Installing_images_manually]].<br />
<br />
All references to the <code>usr/share/u-boot/sifive_unmatched</code> directory should be replaced with <code>usr/share/u-boot/sifive_unleashed</code>. <br />
<br />
=== Disk image ===<br />
<br />
To run images on SiFive HiFive Unleashed (FU540) SoC, follow these steps: <br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root# xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root# udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for First Stage BootLoader (FSBL) and U-Boot :<br />
<br />
<source lang="shell"><br />
root# sgdisk -a 1 \<br />
--new=3::+32K --change-name=3:'fsbl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4::+8M: --change-name=4:'opensbi-uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' First Stage BootLoader (FSBL) and OpenSBI binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root# dd if=/run/media/root/<UUID>/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/run/media/root/<UUID>/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download and install packages with FSBL and OpenSBI, then write down in partitions 3 and 4. For example, like this: <br />
<br />
<source lang="shell"><br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<br />
<source lang="shell"><br />
root# parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root filesystem image ===<br />
<br />
To run the SiFive HiFive Unleashed (FU540) SoC with one of the rootfs images one could proceed through the following steps:<br />
<br />
'''Step 0.''' Through this manual it is assumed that microSD card is at /dev/sdb. Let us create file systems at the microSD:<br />
<br />
<source lang="shell"><br />
root$ sgdisk -g --clear \<br />
--new=2::+32K --change-name=2:'fsbl' --typecode=2:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=3::+8M: --change-name=3:'opensbi-uboot' --typecode=3:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
--new=1::-0 --change-name=1:'root' --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \<br />
/dev/sdb<br />
root$ mkfs.ext4 /dev/sdb1<br />
root$ mount /dev/sdb1 /mnt<br />
root$ tar -xpvf hifive-unleashed-riscv64.tar.xz -C /mnt<br />
</source><br />
<br />
'''Step 1.a.''' The First Stage BootLoader (FSBL) and OpenSBI are placed inside the unpacked /mnt tree.<br />
Let us write them to the 2 and 3 partitions respectively, and then unmount /mnt partition.<br />
<br />
<source lang="shell"><br />
root$ dd if=/mnt/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/mnt/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 1.b.''' Alternative option: [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ download]<br />
and install the First Stage BootLoader (FSBL) and OpenSBI for FU540.<br />
<br />
For example:<br />
<br />
<source lang="shell"><br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 3.''' System at microSD is ready to boot. For a graphical system, the system setup is performed through [[Regular/riscv64#VNC|VNC]].<br />
<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unleashed&diff=2091HiFive Unleashed2022-01-20T15:51:20Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
[https://www.sifive.com SiFive] [https://www.sifive.com/boards/hifive-unleashed HiFive Unleashed] is a RISC‑V development board featuring the Freedom U540 SoC. Its production is discontinued, but it's still supported by [[Ports/riscv64|Sisyphus riscv64 port]].<br />
<br />
[[Regular/riscv64|Regular Images]] and [[Simply Linux 9]] were released for this board.<br />
<br />
== Quick start ==<br />
<br />
TBD.<br />
<br />
== Setup with alt-rootfs-installer ==<br />
<br />
You need alt-roofs-installer version 0.5.2 or higher.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unleashed-opensbi --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
== Manual setup ==<br />
<br />
Starting with U-Boot 2022.01, a U-Boot SPL for Unleashed has been made (file <code>/usr/share/u-boot/sifive_unleashed/u-boot-spl.bin</code>), which is recommended to be used instead of FSBL.<br />
<br />
When using this U-Boot, installing an image for Unleashed is similar to Unmatched and can be done as described in [[HiFive_Unmatched#Installing_images_manually]].<br />
<br />
All references to the <code>usr/share/u-boot/sifive_unmatched</code> directory should be replaced with <code>usr/share/u-boot/sifive_unleashed</code>. <br />
<br />
=== Disk image ===<br />
<br />
To run images on SiFive HiFive Unleashed (FU540) SoC, follow these steps: <br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root# xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root# udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for First Stage BootLoader (FSBL) and U-Boot :<br />
<br />
<source lang="shell"><br />
root# sgdisk -a 1 \<br />
--new=3::+32K --change-name=3:'fsbl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4::+8M: --change-name=4:'opensbi-uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' First Stage BootLoader (FSBL) and OpenSBI binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root# dd if=/run/media/root/<UUID>/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/run/media/root/<UUID>/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download and install packages with FSBL and OpenSBI, then write down in partitions 3 and 4. For example, like this: <br />
<br />
<source lang="shell"><br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<br />
<source lang="shell"><br />
root# parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root filesystem image ===<br />
<br />
To run the SiFive HiFive Unleashed (FU540) SoC with one of the rootfs images one could proceed through the following steps:<br />
<br />
'''Step 0.''' Through this manual it is assumed that microSD card is at /dev/sdb. Let us create file systems at the microSD:<br />
<br />
<source lang="shell"><br />
root$ sgdisk -g --clear \<br />
--new=2::+32K --change-name=2:'fsbl' --typecode=2:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=3::+8M: --change-name=3:'opensbi-uboot' --typecode=3:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
--new=1::-0 --change-name=1:'root' --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \<br />
/dev/sdb<br />
root$ mkfs.ext4 /dev/sdb1<br />
root$ mount /dev/sdb1 /mnt<br />
root$ tar -xpvf hifive-unleashed-riscv64.tar.xz -C /mnt<br />
</source><br />
<br />
'''Step 1.a.''' The First Stage BootLoader (FSBL) and OpenSBI are placed inside the unpacked /mnt tree.<br />
Let us write them to the 2 and 3 partitions respectively, and then unmount /mnt partition.<br />
<br />
<source lang="shell"><br />
root$ dd if=/mnt/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/mnt/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 1.b.''' Alternative option: [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ download]<br />
and install the First Stage BootLoader (FSBL) and OpenSBI for FU540.<br />
<br />
For example:<br />
<br />
<source lang="shell"><br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 3.''' System at microSD is ready to boot. For a graphical system, the system setup is performed through [[Regular/riscv64#VNC|VNC]].<br />
<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=2090Ports/riscv64/QEMU2022-01-20T11:18:30Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
This page describes how to start riscv64 virtual machine via [https://www.qemu.org QEMU].<br />
<br />
QEMU, starting with version 6.0, includes OpenSBI firmware. For older QEMU versions, there are instructions how to obtain and use the firmware in [[#OpenSBI]] section below.<br />
<br />
Some older ALT images for QEMU include a VNC server that provides access to graphical system setup and graphical desktop (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900 from the virtual machine to the host machine. The parameters necessary for that are included into QEMU command lines below.<br />
<br />
== ALT Images ==<br />
<br />
Currently, we recommend [[Regular/riscv64|Regular builds]] (see also: [[Regular]]).<br />
<br />
== Quickstart for QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-mouse) working.<br />
<br />
Here are the steps to start a riscv64 virtual machine:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support. If your host system is running ALT, you need [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core<br />
<br />
On Ubuntu, riscv64 emulation is part of <tt>qemu-system-misc</tt>.<br />
<br />
'''Step 1''': Download the recent version of u-boot-qemu for riscv64. You can use the link from https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/.<br />
<br />
From the downloaded package, extract <tt>/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin</tt>. For example:<br />
<br />
rpm2cpio u-boot-qemu-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
'''Step 2''': Now you can start a virtual machine via the following commands:<br />
<br />
<source lang="shell"><br />
$ IMAGE=<path to riscv64 image in img or qcow2 format><br />
$ UBOOT=<path to u-boot.bin from step 1><br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-gpu,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -sdl <br />
</source><br />
<br />
== OpenSBI ==<br />
<br />
To run riscv64 virtual machine on older (pre-6.0) QEMU, you need OpenSBI (firmware) binary.<br />
<br />
'''Option #1''' There is an OpenSBI firmware binary inside the qcow2/qcow2c image. You can copy it out of the image:<br />
<br />
<source lang=shell><br />
root# modprobe nbd<br />
root# qemu-nbd -c /dev/nbd0 qemu-riscv64.qcow2c<br />
root# mount /dev/nbd0p1 /mnt<br />
root# cp -v /mnt/usr/share/opensbi/generic/firmware/fw_payload.elf .<br />
user$ FIRM=./fw_payload.elf<br />
</source> <br />
<br />
'''Option #2''' [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ Download] and install the latest version of OpenSBI package <code>opensbi-firmware-generic</code>.<br />
<br />
The OpenSBI firmware will be at <tt>/usr/share/opensbi/generic/firmware/fw_payload.elf</tt>.<br />
<br />
For example:<br />
<br />
<source lang=shell><br />
user$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-generic-0.9-alt1.noarch.rpm<br />
root# rpm -i opensbi-firmware-generic-0.9-alt1.noarch.rpm<br />
user$ FIRM=/usr/share/opensbi/generic/firmware/fw_payload.elf<br />
</source><br />
<br />
<source lang="shell"><br />
$ QCOW=qemu-riscv64.qcow2c<br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt -kernel "$FIRM" \<br />
-m 2G -smp cpus=4 \<br />
-drive file="$QCOW",id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source><br />
<br />
[[ru:Ports/riscv64/QEMU]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unmatched&diff=2089HiFive Unmatched2022-01-20T10:46:00Z<p>Jqt4: </p>
<hr />
<div>{{Stub}}<br />
<br />
[https://www.sifive.com/boards/hifive-unmatched HiFive Unmatched] from [https://www.sifive.com SiFive] is a Mini-ITX board powered by SiFive Freedom U740 SoC. It is supported by [[Ports/riscv64|Sisyphus risc64 port]]. HiFive Umatched boards are used as build nodes for this port.<br />
<br />
The board is supported by un-def distribution kernel since 5.12.18-alt1.rv64 and u-boot since 2021.07-alt1.<br />
<br />
== ALT Images ==<br />
<br />
HiFive Unmatched is supported by weekly regular builds: [[Regular/riscv64]]. <br />
<br />
Images can be written via alt-rootfs-installer or manually.<br />
<br />
Graphical images (e.g. Xfce, MATE) are designed to work with a video card by default. If there is no video card, you can access the graphics via VNC: [[ Regular/riscv64#VNC ]].<br />
<br />
=== Write-in with alt-rootfs-installer ===<br />
<br />
HiFive Unmatched target is supported by alt-roofs-installer 0.5.2 or newer.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unmatched --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
You can add <tt>--vnc=1</tt> parameter here to enable the VNC server (e.g. if you don't have a video card installed). See [[ Regular/riscv64#VNC ]].<br />
<br />
== Installing images manually ==<br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root$ xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root$ udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for U-Boot SPL (Secondary Program Loader) and U-Boot :<br />
<br />
<source lang="shell"><br />
root$ sgdisk -a 1 \<br />
--new=3:34:2081 --change-name=3:'spl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4:2082:10273 --change-name=4:'uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' U-Boot SPL (Secondary Program Loader) and U-Boot binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download the latest version of the package u-boot-sifive. You can use the link from https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-sifive/rpms/.<br />
<br />
Extract files u-boot-spl.bin and u-boot.itb from the package and write them into partitions 2 и 3, respectively:<br />
<br />
<source lang="shell"><br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot-spl.bin' > u-boot-spl.bin<br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot.itb' > u-boot.itb<br />
root$ dd if=u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<source lang="shell"><br />
root$ parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root on NVME ===<br />
<br />
The file system can be copied to NVME and and used as system root. For that, you can do the following.<br />
<br />
'''Create a partition on NVME using fdisk.''' For example. <br />
<br />
'''Format the partition''':<br />
<br />
mkfs.ext4 -m1 -L ROOT /dev/nvme0n1p1<br />
<br />
'''Mount the partition''':<br />
<br />
mount /dev/nvme0n1p1 /mnt<br />
<br />
'''Copy rootfs content to the NVME partition''':<br />
<br />
rsync -ax / /mnt<br />
<br />
The -x option allows to copy rootfs content only, and ignore other mounted file systems.<br />
Copying can take a long time.<br />
<br />
Have a look at UUID of NVME partition, for example, this way:<br />
<br />
lsblk -f<br />
NAME FSTYPE LABEL UUID ...<br />
...<br />
└─nvme0n1p1 ext4 1.0 ROOT dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Put this UUID value into <tt>/mnt/boot/extlinux/extlinux.conf</tt>:<br />
<br />
append root=UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Also, update the root partition UUID in <tt>/mnt/etc/fstab</tt>:<br />
<br />
UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 / ext4 ...<br />
<br />
=== EFI on NVME ===<br />
<br />
TBD.<br />
<br />
=== Grub ===<br />
<br />
TBD.<br />
<br />
<br />
[[ru:HiFive Unmatched]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unmatched&diff=2080HiFive Unmatched2022-01-19T16:49:06Z<p>Jqt4: </p>
<hr />
<div>{{Stub}}<br />
<br />
[https://www.sifive.com/boards/hifive-unmatched HiFive Unmatched] from [https://www.sifive.com SiFive] is a Mini-ITX board powered by SiFive Freedom U740 SoC. It is supported by [[Ports/riscv64|Sisyphus risc64 port]]. HiFive Umatched boards are used as build nodes for this port.<br />
<br />
The board is supported by un-def distribution kernel since 5.12.18-alt1.rv64 and u-boot since 2021.07-alt1.<br />
<br />
== ALT Images ==<br />
<br />
HiFive Unmatched is supported by weekly regular builds: [[Regular/riscv64]]. <br />
<br />
Images can be written via alt-rootfs-installer or manually.<br />
<br />
Graphical images (e.g. Xfce, MATE) are designed to work with a video card by default. If there is no video card, you can access the graphics via VNC: [[ Regular/riscv64#VNC ]].<br />
<br />
=== Write-in with alt-rootfs-installer ===<br />
<br />
HiFive Unmatched target is supported by alt-roofs-installer 0.5.2 or newer.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unmatched --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
You can add <tt>--vnc=1</tt> parameter here to enable the VNC server (e.g. if you don't have a video card installed). See [[ Regular/riscv64#VNC ]].<br />
<br />
== Installing images manually ==<br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root$ xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root$ udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for U-Boot SPL (Secondary Program Loader) and U-Boot :<br />
<br />
<source lang="shell"><br />
root$ sgdisk -a 1 \<br />
--new=3:34:2081 --change-name=3:'spl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4:2082:10273 --change-name=4:'uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' U-Boot SPL (Secondary Program Loader) and U-Boot binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=/run/media/root/<UUID>/usr/share/u-boot/sifive_unmatched/u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download the latest version of the package u-boot-sifive. You can use the link from https://packages.altlinux.org/ru/sisyphus_riscv64/srpms/u-boot-sifive-fu740/rpms/.<br />
<br />
Extract files u-boot-spl.bin and u-boot.itb from the package and write them into partitions 2 и 3, respectively:<br />
<br />
<source lang="shell"><br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot-spl.bin' > u-boot-spl.bin<br />
user$ rpm2cpio u-boot-sifive-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/sifive_unmatched/u-boot.itb' > u-boot.itb<br />
root$ dd if=u-boot-spl.bin of=/dev/sdX3 bs=1M<br />
root$ dd if=u-boot.itb of=/dev/sdX4 bs=1M<br />
root$ sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<source lang="shell"><br />
root$ parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root on NVME ===<br />
<br />
The file system can be copied to NVME and and used as system root. For that, you can do the following.<br />
<br />
'''Create a partition on NVME using fdisk.''' For example. <br />
<br />
'''Format the partition''':<br />
<br />
mkfs.ext4 -m1 -L ROOT /dev/nvme0n1p1<br />
<br />
'''Mount the partition''':<br />
<br />
mount /dev/nvme0n1p1 /mnt<br />
<br />
'''Copy rootfs content to the NVME partition''':<br />
<br />
rsync -ax / /mnt<br />
<br />
The -x option allows to copy rootfs content only, and ignore other mounted file systems.<br />
Copying can take a long time.<br />
<br />
Have a look at UUID of NVME partition, for example, this way:<br />
<br />
lsblk -f<br />
NAME FSTYPE LABEL UUID ...<br />
...<br />
└─nvme0n1p1 ext4 1.0 ROOT dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Put this UUID value into <tt>/mnt/boot/extlinux/extlinux.conf</tt>:<br />
<br />
append root=UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 ...<br />
<br />
Also, update the root partition UUID in <tt>/mnt/etc/fstab</tt>:<br />
<br />
UUID=dc155086-4ee4-42f6-87be-bcc67b2b93e6 / ext4 ...<br />
<br />
=== EFI on NVME ===<br />
<br />
TBD.<br />
<br />
=== Grub ===<br />
<br />
TBD.<br />
<br />
<br />
[[ru:HiFive Unmatched]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=Regular/riscv64&diff=2015Regular/riscv642021-12-28T16:43:14Z<p>Jqt4: /* HiFive Unmatched and Unleashed */</p>
<hr />
<div><br />
{| style="border:1px solid #AAA; background:#F9F9FF; width:100px; margin: 0 0 1em 1em; padding:.2em; text-align:left; float: right;" class=noprint<br />
| __TOC__<br />
|-<br />
| [[:ru:Regular/riscv64|Русский]]<br />
|}<br />
<br />
[[Regular|Regular image]] builds are intended for testing and development of the [[Ports/riscv64|RISC-V (rv64gc) port]] of [[Sisyphus]] repository.<br />
<br />
Additional information:<br />
* on Regular images: [[Regular]];<br />
* on riscv64 Sisyphus port: [[Ports/riscv64]];<br />
* #Feedback.<br />
<br />
Аfter booting from one of the images below, use the following credentials to login: <br />
<br />
login: root<br />
password: altlinux<br />
<br />
For older images (created before August 2021), use password <tt>alt</tt>.<br />
<br />
For the recent images with graphics support (Xfce, MATE, LXQT), these credentials work at the first boot. All the images with graphics support have a graphical setup wizard that is activated on the first boot and allows to do initial configuration of the system, including setting the root password, via GUI.<br />
<br />
The developer image ('''builder''') has another pre-created user:<br />
<br />
login: altlinux<br />
password: alt<br />
<br />
{{Attention|It is highly recommended to '''change the password''' right after the first log-in into the system.}}<br />
<br />
== HiFive Unmatched and Unleashed ==<br />
<br />
For [[HiFive Unmatched]] and [[HiFive Unleashed]] boards we recommend fresh tested images http://nightly.altlinux.org/sisyphus-riscv64/tested/ or snapshots http://nightly.altlinux.org/sisyphus-riscv64/snapshots/<br />
<br />
Setup instructions are available on the corresponding board page: [[HiFive Unmatched]], [[HiFive Unleashed]]<br />
<br />
See [[#VNC]] section below on how to access graphical setup for Xfce and MATE images.<br />
<br />
== QEMU ==<br />
<br />
The latest images for [https://www.qemu.org QEMU] VMs are published here:<br />
http://nightly.altlinux.org/sisyphus-riscv64<br />
<br />
The following images are build:<br />
* Full-featured images with graphical desktop: Xfce, MATE, LXQT.<br />
* Minimal systems:<br />
** <tt>jeos-systemd</tt> -- basic rootfs with systemd<br />
** <tt>rescue</tt><br />
** <tt>builder</tt> -- basic developer-oriented live system, includes pre-configured [[hasher]] out-of-the box.<br />
<br />
The instructions on how to run these images on QEMU are on a separate page: [[Ports/riscv64/QEMU]].<br />
<br />
See [[#VNC]] section below on how to access graphical setup for images with graphics support.<br />
<br />
== VNC ==<br />
Xfce and MATE images include a setup wizard that is activated on first boot. It allows to do the initial system setup, including selecting the timezone, setting the root password, creating a new user, setting VNC password, etc.<br />
<br />
In the case of QEMU, if port forwarding for port 5900 is used, connecting to VNC is straightforward. For example, in the case of [https://en.wikipedia.org/wiki/TigerVNC tigerVNC]:<br />
<source lang="shell"><br />
$ vncviewer 127.0.0.1<br />
</source><br />
<br />
"Real" machines (e.g. HiFive Unmatched board) obtain the IP address via DHCP, and one needs to find out that address to connect to the VNC server.<br />
<br />
One way to do it is to connect to the board serial console. For HiFive boards, you should connect your PC to the console port (microUSB) and use, for example, <tt>screen</tt> command:<br />
<source lang="shell"><br />
$ screen /dev/ttyUSB1 115200<br />
</source><br />
<br />
During first boot the IPv4 and IPv6 addresses will be print to the console. It looks like this:<br />
<source lang="shell"><br />
[ 128.084540] xinit[276]: ALTERATOR SETUP === Default device: "eth0"<br />
[ 128.084888] xinit[276]: ALTERATOR SETUP === IPv4: "192.168.88.216/24"<br />
[ 128.085110] xinit[276]: ALTERATOR SETUP === IPv6: "fe80::72b3:d5ff:fe92:f229/64"<br />
</source><br />
<br />
You can use any of these addresses to connect to the VNC server, for example:<br />
<source lang="shell"><br />
$ vncviewer 192.168.88.216<br />
</source><br />
<br />
== Feedback ==<br />
<br />
'''• Bug reports''' are tracked at [https://bugzilla.altlinux.org ALT Linux Team bugzilla] (see also: [[BugTracking]]):<br />
* In the case of any issue with a package choose product ''Sisyphus''.<br />
* In the case of an issue with the images choose product ''Regular'' .<br />
<br />
'''IMPORTANT''':<br />
* set platform field (drop-down list at the right) to ''riscv64'';<br />
* assign the issue to <tt>iv@altlinux.org</tt>.<br />
<br />
'''• Mailing list:''' riscv-devel@lists.altlinux.org<br />
<br />
[[ru:Regular/riscv64]]<br />
[[Category:Regular]]<br />
[[Category:Sisyphus]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unleashed&diff=2014HiFive Unleashed2021-12-28T16:22:22Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
[https://www.sifive.com SiFive] [https://www.sifive.com/boards/hifive-unleashed HiFive Unleashed] is a RISC‑V development board featuring the Freedom U540 SoC. Its production is discontinued, but it's still supported by [[Ports/riscv64|Sisyphus riscv64 port]].<br />
<br />
[[Regular/riscv64|Regular Images]] and [[Simply Linux 9]] were released for this board.<br />
<br />
== Quick start ==<br />
<br />
TBD.<br />
<br />
== Setup with alt-rootfs-installer ==<br />
<br />
You need alt-roofs-installer version 0.5.2 or higher.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unleashed-opensbi --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
== Manual setup ==<br />
<br />
=== Disk image ===<br />
<br />
To run images on SiFive HiFive Unleashed (FU540) SoC, follow these steps: <br />
<br />
'''Step 0.''' Image write-in and mounting:<br />
<br />
<source lang="shell"><br />
root# xzcat /path/to/<image>-riscv64.img.xz | dd of=/dev/sdx bs=4M status=progress <br />
root# udiskctl mount /dev/sdX2<br />
</source><br />
<br />
The root partition will be mounted in /run/media/root/<UUID><br />
<br />
'''Step 1.''' Adding partitions for First Stage BootLoader (FSBL) and U-Boot :<br />
<br />
<source lang="shell"><br />
root# sgdisk -a 1 \<br />
--new=3::+32K --change-name=3:'fsbl' --typecode=3:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=4::+8M: --change-name=4:'opensbi-uboot' --typecode=4:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
/dev/sdX<br />
</source><br />
<br />
'''Step 2.a.''' First Stage BootLoader (FSBL) and OpenSBI binaries are located on the root partition of the image.<br />
Write them into partitions 3 and 4, respectively:<br />
<br />
<source lang="shell"><br />
root# dd if=/run/media/root/<UUID>/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/run/media/root/<UUID>/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 2.b.''' Alternative: download and install packages with FSBL and OpenSBI, then write down in partitions 3 and 4. For example, like this: <br />
<br />
<source lang="shell"><br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root# rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root# dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdX3 bs=1M<br />
root# dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdX4 bs=1M<br />
root# sync<br />
</source><br />
<br />
'''Step 3.''' Switch boot mode from EFI to extlinux.conf. To do this, we need to remove the boot toggle from the fat32 partition:<br />
<br />
<source lang="shell"><br />
root# parted /dev/sdX set 1 boot off<br />
</source><br />
<br />
=== Root filesystem image ===<br />
<br />
To run the SiFive HiFive Unleashed (FU540) SoC with one of the rootfs images one could proceed through the following steps:<br />
<br />
'''Step 0.''' Through this manual it is assumed that microSD card is at /dev/sdb. Let us create file systems at the microSD:<br />
<br />
<source lang="shell"><br />
root$ sgdisk -g --clear \<br />
--new=2::+32K --change-name=2:'fsbl' --typecode=2:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=3::+8M: --change-name=3:'opensbi-uboot' --typecode=3:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
--new=1::-0 --change-name=1:'root' --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \<br />
/dev/sdb<br />
root$ mkfs.ext4 /dev/sdb1<br />
root$ mount /dev/sdb1 /mnt<br />
root$ tar -xpvf hifive-unleashed-riscv64.tar.xz -C /mnt<br />
</source><br />
<br />
'''Step 1.a.''' The First Stage BootLoader (FSBL) and OpenSBI are placed inside the unpacked /mnt tree.<br />
Let us write them to the 2 and 3 partitions respectively, and then unmount /mnt partition.<br />
<br />
<source lang="shell"><br />
root$ dd if=/mnt/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/mnt/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 1.b.''' Alternative option: [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ download]<br />
and install the First Stage BootLoader (FSBL) and OpenSBI for FU540.<br />
<br />
For example:<br />
<br />
<source lang="shell"><br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 3.''' System at microSD is ready to boot. For a graphical system, the system setup is performed through [[Regular/riscv64#VNC|VNC]].<br />
<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=HiFive_Unleashed&diff=2013HiFive Unleashed2021-12-28T15:50:41Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
[https://www.sifive.com SiFive] [https://www.sifive.com/boards/hifive-unleashed HiFive Unleashed] is a RISC‑V development board featuring the Freedom U540 SoC. Its production is discontinued, but it's still supported by [[Ports/riscv64|Sisyphus riscv64 port]].<br />
<br />
[[Regular/riscv64|Regular Images]] and [[Simply Linux 9]] were released for this board.<br />
<br />
== Quick start ==<br />
<br />
TBD.<br />
<br />
== Setup with alt-rootfs-installer ==<br />
<br />
You need alt-roofs-installer version 0.5.2 or higher.<br />
<br />
<source lang="shell"><br />
root# alt-rootfs-installer --target=HiFive-Unleashed-opensbi --image-in=/path/to/<image>-riscv64.img.xz --media=/dev/sdX<br />
</source><br />
<br />
== Manual setup ==<br />
<br />
To run the SiFive HiFive Unleashed (FU540) SoC with one of the rootfs images one could proceed through the following steps:<br />
<br />
'''Step 0.''' Through this manual it is assumed that microSD card is at /dev/sdb. Let us create file systems at the microSD:<br />
<br />
<source lang="shell"><br />
root$ sgdisk -g --clear \<br />
--new=2::+32K --change-name=2:'fsbl' --typecode=2:5B193300-FC78-40CD-8002-E86C45580B47 \<br />
--new=3::+8M: --change-name=3:'opensbi-uboot' --typecode=3:2E54B353-1271-4842-806F-E436D6AF6985 \<br />
--new=1::-0 --change-name=1:'root' --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \<br />
/dev/sdb<br />
root$ mkfs.ext4 /dev/sdb1<br />
root$ mount /dev/sdb1 /mnt<br />
root$ tar -xpvf hifive-unleashed-riscv64.tar.xz -C /mnt<br />
</source><br />
<br />
'''Step 1.а.''' The First Stage BootLoader (FSBL) and OpenSBI are placed inside the unpacked /mnt tree.<br />
Let us write them to the 2 and 3 partitions respectively, and then unmount /mnt partition.<br />
<br />
<source lang="shell"><br />
root$ dd if=/mnt/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/mnt/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 1.б.''' Alternative option: [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ download]<br />
and install the First Stage BootLoader (FSBL) and OpenSBI for FU540.<br />
<br />
For example:<br />
<br />
<source lang="shell"><br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm<br />
root$ rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm<br />
root$ dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M<br />
root$ dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M<br />
root$ sync; umount /mnt<br />
</source><br />
<br />
'''Step 3.''' System at microSD is ready to boot. For a graphical system, the system setup is performed through [[Regular/riscv64#VNC|VNC]].<br />
<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64&diff=1998Ports/riscv642021-12-07T15:16:01Z<p>Jqt4: /* Repository */</p>
<hr />
<div><br />
== Overview ==<br />
[[Sisyphus]] port for riscv64 (RV64GC) architecture is under development since early 2018. The following platforms are supported:<br />
<br />
* [[HiFive Unmatched]]<br />
* [[HiFive Unleashed]]<br />
* [[Ports/riscv64/QEMU|QEMU]]<br />
<br />
== RISC-V ==<br />
<br />
RISC-V is an [https://riscv.org/risc-v-isa open and free instruction set architecture (ISA)].<br />
The RISC-V ISA specifications are licensed under a [https://creativecommons.org/licenses/by/4.0/ Creative Commons license (CC BY 4.0)].<br />
Anyone could get the final versions of the [https://riscv.org/specifications/ user-level ISA specifications] and drafts<br />
of the [https://riscv.org/specifications/compressed-isa/ compressed] and [https://riscv.org/specifications/privileged-isa/ privileged] ISA specifications.<br />
<br />
Another key feature of the RISC-V architecture that it is scalable and allows multiple implementations. The minimal specification has the<br />
commands to store and load, jump and integer arithmetic. It supports the 32-, 64- and 128-bit register sizes: "RV32I, RV64I and RV128I" ("I" stands for integer).<br />
This Linux port runs on "RV64IMAFDC" or "RV64GC" ("G" == "IMAFD"):<br />
* <tt>'''I'''</tt> - Integer and basic instructions<br />
* <tt>'''M'''</tt> - Multiply and divide<br />
* <tt>'''A'''</tt> - Atomic operations<br />
* <tt>'''F'''</tt> - Single precision floating point<br />
* <tt>'''D'''</tt> - Double precision floating point<br />
* <tt>'''C'''</tt> - Compressed instructions<br />
<br />
== Images ==<br />
<br />
We build [[Regular/riscv64|Regular Images]] (see also: [[Regular]]) for these platforms. Check out [[Regular/riscv64]] for download links and the platform page for the quick start/installation instructions.<br />
<br />
Also, for Unleashed and QEMU, [[Simply Linux 9]] was released, but those images have somewhat lost their relevance.<br />
<br />
== Repository ==<br />
<br />
RPM/SRPM repository is located at http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/ <br />
<br />
As apt-rpm <tt>sources.list</tt>:<br />
<br />
rpm [sisyphus-riscv64] http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64 Sisyphus/riscv64 classic<br />
# rpm [sisyphus-riscv64] http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64 Sisyphus/riscv64 debuginfo <br />
rpm [sisyphus-riscv64] http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64 Sisyphus/noarch classic<br />
<br />
Yandex mirror (better download speeds):<br />
<br />
rpm [sisyphus-riscv64] http://mirror.yandex.ru/altlinux/ports/riscv64 Sisyphus/riscv64 classic <br />
# rpm [sisyphus-riscv64] http://mirror.yandex.ru/altlinux/ports/riscv64 Sisyphus/riscv64 debuginfo<br />
rpm [sisyphus-riscv64] http://mirror.yandex.ru/altlinux/ports/riscv64 Sisyphus/noarch classic<br />
<br />
The information on the available packages is available here: https://packages.altlinux.org/en/sisyphus_riscv64/packages/<br />
<br />
The packages are build on a separate [[girar]] instance, similar to [[Git.alt]]. SiFive [[HiFive Unmatched]] are used as build nodes.<br />
<br />
The "chasing builder" approach is used: as soon as a task is committed to the primary [[Sisyphus]] repository, special robot creates a similar task for <tt>sisyphus_riscv64</tt>. This means that there is no need to do anything special for building packages for '''riscv64''': build for Sisyphus. The tasks are approved manually. The resulting packages are available in the repository on the same day or on the next day most of the times.<br />
<br />
We don't rebuild all the Sisyphus packages due to the limited need and resources. If you need some package is available in Sisyphus but is missing in <tt>sisyphus_riscv64</tt>, please fill a bug or write to the mailing list: riscv-devel@lists.altlinux.org.<br />
<br />
== Reporting issues ==<br />
<br />
For tracking bugs and issues we use ALT Linux Team bugzilla -- http://bugzilla.altlinux.org (see also: [[BugTracking]]).<br />
<br />
* For issues in packages, choose product: Sisyphus, component: name of the package, and set "hardware" field to '''riscv64'''.<br />
* For general image issues, choose product corresponding to the image type (e.g. Regular, or Simply Linux).<br />
<br />
'''IMPORTANT''':<br />
* Set '''Hardware''' to '''riscv64''' (on the right at the top of the bug creation form)<br />
* Assign the bug to Ivan Melnikov (iv at altlinux.org).<br />
<br />
== Useful links ==<br />
<br />
* [[Ports/riscv64/OpenOCD]]<br />
* [http://0x1.tv/20180929H OSSDEVCONF-2018 (in Russian)]<br />
* [https://github.com/dalegr/riscv-bbl-utils Berkeley bootloader utils] to merge the linux kernel into the bbl.bin with dummy payload.<br />
* [https://riscv.org/specifications RISC-V specifications]<br />
* [https://www.sifive.com/blog/all-aboard-part-0-introduction All Aboard] -- cool series of blog posts by Palmer Dabbelt about RISC-V, toolchain, etc.<br />
<br />
[[Category:Sisyphus]][[Category:Ports]][[Category:RISC-V]]<br />
[[ru:Ports/riscv64]]</div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=1997Ports/riscv64/QEMU2021-12-07T15:10:54Z<p>Jqt4: </p>
<hr />
<div><br />
{{Stub}}<br />
<br />
This page describes how to start riscv64 virtual machine via [https://www.qemu.org QEMU].<br />
<br />
QEMU, starting with version 6.0, includes OpenSBI firmware. For older QEMU versions, there are instructions how to obtain and use the firmware in [[#OpenSBI]] section below.<br />
<br />
Some older ALT images for QEMU include a VNC server that provides access to graphical system setup and graphical desktop (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900 from the virtual machine to the host machine. The parameters necessary for that are included into QEMU command lines below.<br />
<br />
== ALT Images ==<br />
<br />
Currently, we recommend [[Regular/riscv64|Regular builds]] (see also: [[Regular]]).<br />
<br />
== Quickstart for QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-mouse) working.<br />
<br />
Here are the steps to start a riscv64 virtual machine:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support. If your host system is running ALT, you need [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core<br />
<br />
On Ubuntu, riscv64 emulation is part of <tt>qemu-system-misc</tt>.<br />
<br />
'''Step 1''': Download the recent version of [https://packages.altlinux.org/en/sisyphus_riscv64/srpms/u-boot-qemu u-boot-qemu for riscv64]. You can use the link from https://packages.altlinux.org/ru/sisyphus_riscv64/srpms/u-boot-qemu/rpms.<br />
<br />
From the downloaded package, extract <tt>/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin</tt>. For example:<br />
<br />
rpm2cpio u-boot-qemu-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
'''Step 2''': Now you can start a virtual machine via the following commands:<br />
<br />
<source lang="shell"><br />
$ IMAGE=<path to riscv64 image in img or qcow2 format><br />
$ UBOOT=<path to u-boot.bin from step 1><br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-gpu,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -sdl <br />
</source><br />
<br />
== OpenSBI ==<br />
<br />
To run riscv64 virtual machine on older (pre-6.0) QEMU, you need OpenSBI (firmware) binary.<br />
<br />
'''Option #1''' There is an OpenSBI firmware binary inside the qcow2/qcow2c image. You can copy it out of the image:<br />
<br />
<source lang=shell><br />
root# modprobe nbd<br />
root# qemu-nbd -c /dev/nbd0 qemu-riscv64.qcow2c<br />
root# mount /dev/nbd0p1 /mnt<br />
root# cp -v /mnt/usr/share/opensbi/generic/firmware/fw_payload.elf .<br />
user$ FIRM=./fw_payload.elf<br />
</source> <br />
<br />
'''Option #2''' [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ Download] and install the latest version of OpenSBI package <code>opensbi-firmware-generic</code>.<br />
<br />
The OpenSBI firmware will be at <tt>/usr/share/opensbi/generic/firmware/fw_payload.elf</tt>.<br />
<br />
For example:<br />
<br />
<source lang=shell><br />
user$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-generic-0.9-alt1.noarch.rpm<br />
root# rpm -i opensbi-firmware-generic-0.9-alt1.noarch.rpm<br />
user$ FIRM=/usr/share/opensbi/generic/firmware/fw_payload.elf<br />
</source><br />
<br />
<source lang="shell"><br />
$ QCOW=qemu-riscv64.qcow2c<br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt -kernel "$FIRM" \<br />
-m 2G -smp cpus=4 \<br />
-drive file="$QCOW",id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source><br />
<br />
[[ru:Ports/riscv64/QEMU]]<br />
[[Category:RISC-V]]</div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=1978Ports/riscv64/QEMU2021-11-22T10:11:43Z<p>Jqt4: /* Older QEMU (pre-6.0) */</p>
<hr />
<div><br />
{{Stub}}<br />
<br />
QEMU, starting with version 6.0, include OpenSBI firmware. If you have an older QEMU version, follow the instructions to obtain and use the firmware below.<br />
<br />
Some older ALT images for QEMU include a VNC server that is used for system setup and graphics (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900. The necessary parameters for that are included into QEMU command lines below.<br />
<br />
== QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-mouse) working.<br />
<br />
Here are the steps to start a riscv64 virtual machine:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support. If your host system is running ALT, you need [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core<br />
<br />
On Ubuntu, riscv64 emulation is part of <tt>qemu-system-misc</tt>.<br />
<br />
'''Step 1''': Download the recent version of [https://packages.altlinux.org/ru/sisyphus/srpms/u-boot-qemu u-boot-qemu for riscv64]. You can use the riscv64 link from https://packages.altlinux.org/ru/sisyphus/srpms/u-boot-qemu/rpms.<br />
<br />
From the downloaded package, extract <tt>/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin</tt>. For example:<br />
<br />
rpm2cpio u-boot-qemu-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
<br />
'''Step 2''': Now you can start a virtual machine via the following commands:<br />
<br />
<br />
<source lang="shell"><br />
$ IMAGE=<path to riscv64 image in img or qcow2 format><br />
$ UBOOT=<path to u-boot.bin from step 1><br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-gpu,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -sdl <br />
</source><br />
<br />
== Older QEMU (pre-6.0) ==<br />
<br />
For older QEMU, you need OpenSB (firmware) binary.<br />
<br />
'''Option #1''' There is an OpenSBI firmware binary inside the qcow2/qcow2c image. You can copy it out of the image:<br />
<br />
<source lang=shell><br />
root# modprobe nbd<br />
root# qemu-nbd -c /dev/nbd0 qemu-riscv64.qcow2c<br />
root# mount /dev/nbd0p1 /mnt<br />
root# cp -v /mnt/usr/share/opensbi/generic/firmware/fw_payload.elf .<br />
user$ FIRM=./fw_payload.elf<br />
</source> <br />
<br />
'''Option #2''' [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ Download] and install the latest version of OpenSBI package <code>opensbi-firmware-generic</code>.<br />
<br />
The OpenSBI firmware will be at <tt>/usr/share/opensbi/generic/firmware/fw_payload.elf</tt>.<br />
<br />
For example:<br />
<br />
<source lang=shell><br />
user$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-generic-0.9-alt1.noarch.rpm<br />
root# rpm -i opensbi-firmware-generic-0.9-alt1.noarch.rpm<br />
user$ FIRM=/usr/share/opensbi/generic/firmware/fw_payload.elf<br />
</source><br />
<br />
<source lang="shell"><br />
$ QCOW=qemu-riscv64.qcow2c<br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt -kernel "$FIRM" \<br />
-m 2G -smp cpus=4 \<br />
-drive file="$QCOW",id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source></div>Jqt4https://en.altlinux.org/index.php?title=Ports/riscv64/QEMU&diff=1977Ports/riscv64/QEMU2021-11-22T09:47:03Z<p>Jqt4: /* QEMU 6.0+ */</p>
<hr />
<div><br />
{{Stub}}<br />
<br />
QEMU, starting with version 6.0, include OpenSBI firmware. If you have an older QEMU version, follow the instructions to obtain and use the firmware below.<br />
<br />
Some older ALT images for QEMU include a VNC server that is used for system setup and graphics (see [[Regular/riscv64#VNC]] for more details). To access that server, it's convenient to forward port 5900. The necessary parameters for that are included into QEMU command lines below.<br />
<br />
== QEMU 6.0+ ==<br />
<br />
QEMU 6.0 virtual machines with kernel 5.14+ have graphics (virtuo-gpu) and input (virtio-keyboard and virtio-mouse) working.<br />
<br />
Here are the steps to start a riscv64 virtual machine:<br />
<br />
'''Step 0''': Install QEMU with riscv64 support. If your host system is running ALT, you need [http://sisyphus.ru/en/srpm/Sisyphus/qemu qemu-system-riscv-core package]:<br />
<br />
apt-get install qemu-system-riscv-core<br />
<br />
On Ubuntu, riscv64 emulation is part of <tt>qemu-system-misc</tt>.<br />
<br />
'''Step 1''': Download the recent version of [https://packages.altlinux.org/ru/sisyphus/srpms/u-boot-qemu u-boot-qemu for riscv64]. You can use the riscv64 link from https://packages.altlinux.org/ru/sisyphus/srpms/u-boot-qemu/rpms.<br />
<br />
From the downloaded package, extract <tt>/usr/share/u-boot/qemu-riscv64_smode/u-boot.bin</tt>. For example:<br />
<br />
rpm2cpio u-boot-qemu-*riscv64.rpm | cpio -vi --to-stdout './usr/share/u-boot/qemu-riscv64_smode/u-boot.bin' > u-boot.bin<br />
<br />
<br />
'''Step 2''': Now you can start a virtual machine via the following commands:<br />
<br />
<br />
<source lang="shell"><br />
$ IMAGE=<path to riscv64 image in img or qcow2 format><br />
$ UBOOT=<path to u-boot.bin from step 1><br />
$ qemu-system-riscv64 \<br />
-nographic -m 2G -machine virt -kernel "$UBOOT" \<br />
-smp cpus=4 \<br />
-drive file=$IMAGE,id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0 \<br />
-device virtio-gpu,xres=1280,yres=800 -device virtio-keyboard -device virtio-tablet -sdl <br />
</source><br />
<br />
== Older QEMU (pre-6.0) ==<br />
<br />
For older QEMU, you need OpenSB (firmware) binary.<br />
<br />
'''Option #1''' There is an OpenSBI firmware binary inside the qcow2/qcow2c image. You can copy it out of the image:<br />
<br />
<source lang=shell><br />
root# qemu-nbd -c /dev/nbd0 qemu-riscv64.qcow2c<br />
root# mount /dev/nbd0p1 /mnt<br />
root# cp -v /mnt/usr/share/opensbi/qemu/virt/firmware/fw_payload.elf .<br />
user$ FIRM=./fw_payload.elf<br />
</source> <br />
<br />
'''Option #2''' [http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/ Download] and install the latest version of OpenSBI for QEMU.<br />
<br />
The OpenSBI firmware for QEMU virt will be at <tt>/usr/share/opensbi/qemu/virt/firmware/fw_payload.elf</tt>.<br />
<br />
For example:<br />
<br />
<source lang=shell><br />
user$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-qemu-0.6-alt1.noarch.rpm<br />
root# rpm -i opensbi-firmware-qemu-0.6-alt1.noarch.rpm<br />
user$ FIRM=/usr/share/opensbi/qemu/virt/firmware/fw_payload.elf<br />
</source><br />
<br />
<source lang="shell"><br />
$ QCOW=qemu-riscv64.qcow2c<br />
$ qemu-system-riscv64 \<br />
-nographic -machine virt -kernel "$FIRM" \<br />
-m 2G -smp cpus=4 \<br />
-drive file="$QCOW",id=hd0 -device virtio-blk-device,drive=hd0 \<br />
-netdev user,id=eth0,hostfwd=tcp::5900-:5900 -device virtio-net-device,netdev=eth0<br />
</source></div>Jqt4