In this post, I will share how I brought up and ran three different RISC-V Linux distributions – Debian, Ubuntu and Fedora, on the Starfive VisionFive 2 system I built earlier. There is already plenty of documentation on running various linux distros on VF2. I will focus on specific tweaks I needed to do and other integration work like serial console which is critical for the purpose of my home lab – Linux kernel and open source firmware development. Also, if I am saying something that is too obvious in the embedded systems world or incorrect, my apologies. My past experience has been entirely on large servers and this is somewhat new territory for me.
JH7110 boot details
Boot modes
JH7110 supports 4 boot modes – SPI Flash, SDIO3.0, eMMC and UART. Of these, I have tested SPI flash and SDIO3.0 boot. The first step towards bringing up the board is to set the boot mode to whatever device you want to boot from. The boot mode is selected using a 2-bit boot mode selection switch as described in this page. At boot, the system executes BOOTROM code at 0x2A00_0000. Depending on the boot mode switch setting, the subsequent SW is loaded from the corresponding devices. At the time of writing this post, I have only tested booting from flash and booting from SDIO.
Booting from SPI flash
By default, SW shipped by Starfive uses u-boot ecosystem as SPL and bootloader. The SPI flash comes pre-loaded with a version of of u-boot SPL and bootloader. It can also later be flashed with update versions of its contents.
Offset | Length | Object | Comments |
0 | 0x80000 | u-boot SPL | |
0xF0000 | 0x10000 | u-boot environment variables | |
0x100000 | 0x400000 | fw_payload.img (combined binary of OpenSBI and U-boot core) | |
0x600000 | 0x1000000 | Reserved |
The boot mode switch setting would look like the following :

In the picture above, RGPIO_0 and RGPIO_1 both are set to 0 which forces boot from flash.
Booting from SDIO
When booted via SDIO, the SD card is expected to have the bootloader and OS components in the following format :
Offset | Length | Object | Comments |
0 | 0x200 | GPT PMBR | |
0x200 | 0x200 | GPT Header | |
0x400 | 0x1FFC00 | Reserved | |
0x200000 | 0x200000 | Reserved | U-boot SPL (partition 1) |
0x400000 | 0x400000 | Reserved | fw_payload.img (OpenSBI + U-boot core) (partition 2) |
0x800000 | 0x12400000 | initramfs + UEnv.txt | Fat 16 with initrd, UEnv.txt (partition 3) |
0x12C00000 | End of disk | System rootfs | rootfs for Linux distro (partition 4) |
The boot mode setting would look like the following:

