No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= Build Fedora Image for RISC-V development board = | https://riscv.rocks= Build Fedora Image for RISC-V development board = | ||
== Environment == | == Environment == | ||
We use [http://fedora.riscv.rocks/kojifiles/work/tasks/8517/1128517/Fedora-Developer-Rawhide-20210421.n.0-sda.raw.xz latest Fedora Qemu image for RISC-V64] from [https://riscv.rocks riscv.rocks] to boot a RISC-V Qemu for building a Fedora Remix image. | We use [http://fedora.riscv.rocks/kojifiles/work/tasks/8517/1128517/Fedora-Developer-Rawhide-20210421.n.0-sda.raw.xz latest Fedora Qemu image for RISC-V64] from [https://riscv.rocks riscv.rocks] or [http://openkoji.iscas.ac.cn/pub/dl/Fedora-Developer-Rawhide-20210421.n.0-sda.raw.xz a mirror in China] to boot a RISC-V Qemu for building a Fedora Remix image. | ||
== Appliance == | == Appliance == | ||
Line 18: | Line 18: | ||
<pre> | <pre> | ||
$ wget | $ wget http://openkoji.iscas.ac.cn/pub/dl/fw_payload-uboot-qemu-virt-smode.bin | ||
</pre> | </pre> | ||
Line 56: | Line 56: | ||
* Prepare kick start file | * Prepare kick start file | ||
The original Kickstart files is from [https://riscv.rocks riscv.rocks]: [http://fedora.riscv.rocks:3000/davidlt/fedora-riscv-kickstarts.git fedora-riscv-kickstarts]. | |||
Your own kick start file can be modified from these files. | |||
For Allwinner D1, the kickstart file REPO is [https://gitee.com/etux/fedora_on_riscv64_allwinner_d1_kickstart here] . | |||
For StarFive Starlight Board, the kickstart file REPO is [https://gitee.com/etux/fedora_on_riscv64_jh7100_kickstart here] . | |||
* Run appliance tool to build new image | * Run appliance tool to build new image |
Revision as of 09:54, 5 September 2021
https://riscv.rocks= Build Fedora Image for RISC-V development board =
Environment
We use latest Fedora Qemu image for RISC-V64 from riscv.rocks or a mirror in China to boot a RISC-V Qemu for building a Fedora Remix image.
Appliance
Appliance-tools is used to build Fedora images, which has already installed in the image.
- Download image and Uncompress
$ wget http://fedora.riscv.rocks/kojifiles/work/tasks/8517/1128517/Fedora-Developer-Rawhide-20210421.n.0-sda.raw.xz $ xz -d Fedora-Developer-Rawhide-20210421.n.0-sda.raw.xz
- Download Firmware
$ wget http://openkoji.iscas.ac.cn/pub/dl/fw_payload-uboot-qemu-virt-smode.bin
- Resize images
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 root file system on Qemu
# growpart /dev/vda 2 # resize2fs /dev/vda2
- Prepare kick start file
The original Kickstart files is from riscv.rocks: fedora-riscv-kickstarts.
Your own kick start file can be modified from these files.
For Allwinner D1, the kickstart file REPO is here .
For StarFive Starlight Board, the kickstart file REPO is here .
- Run appliance tool to build new image
# appliance-creator -c kickstartfile.ks \ --cache /cache/dir \ --format raw --name image-name \ --version image-version \ --release image-release \ -o /output/dir