scrottie (he/him/them)

Fork of AfterHours LPMUD at weehours.net and that has an IRC gateway.
Occupier on Haudenosaunee, Oholone, Patwin land.
If not working, biking, or sailing, maybe hacking on 6502 or SNOBOL.
Swears a lot, at tech.
Please don't hesitate to DM me if I did something boneheaded or you just need to chat. <3

scrottie (he/him/them)scrottie@bsd.network
2025-06-27

Various stuff on the misc@ list but strike the last post. I was doing the re-flash wrong. I lost my place in the vendor instructions. And I also confused which bin was the first page EFT bootloader and U-Boot. Re-flashed to latest version. `nvme scan` and other `nvme` commands that appeared don't work (don't show any nvme devices, but that may be part of the pretty damn complicated U-Boot startup scripting trying to probe for Linux and updating stuff).

This snippet from the a comment in that gist did the trick:

env default -a -f
setenv distro_boot_env "echo Booting OpenBSD from NVME; load nvme 0:1 ${fdt_addr_r} jh7110-starfive-visionfive-2-v1.3b.dtb; load nvme 0:1 ${kernel_addr_r} efi/boot/bootriscv64.efi; bootefi ${kernel_addr_r} ${fdt_addr_r}"
saveenv
reset

So `load nvme` works after that update. And easier to reflash this than an x86 system. Note that you'll have a slightly differently named dtb file for the 1.2a rev board, and the command will reference that instead, and also gotta make the patch match relative root of the EFI.

Pleased as punch with this little RISCV board even though that was a lot of work but also a framebuffer would be pretty sick >=)

It's been a while, but I've mucked with a lot of dev boards, and StarFive really, really put a lot of work in to their software stack, documentation, fixes, and updates. There's some non-upstreamed-Linux syndrome, but searching for different things, TI, NXP, etc's docs were all way worse, in some cases with the vendor writing "the line of code you got that error at isn't part of our patches so you'll need to contact $free_software_project for help" and being a sad sack (in one case, the respondent turning around and proving it was their bug, with no reply). Can't help noticing that the Linux experience is absolutely seamless and OpenBSD had me crawling through comments on gists in discussion list replies. This is a tidy, tiny, capable Linux desktop and a capable headless *BSD system (FreeBSD at least supports it too) that's way less Intellectual Property encumbered and without the creepy police alliance than that other popular non-PC-104 board tho I do have a soft spot for ARM.

scrottie (he/him/them) boosted:
moshboymoshboy
2025-06-25
title screen for compunet's mud (multi user dungeon).. lofi pixelated path leading to a house with trees surrounding. smoke is coming out of the chimney.
scrottie (he/him/them)scrottie@bsd.network
2025-06-25

misc@ discussion: marc.info/?l=openbsd-misc&m=17

NVMe magically started showing up in the kernel (I swear I tried re-seating it once). Flailing at so many things at once, I don't have a scientific answer at what got it probing but my best guesses are either knocking the board around until it got a good connection (previously, it was probing the vendor/make/model/etc but not attaching so I thought it had a good connection) or else moving the dtb to the top level directory (and still manually loading it in U-Boot, but somehow it's location fixing things, which seems unlikely).

But NVMe does *not* appear in U-Boot. Searching misc@, it looks like there's some chain loading setup StarFive created for Linux that can be made to mostly work here (but unreliably?). That's something I'd have to tackle later. I'm not super clear on all of these, but since boot.conf happens at BIOS time, not after kernel device probe, I can't have a SD nub install that points to a full-disc-encryption root on NVMe if BIOS (U-BOOT) doesn't see the NVMe.

I don't know what the "eMMC" interface this is (item 22, taken from doc-en.rvspace.org/VisionFive2 ) but apparently U-Boot on this thing can boot that. All of the hits I get for "eMMC" are extremely different from the connector shown for 22 on there. Anyone -- what interface is 22? What search terms do I use to find storage that fits that? (I'm old enough to remember Archie and Veronica... Google is now significantly worse than both so idk keep that in mind.)

Ok not able to upload images to bsd.network right now so #22 on doc-en.rvspace.org/VisionFive2 marked J9 and J99. What is that interface?

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

Pi5 doesn't have built-in NVMe and the StarFive does, but otoh, the StarFive only has a two pin fan controller not four so I can't do this:

Copper pipe CPU cooler with a large LED rainbow color fan attached to a big aluminum grill mounted on a RaspberryPi.
scrottie (he/him/them)scrottie@bsd.network
2025-06-24

