Regular/riscv64
Regular image builds for SoC with RISC-V (rv64gc) CPU
Overview
Regular image builds are intended to test and develop the RISC-V (rv64gc) port of the Sisyphus repository.
To learn more about regular image builds one could refer to this article.
To make a bug report or discuss any suggestions please refer to the "Feedback" section on this page.
To enter the system, after the boot with one of the images listed below, please use the following username/password:
login: root
password: alt
In the case of the developer image (builder) there is an another user:
login: altlinux
password: alt
HiFive Unleashed
Two types of the images for the SiFive's HiFive Unleashed board currently available:
- Minimal system with systemd -- link (MD5, SHA1)
- Minimal system with SysV -- ссылка (MD5, SHA1)
- Minimal system for developer (rpmbuild, hasher, gcc-8, ssh) -- link (MD5, SHA1)
The instructions on how to run these images on HiFive Unleashed in this section.
QEMU
The images for the QEMU listed below:
- Minimal system with systemd -- link (MD5, SHA1)
- Minimal sytem with SysV -- ссылка (MD5, SHA1)
- Minimal system for developer (rpmbuild, hasher, gcc-8, ssh) -- link (MD5, SHA1)
The instructions on how to run these images on QEMU in this section.
How to run on QEMU
In order to run the image on the QEMU system one need to follow these steps:
Step 1. Install QEMU with riscv64 support. For example, in the case of ALT x86_64 system: qemu-system-riscv-core.
Step 2. Get the Linux kernel for QEMU and install it:
rpm --install <kernel package>.rpm
After that, the Linux kernel for QEMU compressed with gzip could be found at /usr/share/qemu-riscv64/vmlinuz. Decompress the Linux kernel:
$ gzip -d -c /usr/share/qemu-riscv64/vmlinuz > ~/vmlinux
Step 3. Download one of the images for QEMU listed (above) and just replace <IMAGE> to the path of just downloaded qcow2c image:
$ qemu-system-riscv64 -nographic -machine virt \
-kernel ~/vmlinux \
-m 2G -smp cpus=4,threads=2,maxcpus=8 \
-drive file=<IMAGE>.qcow2c,id=hd0 -device virtio-blk-device,drive=hd0 \
-append "earlyprintk root=/dev/vda1 fastboot rootwait console=ttyS0 debug sunrpc.debug" \
-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
How to run on HiFive Unleashed
This instruction assumes that the user is working on the computer with ALT Sisyphus installed on it. In order to run the image on the HiFive Unleashed one need to follow these steps:
Step 1. Download minimal system image with systemd, which is a tar archive with rootfs. To install the system one could choose between two options: automatic install on ALT Sisyphus and manual.
Automatic install on ALT Sisyphus
Step 2. Install the alt-rootfs-installer.
Step 3. Run the alt-rootfs-installer. This script will automatically install the system on microSD card. For example, to install regular-builder-alpha20190329-riscv64.tar.xz image on /dev/sdX with log output to /home/user/alt-rootfs-installer.log:
$ alt-rootfs-installer --rootfs=/home/user/images/regular-builder-alpha20190329-riscv64.tar.xz \
--media=/dev/sdX \
--target=HiFive-Unleashed-bbl --log /home/user/alt-rootfs-installer.log
After this procedure the /dev/sdX disk will contain two partitions. The first partition will contain bbl bootloader with Linux kernel, which is statically linked with bbl. The second partition will contain root file system.
Now, microSD card is ready to use with HiFive Unleashed.
Manual install
Step 2. Untar the /boot directory from the archive from step 1. For example, in the case of minimal system image with systemd:
$ tar -xf regular-jeos-latest-riscv64.tar ./boot
The ./boot/vmlinuz will contain symlink to the Linux kernel.
Step 3. Create the GPT table with two partitions on the microSD card:
- The first partition must contain specific GUID 2E54B353-1271-4842-806F-E436D6AF6985
- The second partition is a typical Linux Filesystem GUID 0FC63DAF-8483-4772-8E79-3D69D8477DE4
The example command for /dev/sdX:
$ sgdisk -g --clear \
--new=1:2048:67583 --change-name=1:bootloader --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
--new=2:264192: --change-name=2:root --typecode=2:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \
"/dev/sdX"
Step 4. Write the bbl+Linux kernel to the first partition of microSD:
$ dd if=boot/vmlinuz of=/dev/sdX1 bs=4M status=progress
Step 5. Create filesystem on second partition of microSD. Mount it and untar the archive with rootfs:
$ mkfs.ext4 /dev/sdX2
$ mount /dev/sdX2 /mnt
$ tar -xpvf regular-jeos-latest-riscv64.tar -C /mnt/
$ umount /dev/sdX2
Now, microSD is ready to use with HiFive Unleashed.
Feedback
• Bug reports submission form at bugzilla.
- In the case of any issue with a package please choose Sisyphus.
- In the case of an issue with the images please choose Regular.
Set riscv64 as a platform (drop-down list at the right). In the field "Assign to" set arei@altlinux.org.
• IRC channel #altlinux-riscv at freenode.
• Mailing list: riscv-devel@lists.altlinux.org