This is the current stage4 disk image for the Fedora/RISC-V project: https://fedoraproject.org/wiki/Architectures/RISC-V Sources for these files can be found in: https://fedorapeople.org/groups/risc-v/SRPMS/ https://github.com/rwmjones/fedora-riscv-stage4 https://github.com/rwmjones/fedora-riscv-kernel Uncompressing and resizing the disk ----------------------------------- The disk image virtual size is 4G. If you need more space you must resize it offline like this: unxz --keep stage4-disk.img.xz truncate -s 20G stage4-disk.img e2fsck -fp stage4-disk.img resize2fs stage4-disk.img If you are writing the disk image to an SD card you could do: xzcat stage4-disk.img.xz > /dev/sdX e2fsck -fp /dev/sdX resize2fs /dev/sdX QEMU ---- Assuming you don't have real hardware, we recommend using QEMU. One of the following versions should work: * Upstream qemu from git + this patch to work around a problem with the FPU: http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg06483.html * qemu >= 2.12.0 from Fedora Rawhide (earlier versions will not work). This includes the FPU workaround. * The prebuilt qemu packages here: https://copr.fedorainfracloud.org/coprs/rjones/riscv/ This includes the FPU workaround. This is the suggested command line: qemu-system-riscv64 \ -nographic \ -machine virt \ -smp 4 \ -m 2G \ -kernel bbl \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -append "console=ttyS0 ro root=/dev/vda" \ -device virtio-blk-device,drive=hd0 \ -drive file=stage4-disk.img,format=raw,id=hd0 \ -device virtio-net-device,netdev=usernet \ -netdev user,id=usernet,hostfwd=tcp::10000-:22 SSH access ---------- The QEMU command tries to forward port 10000 on the host to port 22 on the guest, which should be running the OpenSSH server: ssh -p 10000 root@localhost root@localhost's password: riscv Inside the guest ---------------- (1) The root password is: riscv (2) You may have to run rpmbuild like this: rpmbuild --undefine _annotated_build --define "debug_package %{nil}" ... (3) ‘nano’ and ‘vi’ are available as editors in the base image. ‘emacs-nox’ can be installed using dnf. (4) We use ‘dnf versionlock’ to lock the version of GCC to a specific version (to avoid GCC 8 being pulled in right now). To override the lock you will need to use ‘dnf versionlock clear’. Creating a root filesystem / tar file ------------------------------------- virt-tar-out -a stage4-disk.img / - > rootfs.tar Note that when unpacking this you must run tar as root and use ‘tar --acls --selinux --xattrs’ to preserve all attributes. Contacting us ------------- IRC channel #fedora-riscv on FreeNode