I have just booted a linux (very near) mainline 6.18-rc1 from https://github.com/sophgo/linux-riscv with just very small DTS-patches to serial console login into the SMHub-OS rootfs.
Will now make a DTS-file for the SMHUB specifically, so that ethernet and wifi can be used, and compile a new image with USB gadget and wifi drivers.
I can now boot (with my 6.18-rc1) the smhub into a Debian Trixie RiscV-installation (installed into /mnt/user from OEM FW), and have working Ethernet, eMMC, and SD-Card, and all serial ports. Not working for now is Wifi/BT (aic8800-sdio) and USB (OTG driver is detected, but ⦠is donāt get a UDC, or role_switch endpoint). So I could now start using it as remote radios for my homeassistant via ser2net/socat. Iāll write some glue scripts to announce the RGB lights and other sensors via mosquitto_pub.
Iām assuming, that 6.18 will be called as LTS, and that at some point after the 6.12 era, OpenWrt will start porting RiscV to 6.18 (or later). At that point Iāll attempt to get this device supported under OpenWrt.
0x8330000f is FENCE.TSO, which some of the T-Head cores notoriously
failed to implement, thereby violating the RISC-V spec. LLVM has
emitted it for a long time, but GCC didnāt until recently (14.1) so
without doing proper architectural testing, just running Linux on top
of it historically wouldnāt have revealed the issue.
OpenSBI 1.1 (released June 2022) emulates the instruction for this
hardware, so update your firmware to a version that includes a
recent-ish version of OpenSBI and pretends your hardware is more
conforming.
The SMHub device ships with OpenSBI 0.9, which is 5 years old. Upstream OpenSBI is at 1.9, and supports Sophgo CV18xx/SG2000 since version 1.5 from June 2024. The OpenSBI is contained (afaict) in the FIP.bin, which (afaiu) are stored in the mmcblk0boot0 and ā¦1.
Iāll now be checking the upstream sources (milkv/sophgo) to see, whether any of those have/use a newer OpenSBI/FIP/U-Boot in their boad support images. It looks like I might be able to use SD-Card boot to ātest outā other FIPs. (If the default stage1 bootloader defaults to reading SD first, then eMMC, which I think it does, but canāt find in writing just now).
If I find a build recipe for the fip.bin, and how to test safely, I plan to build a full-featured U-boot (with EFI-features etc.) with a mainline up2date OpenSBI 1.9+.