Had the thought that I should try to find and search mailing lists (I appreciate the platform-specific NetBSD mailing lists and am still on a few).

So... found this:

marc.info/?l=openbsd-misc&m=16

> > It seems a lot depends on proper .dtb files (which kind users shared
> > with me).
>
> Yes, and it is a total mess. The device trees are being changed as
> support for the board is upstreamed in the Linux kernel. But their
> firmware still provides their hacked up device trees that they use
> with their hacked up vendor kernel.
>
> > How did you create the .dtb files ?
>
> They're build from:
>
> github.com/starfive-tech/linux
>
> But that branch keeps getting rebased, and they changed things again,
> so PCIe stopped working. So I've decided to stick with what I have
> for development and wait until the device tree bindings have been
> accepted by the Linux maintainers. Meanwhile, if you're running
> -current on one of these, expect your setup to break at some point in
> the future.

marc.info/?l=openbsd-misc&m=16

> Then interrupt u-boot and run the following commands:
>
> load mmc 1:1 ${fdt_addr_r} jh7110-starfive-visionfive-2-v1.3b.dtb
> load mmc 1:1 ${kernel_addr_r} efi/boot/bootriscv64.efi
> bootefi ${kernel_addr_r} ${fdt_addr_r}

> There are so many dtb versions for that board floating around
> but once more device support changes are merged into mainline
> Linux, the dtb package should include a suitable dtb that everyone
> can use.

I *think* I only one dtb file, for the model and rev (model 2, rev 1.3B), and doing that, many things including USB and Ethernet probe, but dmesg includes a "cpu0: regulator not implemented" message and the board gets *hot* which is a major concern, and nvme doesn't probe, giving "nvme0 at pci3 dev 0 function 0 "Samsung PM9C1" rev 0x00: intx, NVMe 2.0
nvme0: unable to enable controller", and I do want NVMe for my purposes. Mailed the misc@ list. Tried to get my ducks in as neat of a row as I could first.

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

@brynet And what's an "ESP"? Dropping jh7110-starfive-visionfive-2-v1.3b.dtb in to /efi/starfive/ on the MSDOS partition of the install image doesn't cause it to be auto-probed. Still have to do the thing from marc.info/?l=openbsd-misc&m=16 of interrupting U-Boot and telling it to load mmc the dtb. But doing that, I hit exactly the same thing I was hitting, of nvme getting stuck and failing on probe and thermal throttling not getting sorted out. Going to post to misc@. I think that's as far as I can figure out.

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

@brynet confused about why that would need to be sync'd to Linux... seems like a device tree definition accurate for the hardware and that OpenBSD/U-Boot can read would be all that's required, so that a good version could be settled on and changes wouldn't be needed... so clearly there's something I don't know about all of this...

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

@brynet Ooooh... I had no idea there was a package. I started searching the misc maillist and made some progress but nvme and thermal throttling (kinda important) were still borked. If I can get this to work, can we get some doc fixes to ftp.openbsd.org/pub/OpenBSD/7. ? Lemmie try this. Thank you for stepping in.

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

Threading broke.

Continued here: bsd.network/@scrottie/11473837

And here: bsd.network/@scrottie/11473842

tl;dr I think I need guidance on *exactly* which dtb files go in to the DOS partition and what that looks like, but I could be wrong, but think I'm doing something wrong. Doesn't make sense that no devices would probe. And I'm offering one of these boards up to a developer.

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

Stuck an NVMe M.2 disc in. Still:

Available disks are: none.
Which disk is the root disk? ('?' for details) ?

Still no nvme in dmesg.

Trying OpenBSD 7.6, in case 7.7 just broke all of this. Same results.

Ok, maybe I did the dtb step wrong. Looking at the dtb directory from the vendor Debian Linux OS image again, those are directories full of dtb files (and subdirs full of them). Ooops. So copied those files (not just directories) in to /vendor/ on the DOS partition in the OpenBSD install image, from both of those directories, ignoring duplicates where directories had files with the same name... and... exactly the same thing. No devices except serial console show up. Guessing I'm probably doing something wrong with the dtb files but I'm running out of guesses. Do I need to take them from an earlier vendor image than starfive-jh7110-202409-SD-minimal-desktop-wayland.img.bz2 ? Internet is super slow and I have limited data so hate downloading OS images esp unnecessarily.

Anyone have one of these #hifive #starfive boards who can give me a clue? Wouldn't refuse an .img of that partition if someone wanted to share.

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

