From Fedora Project Wiki

Build Fedora Image for RISC-V development board

Making Image by Appliance-tools

Appliance-tools is used to build Fedora images, which has already installed in the image.

Setup Environment

We use latest Fedora Qemu image for RISC-V64 from or a mirror in China to boot a RISC-V Qemu for building a Fedora Remix image.

Run Fedora on QEMU

Download Pre-build image and Uncompress

$ wget
$ xz -d Fedora-Developer-Rawhide-20210421.n.0-sda.raw.xz

Download Firmware

$ wget

Resize Image

The original image size is not enough for image building, we need enlarge it first.

$ qemu-img resize Fedora-Developer-Rawhide-20210421.n.0-sda.raw +40G

Boot RISC-V Qemu

qemu-system-riscv64    -nographic \
                       -machine virt \
                       -smp 4 \
                       -m 2G \
                       -kernel fw_payload-uboot-qemu-virt-smode.bin \
                       -bios none \
                       -object rng-random,filename=/dev/urandom,id=rng0 \
                       -device virtio-rng-device,rng=rng0 \
                       -device virtio-blk-device,drive=hd0 \
                       -drive file=Fedora-Developer-Rawhide-20210421.n.0-sda.raw,format=raw,id=hd0 \
                       -device virtio-net-device,netdev=usernet \
                       -netdev user,id=usernet,hostfwd=tcp::10000-:22

Resize rootfs on Qemu

# growpart /dev/vda 2
# resize2fs /dev/vda2
# reboot

Prepare kick start file

The original Kickstart files is from fedora-riscv-kickstarts.

The kick start file for a specific board can be modified from these files.

For Allwinner D1, the example kickstart file REPO is here .

For StarFive Starlight Board, the example kickstart file REPO is here .

Run appliance tool to build a new image on QEMU

On QEMU, boot into Fedora Image, then

IMAGE_RELEASE=`date +%Y%m%d-%H%M%S`
appliance-creator -c kickstartfile.ks \
                  --cache ${CACHE_DIR} \
                  --format raw \
                  --name ${IMAGE_NAME} \
                  --version ${IMAGE_VERSION} \
                  --release ${IMAGE_RELEASE} \
                  -o ${OUTPUT_DIR}

The result will be in the current dir, named Fedora-d1-riscv64-developer-xfce-with-esp-Rawhide-*.raw.xz

Alternative: build Image by

We also can build RISC-V images by

Please follow register work flow to register an account in

Repo to control tasks on []( should be hosting on []( site. The repo URL should be sent to admin of []( on register.

[This file]( is an example of for image build task.


We need proper kickstart files to control image build.

Follow web hook setup workflow to configure task trigger web hooks.

The instruction can be found on koji web.