Just from an observation, it might have something to do with needing to run this on RISC-V. I will try that soon. You could use a QEMU instance to emulate RISC-V and use an already existing instance.
Thomas Stewart wrote debian sid vmdb2 yaml file for the VF2 which is clear and concise.
I wish there could be a way to create the starfive-visionfive2 fedora silverblue image in a similar way to simplify it.
The two obstacles I have are:
- creating the same layout with btrfs as it is for x86_64
- applying the ostree stuff somewhere on top of that to make it silverblueāey
Is it possible?
FYI there is another gentleman capable of building images for a number of systems as well using ImageBuilder. He also has a Debian Sid image available for the VF2:
I didnāt build a VF2 Fedora Silverblue yet, but I got Fedora 37 running within nspawn with init.
Iām hoping somebody else would know other steps to get us closer to build a silverblue image with that.
Unfortunately docker/podman and accessories are not available directly on the koji repo to install and I think osbuilder relies on those maybe.
I can get a fedora 37 (not silver blue) image to build without selinux. In order to modify a fedora image to boot you just need to bring your own kernel and maybe initrd.You can boot Debian or what ever then chroot into the fedora rootfs then generate the initrd with dracut --kver
. Then you can set your boot loader to boot correctly (u-boot).
Here is a question someone else might know, what CPU arches does silver blue support? I only see aarch64, ppc and x86_64. Does it take Fedoraās rpmās then do something special with it? What would be needed to setup a new arch?
rpm-ostree uses plain old non-silverblue rpms to install into its versioned filesystem managed by ostree.
dnf doesnāt talk ostree, but rpm-ostree does.
I discovered this recipe to build an fedora 33 riscv image:
Directly on the VisionFive 2 board with the debian sid image on a 128GB sdcard, and avoiding the sources and using the pre-built debian binaries as much as possible, Iām trying to follow the steps.
All the debian sid packages installed were more recent versions of course.
sudo apt-cache search ostree
sudo apt-get install ostree
sudo apt-cache search rclone
sudo apt-get install rclone
sudo apt-cache search podman
sudo apt-get install podman
sudo apt-cache search runc
sudo apt-get install runc
sudo apt-cache search containernetworking
sudo apt-get install containernetworking-plugins
sudo apt-cache search containers |grep common
sudo apt-get install golang-github-containers-common liblxc-common
sudo modprobe tun
mkdir helloworld
cd helloworld/
gcc -static hello.c -o hello
podman build . -t helloworld
podman run --network=host --privileged helloworld
Hello from Docker!
This message shows that your installation appears to be working correctly.
Mr. T Ravier and Mr. Will were very helpful and appreciate it.
Note the following is for x86_64 silverblue image, but itās certainly a good inspiration for making the riscv64 image for the VF2.
The steps found within:
https://pagure.io/fedora-qa/os-autoinst-distri-fedora/blob/main/f/tests/_ostree_build.pm
And these logs are very helpful since they hold real-world command steps to build the image.
https://openqa.fedoraproject.org/tests/1771475/file/_ostree_build-lorax.log
https://openqa.fedoraproject.org/tests/1771475/file/_ostree_build-ostree.log
Now all I have to do is invest effort to understand each step and clarify what needs tweaking for the vf2.
Thanks for this link! I just got my hands on one of these and wanted to set up a wireguard VPN server just to see if I could. Would love to be able to use Silverblue like I do everywhere else, and hopefully we can get a newer kernel as well
Hello @kxra ,
Just asking from the technical perspective, but wouldnāt it be more appropriate to use FCOS instead of SB for a server? I mean it is intended for that purpose and is atomic.
For a server, yes youāre right. People may want to use their VisionFive2 as a general purpose computer though. I would definitely use a Fedora CoreOS image if one existed for VF2, since a desktop environment is not useful for my purposes.
From personal experience of falling down the rabbit hole of using FCOS as an ultimately configurable system from a declarative and opinionated POV, I can say for most workstation uses Silverblue I was thinking of, your own declarative yaml is the way to go. ie ā¦fork the SB repo and make changes to the way the images is built, then build it locally. There are a couple of people doing that, and I have seen their comments about it here. But I did make a FCOS ignition and install to bare metal just to test it out and see the differences between, and there are many more than I initially thought between SB and FCOS.
I know this is a little out of topic, but I just contributed a script that is able to build a kernel 6.1 and produce a bootable and working Fedora 38 (not Silverblue) image for the Starfive Visionfive 2 board here: GitHub - chainsx/fedora-riscv-builder
Just posting in case anyone wants to give it a shot.
Thank you for thinking of me Mr. Franco. Much appreciate it.
I noticed in your releases you generated a lichee img, but no vf2 image. I would prefer to just try your vf2 image if you can build/release one.
Iām running fedora 39 silverblue on x86_64 and itās been a while since I ran docker/podman to attempt a build.
Thanks again. Appreciate the feedback.
Hey @omac777, I donāt own the repo, I based the script to create the VisionFive 2 on the work done by the owner of that repo that did the Licheepi4a and contributed back the script there.
But I uploaded the image here if you want to test it out: Nextcloud
Iāll be working on creating a Fedora 39 image next and can share the results here.
Iām giving it a go with your image. Thank you
U-Boot SPL 2021.10 (Nov 29 2023 - 14:51:40 +0800)
LPDDR4: 8G version: g8ad50857.
Trying to boot from SPI
OpenSBI v1.2
/ __ \ / ____| _ _ _|
_ __ ___ _ __ | (___ | |) || |
ā \ / _ \ '_ \ ___ | _ < | |
| | |) | __/ | | |) | |) || |
_/| ./ _|| ||/|/___|_|
Platform Name : StarFive VisionFive V2
Platform Features : medeleg
Platform HART Count : 5
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 4000000Hz
Platform Console Device : uart8250
Platform HSM Device : ā
Platform PMU Device : ā
Platform Reboot Device : pm-reset
Platform Shutdown Device : pm-reset
Platform Suspend Device : ā
Firmware Base : 0x40000000
Firmware Size : 392 KB
Firmware RW Offset : 0x40000
Runtime SBI Version : 1.0
Domain0 Name : root
Domain0 Boot HART : 1
Domain0 HARTs : 0*,1*,2*,3*,4*
Domain0 Region00 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01 : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region02 : 0x0000000040040000-0x000000004007ffff M: (R,W) S/U: ()
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address : 0x0000000040200000
Domain0 Next Arg1 : 0x0000000042200000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Domain0 SysSuspend : yes
Boot HART ID : 1
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcbx
Boot HART ISA Extensions : none
Boot HART PMP Count : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 34
Boot HART MHPM Count : 2
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109
U-Boot 2021.10 (Oct 31 2023 - 19:41:27 +0800), Build: jenkins-github_visionfive2-19
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-00002621
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:36:43
Ethernet MAC1 address: 6c:cf:39:00:36:44
--------EEPROM INFO--------
In: serial
Out: serial
Err: serial
Model: StarFive VisionFive V2
Net: eth0: ethernet@16030000, eth1: ethernet@16040000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ā¦
Failed to load āvf2_uEnv.txtā
Warning: Input data exceeds 1048576 bytes - truncated
Info: input data size = 1048578 = 0x100002
Error: āboot2ā not defined
Card did not respond to voltage select! : -110
starfive_pcie pcie@2B000000: Port link up.
starfive_pcie pcie@2B000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10
starfive_pcie pcie@2C000000: Port link down.
starfive_pcie pcie@2C000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10
Device 0: unknown device
Device 0: unknown device
Tring booting distro ā¦
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ā¦
Failed to load ā/uEnv.txtā
Warning: defaulting to text format
Warning: Input data exceeds 1048576 bytes - truncated
Info: input data size = 1048578 = 0x100002
Failed to load ā/dtbs/starfive/jh7110-visionfive-v2.dtbā
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
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
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
fatwrite - write file into a dos filesystem
Usage:
fatwrite <dev[:part]> [ []]
write file āfilenameā from the address āaddrā in RAM
to ādevā on āinterfaceā
Retrieving file: /extlinux/extlinux.conf
285 bytes read in 8 ms (34.2 KiB/s)
1: Fedora
Retrieving file: /initrd.img
14746152 bytes read in 641 ms (21.9 MiB/s)
Retrieving file: /Image
24198144 bytes read in 1044 ms (22.1 MiB/s)
append: console=ttyS0,115200 root=UUID=4b8a9ed8-d224-412a-b597-25243cf8ae6e rootfstype=ext4 rootwait rw earlycon clk_ignore_unused loglevel=7 eth= rootrwoptions=rw,noatime rootrwreset=yes init=/lib/systemd/systemd
Retrieving file: /starfive/jh7110-visionfive-v2.dtb
Failed to load ā/starfive/jh7110-visionfive-v2.dtbā
Device tree not found or missing FDT support
ERROR Please RESET the board
Sorry @omac777 , my bad, I uploaded the wrong version of the image, Iām uploading the correct one now, will let you know when available to download.
@omac777 The new image is available at the same link.
was it just the dtbās that was different in the new image? I corrected it myself and then rebooted and it went fine. I emailed you about it.
Iām trying to
dnf install gdm gnome-* --skip-broken
to see if I can get the desktop up and running.
while installing I did observe an error while install,
āFailed to set capabilitiesā gst-ptp-helper (Operation not supported)
then it output usage: setcap
post gstreamer1-1.22.4-1.fc38.riscv64 scriptlet failed exit status 1
I observed another error
unpacking of archive failed on /usr/sbin/suexec
cpio: cap_set_file failed - Directory not empty
httpd-core-2.4.57-1.fc38.riscv64: install failed
couldnāt write ā0ā to ākernel/yama/ptrace_scopeā no such file or directory
couldnāt write ā16ā to ākernel/sysrqā no such file or directory
I think this following one was a warning:
gtk-query-immodules-2.0-64 command not found
gtk2-2.24.33-13.0.riscv64.fc38.riscv64 scriptlet failed exit status 127
I did dnf install gtk2-immodules gtk3-immodules
and it installed successfully.
BTW I needed to
dnf install dnf-plugins-core
because I was getting dnf search error āfailed loading plugin notify_packagekit no module named dnfpluginscoreā
by the way the discussion forum prevents me from sending detailed output of the boot because itās too long for the forum.
The other issue I have is why doesnāt the forum allow uploading .avif files since they are smaller than .jpg and .png files? Please could they fix that?