"ethernet" at simplebus0 not configured
"ethernet" at simplebus0 not configured
"snd-card" at simplebus0 not configured
"dmc" at simplebus0 not configured
gpiorestart0 at mainbus0
"firmware" at mainbus0 not configured
"config" at mainbus0 not configured
softraid0 at root
scsibus0 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
WARNING: CHECK AND RESET THE DATE!

But openbsd.org/riscv64.html also says "USB xhci(4) on HiFive Unmatched and StarFive VisionFive/VisionFive 2". So it should have USB. But that doesn't show up in dmesg.

Any OpenBSD developers want one of these?

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

Here's the dmesg:
OpenBSD 7.7 (RAMDISK) #17: Mon Apr 14 05:12:50 MDT 2025
deraadt@riscv64.openbsd.org:/usr/src/sys/arch/riscv64/compile/RAMDISK
real mem = 4294967296 (4096MB)
avail mem = 8231456768 (7850MB)
SBI: OpenSBI v1.2, SBI Specification Version 1.0
random: boothowto does not indicate good seed
mainbus0 at root: StarFive VisionFive V2
cpu0 at mainbus0: SiFive U7 imp 4210427 rv64imafdcbsux
intc0 at cpu0
cpu0: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu0: 2048KB 64b/line 2048-way L2 cache
"osc" at mainbus0 not configured
"gmac1_rmii_refin" at mainbus0 not configured
"gmac1_rgmii_rxin" at mainbus0 not configured
"i2stx_bclk_ext" at mainbus0 not configured
"i2stx_lrck_ext" at mainbus0 not configured
"i2srx_bclk_ext" at mainbus0 not configured
"i2srx_lrck_ext" at mainbus0 not configured
"tdm_ext" at mainbus0 not configured
"mclk_ext" at mainbus0 not configured
"jtag_tck_inner" at mainbus0 not configured
"bist_apb" at mainbus0 not configured
"stg_apb" at mainbus0 not configured
"gmac0_rmii_refin" at mainbus0 not configured
"gmac0_rgmii_rxin" at mainbus0 not configured
"clk_rtc" at mainbus0 not configured
"hdmitx0_pixelclk" at mainbus0 not configured
"mipitx_dphy_rxesc" at mainbus0 not configured
"mipitx_dphy_txbytehs" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
syscon0 at simplebus0: "aon_syscon"
syscon1 at simplebus0: "stg_syscon"
syscon2 at simplebus0: "sys_syscon"
plic0 at simplebus0
stfpinctrl0 at simplebus0
syscon3 at simplebus0: "dssctrl"
"pmu" at simplebus0 not configured
"cache-controller" at simplebus0 not configured
"clint" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
"spi" at simplebus0 not configured
"otp" at simplebus0 not configured
"usbdrd" at simplebus0 not configured
"rtc" at simplebus0 not configured
"pmu" at simplebus0 not configured
com0 at simplebus0: dw16550
com0: console
"i2c5" at simplebus0 not configured
dwmmc0 at simplebus0: no clock base
dwmmc1 at simplebus0: no clock base
"reset-controller" at simplebus0 not configured
...

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

Oh, ftp.openbsd.org/pub/OpenBSD/7. specified the bitrate etc.
But ifconfig gives no devices other than lo0, and dmesg | grep -i eth says
"ethernet" at simplebus0 not configured
"ethernet" at simplebus0 not configured
and
dmesg | grep -i usb
"usbdrd" at simplebus0 not configured
and man.openbsd.org/riscv64/cad.4 and man.openbsd.org/riscv64/dwqe.4 linked from ftp.openbsd.org/pub/OpenBSD/7. aren't mentioned in dmesg so looks like Ethernet isn't supported. Without Ethernet or USB, we're pretty hobbled.
man.openbsd.org/riscv64/dwmmc. does appear in dmesg:
dmesg | grep mmc
dwmmc0 at simplebus0: no clock base
dwmmc1 at simplebus0: no clock base
The card I booted the installer is inserted so that's concerning. Install doesn't show any discs available, including that/the SD card.
openbsd.org/riscv64.html says "nvme(4) on HiFive Unmatched and VisionFive 2" so probably I need to stick an NVME M.2 card in the slot.
Sticking a USB drive in a USB slot, nothing appears in dmesg.
Maybe I'm missing something but neither USB nor Ethernet is a show stopper.

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

root@fluffy:cu -s 115200 -l /dev/cuaU00*2;'
Connected to /dev/cuaU0 (speed 115200)