In this case RGPIO_0 = 1 and RGPIO_1 = 0 which forces boot from SD card.
A quick look at an SD card (/dev/sdb in my laptop) with the Starfive debian RISC-V image shows this :
[dipankar@conan spl]$ sudo fdisk /dev/sdb [sudo] password for dipankar: Welcome to fdisk (util-linux 2.38.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. GPT PMBR size mismatch (5529599 != 249737215) will be corrected by write. The backup GPT table is not on the end of the device. This problem will be corrected by write. Command (m for help): p Disk /dev/sdb: 119.08 GiB, 127865454592 bytes, 249737216 sectors Disk model: Micro SD Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E Device Start End Sectors Size Type /dev/sdb1 4096 8191 4096 2M HiFive BBL /dev/sdb2 8192 16383 8192 4M HiFive FSBL /dev/sdb3 16384 221183 204800 100M EFI System /dev/sdb4 221184 5527518 5306335 2.5G Linux filesystem Command (m for help): [dipankar@conan ~]$ df | grep sdb3 /dev/sdb3 102156 22962 79194 23% /run/media/dipankar/4D59-21CE [dipankar@conan ~]$ cd /run/media/dipankar/4D59-21CE/ [dipankar@conan 4D59-21CE]$ ls config-5.15.0-starfive initrd.img-5.15.0-starfive vmlinuz-5.15.0-starfive dtbs System.map-5.15.0-starfive extlinux uEnv.txt [dipankar@conan 4D59-21CE]$cat uEnv.txt fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff kernel_addr_r=0x44000000 kernel_comp_addr_r=0x90000000 kernel_comp_size=0x10000000 fdt_addr_r=0x48000000 ramdisk_addr_r=0x48100000 # Move distro to first boot to speed up booting boot_targets=distro mmc0 dhcp # Fix wrong fdtfile name fdtfile=starfive/jh7110-visionfive-v2.dtb # Fix missing bootcmd bootcmd=run load_distro_uenv;run bootcmd_distro
In this example (sd card created from the Starfive official debian binary image), sdb1 has U-boot SPL and sdb2 has fw_payload.img (OpenSBI + U-boot). sdb3 is the FAT16 filesystem with initrd and kernel. sdb4 is the rootfs of the Linux distro.
Debian (from Starfive) RISC-V
Starfive provides pre-built debian images here that can be used to boot the VF2 board. In the build directory, you can find images (starfive-jh7110-VF2-<Version>.img) different types of devices – SD, EMMC, NVME etc. I use MicroSD card in the TF slot to boot the VF2 board. The flashing instructions are provided here. The flashing program balenoEther is distributed in appimage format and can be executed as is after downloaded to flash the debian image onto an SD card. When flashed, the pre-built image creates a disk with the format described in the Booting from SDIO section above. The boot mode switch setting should be set to “SDIO” mode (RGPIO_0 = 1, RGPIO_1 = 0) in this case. If set this way, u-boot SPL and other bootloader components will all be loaded from the SD card (rather than the SPI flash). This allows one to experiment with a custom SW stack without disturbing the SPI flash. It automatically comes with serial console enabled and you get both u-boot as well as Linux console prompts on serial console.
U-Boot 2021.10-dirty (Jun 11 2023 - 07:44:44 +0000), Build: jenkins-VisionFive2-SDK-Components-135 CPU: rv64imacu_zba_zbb Model: StarFive VisionFive V2 DRAM: 8 GiB MMC: sdio0@16010000: 0, sdio1@16020000: 1 Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment StarFive EEPROM format v2 --------EEPROM INFO-------- Vendor : StarFive Technology Co., Ltd. Product full SN: VF7110B1-2253-D008E000-00005257 data version: 0x2 PCB revision: 0xb2 BOM revision: A Ethernet MAC0 address: 6c:cf:39:00:4c:6e Ethernet MAC1 address: 6c:cf:39:00:4c:6f --------EEPROM INFO-------- In: serial Out: serial Err: serial Model: StarFive VisionFive V2 Error: 1 bit/pixel mode, but BMP has 24 bit/pixel Net: eth0: ethernet@16030000, eth1: ethernet@16040000 bootmode sd device 1/0 Hit any key to stop autoboot: 0 StarFive # boot Failed to load 'vf2_uEnv.txt' Importing environment from 1/0 ... ## Info: input data size = 482 = 0x1E2 ## Error: "boot2" not defined 406 bytes read in 5 ms (79.1 KiB/s) ## Warning: defaulting to text format 50235 bytes read in 9 ms (5.3 MiB/s) libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND 50235 bytes written in 30 ms (1.6 MiB/s) Retrieving file: /extlinux/extlinux.conf 792 bytes read in 7 ms (110.4 KiB/s) U-Boot menu 1: Debian GNU/Linux bookworm/sid 5.15.0-starfive 2: Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target) Enter choice: [Snipped] [ OK ] Started LSB: My shell script. [ OK ] Finished Load/Save Random Seed. [ OK ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots. [ OK ] Started Disk Manager. [ OK ] Started GNOME Display Manager. Debian GNU/Linux bookworm/sid starfive hvc0 starfive login: Debian GNU/Linux bookworm/sid starfive ttyS0 starfive login: starfive login: Debian GNU/Linux bookworm/sid starfive ttyS0 starfive login:
More details on Debian on VF2 are here.
Ubuntu RISC-V
I followed these instructions to boot and run ubuntu RISC-V on VF2 first. The ubuntu SD image doesn’t have SPL and u-boot core firmware, so you have to boot from the SPI flash device by setting the boot mode switches accordingly.
The first step is upgrading the flash to have the latest u-boot SPL and u-boot firmware. The official u-boot build provided in VisionFive2 Software 3.1.5 didn’t work for me, so I am using my own build of u-boot. The “Compiling U-boot and Kernel” section of the VF2 guide has the detailed instructions on this. After compiling U-boot and OpenSBI, you also need to create the SPL image and FW payload using the following instructions :
After that I followed these instructions for upgrading the SPL and U-boot in flash. I booted from a working SD card and used the flashcp command to flash the relevant files into the flash.
root@rv-vf2-2:~/firmware# apt install -y mtd-utils Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libiniparser1 The following NEW packages will be installed: libiniparser1 mtd-utils 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 246 kB of archives. After this operation, 1144 kB of additional disk space will be used. Get:1 https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable /main riscv64 libiniparser1 riscv64 4.1-6 [9396 B] Get:2 https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable /main riscv64 mtd-utils riscv64 1:2.1.5-1 [236 kB] Fetched 246 kB in 33s (7411 B/s) Selecting previously unselected package libiniparser1:riscv64. (Reading database ... 76913 files and directories currently installed.) Preparing to unpack .../libiniparser1_4.1-6_riscv64.deb ... Unpacking libiniparser1:riscv64 (4.1-6) ... Selecting previously unselected package mtd-utils. Preparing to unpack .../mtd-utils_1%3a2.1.5-1_riscv64.deb ... Unpacking mtd-utils (1:2.1.5-1) ... Setting up libiniparser1:riscv64 (4.1-6) ... Setting up mtd-utils (1:2.1.5-1) ... Processing triggers for man-db (2.11.1-1) ... Processing triggers for libc-bin (2.36-6) ... root@rv-vf2-2:~/firmware# cat /proc/mtd dev: size erasesize name mtd0: 00040000 00001000 "spl" mtd1: 00300000 00001000 "uboot" mtd2: 00100000 00001000 "data" root@rv-vf2-2:~/firmware# flashcp -v u-boot-spl.bin.normal.out /dev/mtd0 Erasing blocks: 33/33 (100%) Writing data: 129k/129k (100%) Verifying data: 129k/129k (100%) root@rv-vf2-2:~/firmware# flashcp -v visionfive2_fw_payload.img /dev/mtd1 Erasing blocks: 722/722 (100%) Writing data: 2887k/2887k (100%) Verifying data: 2887k/2887k (100%) root@rv-vf2-2:~/firmware# apt install -y mtd-utils Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libiniparser1 The following NEW packages will be installed: libiniparser1 mtd-utils 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 246 kB of archives. After this operation, 1144 kB of additional disk space will be used. Get:1 https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable /main riscv64 libiniparser1 riscv64 4.1-6 [9396 B] Get:2 https://snapshot.debian.org/archive/debian-ports/20221225T084846Z unstable /main riscv64 mtd-utils riscv64 1:2.1.5-1 [236 kB] Fetched 246 kB in 33s (7411 B/s) Selecting previously unselected package libiniparser1:riscv64. (Reading database ... 76913 files and directories currently installed.) Preparing to unpack .../libiniparser1_4.1-6_riscv64.deb ... Unpacking libiniparser1:riscv64 (4.1-6) ... Selecting previously unselected package mtd-utils. Preparing to unpack .../mtd-utils_1%3a2.1.5-1_riscv64.deb ... Unpacking mtd-utils (1:2.1.5-1) ... Setting up libiniparser1:riscv64 (4.1-6) ... Setting up mtd-utils (1:2.1.5-1) ... Processing triggers for man-db (2.11.1-1) ... Processing triggers for libc-bin (2.36-6) ... root@rv-vf2-2:~/firmware# cat /proc/mtd dev: size erasesize name mtd0: 00040000 00001000 "spl" mtd1: 00300000 00001000 "uboot" mtd2: 00100000 00001000 "data" root@rv-vf2-2:~/firmware# flashcp -v ./u-boot-spl.bin.normal.out /dev/mtd0 Erasing blocks: 33/33 (100%) Writing data: 129k/129k (100%) Verifying data: 129k/129k (100%) root@rv-vf2-2:~/firmware# flashcp -v ./visionfive2_fw_payload.img /dev/mtd1 Erasing blocks: 722/722 (100%) Writing data: 2885k/2885k (100%) Verifying data: 2885k/2885k (100%)
I tested the upgraded flash with a reboot (still running the Starfive debian image) to make sure that I had a sane board booting ubuntu.
For burning the ubuntu RISC-V image on an SD card, used these instructions. After that, I switched the boot mode to SPI flash (RGPIO_0 = 0, RGPIO_1 = 0), inserted the ubuntu SD card and booted.

[ 94.079443] cloud-init[1358]: Cloud-init v. 23.1.1-0ubuntu2 finished at Sun, 06 Aug 2023 10:14:00 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]. Up 94.05 seconds [ OK ] Finished cloud-final.servi… Execute cloud user/final scripts. [ OK ] Reached target cloud-init.target - Cloud-init target. ubuntu login: Ubuntu Lunar Lobster (development branch) ubuntu ttyS0 ubuntu login: ubuntu@ubuntu:~$ uname -a Linux ubuntu 6.2.0-19-generic #19.1-Ubuntu SMP Fri Mar 31 12:41:53 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
Fedora RISC-V
Starfive has not officially released a fedora build for the VF2 board yet. However, RV Space forum mentions an unofficial Fedora 37 build. Also Bas Opvolger describes booting fedora on his VF2 board in this github page. I roughly built on those experiences and found a path to boot fedora 37 on VF2. A number of approaches did not work – e.g. using the boot partition (ext4) from the unofficial Fedora 37 RISC-V image. Even though u-boot can read ext4 partitions and load from there, the default u-boot environment expects a vfat partition as boot partition. Also, the stock kernel that came with the fedora 37 unofficial build did not work. In this section, I describe the various steps I undertook to get Fedora 37 running on the VF2 board.
Boot mode and media
In order to keep things as close to an working distro, I am using SDIO mode for booting (RGPIO_0 = 1, RGPIO_1 = 0). This allows everything including u-boot spl and boot partition to be customized easily. To keep things simple, I started with an official Starfive debian SD card image and gradually converted it to boot a fedora root partition.
Prparing the SD card
By default the Starfive debian image uses a 105MB partition as the boot partition (partition 3). The debian root filesystem (partition 4) is also only 2.8GB. This will not likely work for Fedora, so I deleted these two partitions and created bigger versions of the same partitions with the same type : EFI System partition as /boot (1GB) and Linux (ext4) partition as root filesystem (10GB).
[dipankar@conan ~]$ sudo fdisk /dev/sdb [sudo] password for dipankar: Welcome to fdisk (util-linux 2.38.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 59.48 GiB, 63864569856 bytes, 124735488 sectors Disk model: Micro SD Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E Device Start End Sectors Size Type /dev/sdb1 4096 8191 4096 2M HiFive BBL /dev/sdb2 8192 16383 8192 4M HiFive FSBL /dev/sdb3 16384 2113535 2097152 1G EFI System /dev/sdb4 2113536 23085055 20971520 10G Linux filesystem
To be on the safe side, I built updated u-boot and updated the SD card (with the official Starfive debian image) with the recently built firmware – U-boot SPL (partition 1) and U-boot bootloader (partition 2).
[dipankar@conan spl]$ lsblk /dev/sdb NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sdb 8:16 1 59.5G 0 disk ├─sdb1 8:17 1 2M 0 part ├─sdb2 8:18 1 4M 0 part ├─sdb3 8:19 1 1G 0 part /run/media/dipankar/__boot └─sdb4 8:20 1 10G 0 part /run/media/dipankar/__ [dipankar@conan spl]sudo dd if=./u-boot-spl.bin.normal.out of=/dev/sdb1 conv=fsync [sudo] password for dipankar: 258+1 records in 258+1 records out 132304 bytes (132 kB, 129 KiB) copied, 0.0220621 s, 6.0 MB/s [dipankar@conan uboot_its]$ sudo dd if=visionfive2_fw_payload.img of=/dev/sdb2 conv=fsync 5771+1 records in 5771+1 records out 2954837 bytes (3.0 MB, 2.8 MiB) copied, 0.297375 s, 9.9 MB/s
Boot partition
I updated the newly created 1GB boot partition (partition 3) by copying the contents of partition 3 in the Starfive debian image.
[dipankar@conan fedora]$ sudo losetup -f -P starfive-jh7110-202306-SD-minimal-desktop.img [dipankar@conan dipankar]$ losetup -l NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop1 0 0 0 0 /home/dipankar/src2/riscv/lab/vf2/starfive/202306/starfive-jh7110-202306-SD-minimal-desktop.img 0 512 /dev/loop0 0 0 0 0 /home/dipankar/src2/riscv/lab/vf2/fedora/Fedora-Developer-37-20221130.n.0-mmc.raw.img 0 512 [dipankar@conan dipankar]$ sudo mkfs.fat /dev/sdb3 mkfs.fat 4.2 (2021-01-31) [dipankar@conan dipankar]$ mkdir tmp/vf2_boot tmp/vf2_root [dipankar@conan ~]$ sudo mount /dev/sdb3 tmp/vf2_boot/ [dipankar@conan ~]$ lsblk /dev/loop1 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop1 7:1 0 2.6G 0 loop ├─loop1p1 259:14 0 2M 0 part ├─loop1p2 259:15 0 4M 0 part ├─loop1p3 259:16 0 100M 0 part /run/media/dipankar/4D59-21CE └─loop1p4 259:17 0 2.5G 0 part [dipankar@conan ~]$ sudo cp -r /run/media/dipankar/4D59-21CE/* tmp/vf2_boot/
At this point in time, the boot partition has the old debian boot content – extlinux.conf, kernel and initrd. Later I modify some of these to switch over to fedora.
root partition
For the root partition, I used this image provided by the unofficial fedora 37 build. This is for mmc controller. If you are not booting from SD or eMMC, you need to choose an alternative image. I loop mounted the image and copied the root partition (partition 4) to the corresponding partition in the SD card.
[dipankar@conan ~]$ lsblk /dev/loop0 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 10G 0 loop ├─loop0p1 259:10 0 1M 0 part ├─loop0p2 259:11 0 4M 0 part ├─loop0p3 259:12 0 1G 0 part └─loop0p4 259:13 0 9G 0 part [dipankar@conan ~]$ sudo dd bs=1M if=/dev/loop0p4 of=/dev/sdb4 conv=fsync [sudo] password for dipankar: 9210+1 records in 9210+1 records out 9658399232 bytes (9.7 GB, 9.0 GiB) copied, 359.509 s, 26.9 MB/s
For the root partition to work, I made the following changes to it after mounting it :
- Edit /etc/fstab in the root partition and change the UUIDs of the devices to be mounted to that of the boot and the root partitions.
- Edit /etc/yum.repos.d/*.repo to disable all the existing repos and then edit /etc/yum.repos.d/fedora.repo to point to the correct RISC-V fedora repository.
[dipankar@conan linux]$ sudo blkid /dev/sdb4 /dev/sdb4: LABEL="_/" UUID="d9334329-e2ad-4b72-8f5f-b61406e9d461" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bfa55429-3739-fa40-acd1-c6ab0e98263a" [dipankar@conan linux]$ sudo blkid /dev/sdb3 /dev/sdb3: UUID="342A-35CD" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="c935eac9-7dd1-e54c-8a94-c25147786ffd" [dipankar@conan ~]cat tmp/vf2_root/etc/fstab UUID=d9334329-e2ad-4b72-8f5f-b61406e9d461 / ext4 defaults,noatime,x-systemd.device-timeout=300s,x-systemd.mount-timeout=300s 0 0 UUID=342A-35CD /boot vfat defaults,noatime,x-systemd.device-timeout=300s,x-systemd.mount-timeout=300s 0 0 [dipankar@conan linux]$ sudo cat ~/tmp/vf2_root/etc/yum.repos.d/fedora.repo [fedora] name=Fedora $releasever - $basearch baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/37/latest/riscv64/ #metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 countme=1 metadata_expire=6h repo_gpgcheck=0 type=rpm gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch skip_if_unavailable=False
Building the kernel for VF2
The kernel shipping with the unofficial f37 build did not work on the VF2 board. So, I built a fresh one from Starfive linux kernel github repository (JH7110_VisionFive2_devel branch) and installed it locally in a directory in compressed format. Later I copy it to the boot filesystem.
[dipankar@conan linux]$ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- starfive_jh7110_defconfig [dipankar@conan linux]$ make -j 10 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- EXTRAVERSION=-vf2 [dipankar@conan linux]$ make -j 10 EXTRAVERSION=-vf2 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- INSTALL_PATH=~/src2/riscv/lab/vf2/starfive/kernel zinstall
I chose the JH7110_VisionFive2_devel branch because that seemed to have recent code drops. The upstream branch seemed a bit dated.
Preparing the boot partition for booting
With a freshly built RISC-V kernel for VF2, I readied the boot partition with the following steps :
- Copy the kernel over to the boot partition in the SD card.
- Modify extlinux/extlinux.conf to define the boot menu for u-boot
[dipankar@conan linux]$ sudo cp ../kernel/* ~/tmp/vf2_boot/ [dipankar@conan linux]$ ls ~/tmp/vf2_boot/ config-5.15.0-starfive dtbs extlinux initrd.img-5.15.0-starfive System.map-5.15.0-starfive System.map-5.15.0-vf2 uEnv.txt vmlinuz-5.15.0-starfive vmlinuz-5.15.0-vf2 [dipankar@conan linux]$ sudo cat ~/tmp/vf2_boot/extlinux/extlinux.conf # extlinux.conf generated by appliance-creator default l0 menu title U-Boot menu prompt 0 timeout 50 label l0 menu label Fedora Linux 5.15.0-vf2 linux /vmlinuz-5.15.0-vf2 initrd /initrd.img-5.15.0-starfive fdtdir /dtbs append root=/dev/mmcblk1p4 rw rhgb quiet LANG=en_US.UTF-8 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 label l0r menu label Fedora Linux 5.15.0-vf2 (rescue) linux /vmlinuz-5.15.0-vf2 initrd /initrd.img-5.15.0-starfive fdtdir /dtbs append root=/dev/mmcblk1p4 rw rhgb quiet LANG=en_US.UTF-8 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single
Note that I am still using the initrd shipped with the Starfive official debian distro image as well as the dtb files shipped with it. I edited the kernel command line to enable serial console on ttyS0.
With these changes in place in the SD card, fedora 37 booted on my VF2 via that SD card. There are a number of errors in starting various services though, so there is work to be done to clean them up by either getting the kernel configuration right or code fixes in future. But since I am mostly interested in Linux (kernel) side of things in the home lab, this would do fine.
[ OK ] Reached target basic.target - Basic System. Starting avahi-daemon.serv…e - Avahi mDNS/DNS-SD Stack... Starting dkms.service …new kernel modules through DKMS... [ OK ] Started dnscrypt-proxy.ser…Encrypted/authenticated DNS proxy. Starting dracut-shutdown.s…tore /run/initramfs on shutdown... Starting firewalld.service…walld - dynamic firewall daemon... Starting flatpak-add-fedor…Add Fedora flatpak repositories... Starting livesys.serviceB: Init script for live image.... Starting power-profiles-da…ice - Power Profiles daemon... Starting rtkit-daemon.serv…meKit Scheduling Policy Service... Starting sshd-keygen@ecdsa…SSH ecdsa Server Key Generation... Starting sshd-keygen@ed255…H ed25519 Server Key Generation... Starting sshd-keygen@rsa.s…enSSH rsa Server Key Generation... [ OK ] Reached target nss-user-lo…[0m - User and Group Name Lookups. Starting accounts-daemon.service - Accounts Service... Starting switcheroo-contro…witcheroo Control Proxy service... Starting sysstat.service - Resets System Activity Logs... Starting systemd-logind.se…ice - User Login Management... Starting systemd-machined.… Container Registration Service... Starting udisks2.service - Disk Manager... Starting upower.service - Daemon for power management... [ OK ] Finished dracut-shutdown.s…estore /run/initramfs on shutdown. Starting dbus-broker.servi… - D-Bus System Message Bus... [ OK ] Finished sysstat.service - Resets System Activity Logs. [ OK ] Finished sshd-keygen@ecdsa…enSSH ecdsa Server Key Generation. [ OK ] Finished sshd-keygen@ed255…SSH ed25519 Server Key Generation. [ OK ] Started dbus-broker.service - D-Bus System Message Bus. [ OK ] Started systemd-machined.s…nd Container Registration Service. [ OK ] Started avahi-daemon.service - Avahi mDNS/DNS-SD Stack. [ OK ] Started systemd-logind.service - User Login Management. [ OK ] Started rtkit-daemon.servi…timeKit Scheduling Policy Service. [ OK ] Started switcheroo-control… Switcheroo Control Proxy service. Starting polkit.service - Authorization Manager... [ OK ] Started upower.service - Daemon for power management. [ OK ] Finished dkms.service …l new kernel modules through DKMS. [ OK ] Finished flatpak-add-fedor…- Add Fedora flatpak repositories. [ OK ] Started polkit.service - Authorization Manager. [ OK ] Started accounts-daemon.service - Accounts Service. [ OK ] Started power-profiles-dae…rvice - Power Profiles daemon. [ OK ] Started udisks2.service - Disk Manager. [ OK ] Started livesys.serviceSB: Init script for live image.. Starting chronyd.service - NTP client/server... [ OK ] Started chronyd.service - NTP client/server. [ OK ] Started firewalld.servicerewalld - dynamic firewall daemon. [ OK ] Reached target network-pre…get - Preparation for Network. Starting NetworkManager.service - Network Manager... [ OK ] Started NetworkManager.service - Network Manager. [ OK ] Reached target network.target - Network. Starting NetworkManager-wa…m - Network Manager Wait Online... Starting gssproxy.service - GSSAPI Proxy Daemon... Starting systemd-hostnamed.service - Hostname Service... [ OK ] Started gssproxy.service - GSSAPI Proxy Daemon. [ OK ] Reached target nfs-client.target - NFS client services. [ OK ] Reached target remote-fs-p…eparation for Remote File Systems. [ OK ] Reached target remote-fs.target - Remote File Systems. Starting systemd-user-sess…vice - Permit User Sessions... Starting virtqemud.service…0m - Virtualization qemu daemon... [ OK ] Finished systemd-user-sess…ervice - Permit User Sessions. Starting gdm.service - GNOME Display Manager... Starting plymouth-quit-wai… until boot process finishes up... [ OK ] Started gdm.service - GNOME Display Manager. Welcome to the Fedora/RISC-V disk image https://fedoraproject.org/wiki/Architectures/RISC-V Build date: Wed Nov 30 12:50:14 UTC 2022 Kernel 5.15.0-vf2 on an riscv64 (ttyS0) The root password is 'fedora_rocks!'. root password logins are disabled in SSH starting Fedora 31. User 'riscv' with password 'fedora_rocks!' in 'wheel' group is provided. To install new packages use 'dnf install ...' To upgrade disk image use 'dnf upgrade --best' If DNS isn’t working, try editing ‘/etc/yum.repos.d/fedora-riscv.repo’. For updates and latest information read: https://fedoraproject.org/wiki/Architectures/RISC-V Fedora/RISC-V -------------------- Koji: http://fedora.riscv.rocks/koji/ SCM: http://fedora.riscv.rocks:3000/ Distribution rep.: http://fedora.riscv.rocks/repos-dist/ Koji internal rep.: http://fedora.riscv.rocks/repos/ fedora-riscv login:
Further note : After I am done with some other experiments with the VF2 board, I will get back to Fedora on VF2 and see if I can clean up the booting and running.