U-Boot SPL 2021.10 (Feb 28 2023 - 21:44:53 +0800)
DDR version: dc2e84f0.
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 : jh7110-hsm
Platform PMU Device : ---
...
U-Boot 2021.10 (Feb 28 2023 - 21:44:53 +0800), Build: jenkins-VF2_515_Branch_SDK_Release-31

CPU: rv64imacu
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

...

Model: StarFive VisionFive V2
Net: eth0: ethernet@16030000, eth1: ethernet@16040000
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
** Invalid partition 3 **
Couldn't find partition mmc 1:3
Can't set block device
** Invalid partition 3 **
Couldn't find partition mmc 1:3
Can't set block device
...
Card did not respond to voltage select! : -110
No EFI system partition
Found EFI removable media binary efi/boot/bootriscv64.efi
149510 bytes read in 15 ms (9.5 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
disks: sd0*
>> OpenBSD/riscv64 BOOTRISCV64 1.7
boot>

Lots of random errors/diagnostics emitted. I mean omitted. Ok emitted and omitted. Took a few guesses to settle on -s 57600*2. Tried 9600 first. #starfive

scrottie (he/him/them)scrottie@bsd.network
2025-06-24

not sure why that one sudo was slow. otherwise things are pretty snappy, especially considering we're running off of microSD for now. I have designs on that M.2 slot tho.

"If the U-Boot target supports "distro_bootcmd" efiboot will automatically
be loaded by placing bootriscv64.efi into /efi/boot/bootriscv64.efi on a FAT
filesystem. With dtb files placed in /vendor/, /dtbs/vendor/, or
/dtb/current/vendor/."

... dd'ing the install77.img image to another SD card, I get a DOS and BSD partition, which isn't nearly as fancy as the partition layout on the vendor Debian image:

Disk: /dev/rsd2c Usable LBA: 34 to 243400670 [243400704 Sectors]
#: type [ start: size ]
------------------------------------------------------------------------
0: HiFive BBL [ 4096: 4096 ]
1: HiFive FSBL [ 8192: 8192 ]
2: EFI Sys [ 16384: 204800 ]
3: Linux files* [ 221184: 218839450 ]
... but there's a /efi/boot/bootrsicv64.efi already on the install77 image so that's done already I guess?
Hunting for "dtb files", those are in the EFI Sys, /dev/sd2k for me, in a dtbs directory off of root. I did notice StarFive's github before so that was my fallback if I didn't find them here. Not knowing exactly what "they" are I can only assume these are correct and complete... here's what I have:
5.15.0-starfive
6.6.20-starfive
... oh. those are named after the Debian Linux kernel versions. How is that going to work?
And oh... with a Prolific Tech USB Serial Adapter with the black wire on 40 pin header pin #6, white on #8, blue on #10, and red not connected...:

scrottie (he/him/them)scrottie@bsd.network
2025-06-23

@catsynth Really they packed an amazing number of interfaces on here. There's an eMMC connector, DVI, dual gig-ethernet, 40 pin header, camera, two different ribbon video interfaces, PoE, fan, camera, SD, NVMe... RPi5 mostly catches up, but StarFive clearly pulled out the stops.

scrottie (he/him/them)scrottie@bsd.network
2025-06-23

@catsynth StarFive VisionFive 2: starfivetech.com/en/site/board
OpenBSD only supports a handful of RISCV devices, and this has an NVMe storage adapter on-board, so it suits particular purposes, tho it's unclear how much of the hardware on here OpenBSD supports.

scrottie (he/him/them)scrottie@bsd.network
2025-06-23

ain't no one going to say one word about amiwm to me. amiwm is a million times better than this fucking train wreck.

scrottie (he/him/them)scrottie@bsd.network
2025-06-23

Oh fuck I can have alt-tab held down and while it's held down, down arrow and get a sub menu of the xterms that are open. Somehow that's even worse. They're aware that people would want to cycle through all of their windows, but *that* was the solution they came up with. No way scientists are ever going to be able to use this shit.

scrottie (he/him/them)scrottie@bsd.network
2025-06-23

Oh god... I'm sorry I haven't even gotten to the complaining about OpenBSD yet and I'm still complaining about Linux and things on that stack... but... I have two xterms open, one root, one user, and a firefox, downloading OpenBSD. Alt-tab cycles me between *one of* the xterms and Firefox. If it hit it three times or ten times, it bounces between two of the three things open. Whatever desktop I'm running, someone massively lost the plot.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst