Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2023 09:08:43 -0500
From:      "Colin S. Gordon" <csgordon@fastmail.com>
To:        "Tomek CEDRO" <tomek@cedro.info>
Cc:        freebsd-riscv@freebsd.org, robn@despairlabs.com, "Lee, Lup Yuen" <luppy@appkaki.com>
Subject:   Re: StarFive VisionFive 2 support
Message-ID:  <1455fbf5-c56e-4584-887d-f8edbe66724c@app.fastmail.com>
In-Reply-To:  <CAFYkXjnYnTQ=1mRJKY16rnuawaMw_M9GzM6j-szoUzMgMEqMsg@mail.gmail.com>
References:  <55416c03-c838-46d5-8f18-f6eb1657f4a5@app.fastmail.com> <CAFYkXjnYnTQ=1mRJKY16rnuawaMw_M9GzM6j-szoUzMgMEqMsg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--d9ad1932acc949c5a779f8dcf6c04a3b
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable

Thanks for the references! I've actually been using a modified version o=
f Rob's script so far to test additional kernels --- I have the script p=
ause partway through so I can installkernel with DESTDIR set to what end=
s up as the uzip root. But now that I have (super-hacky) access to the e=
MMC, I'm hoping to experiment with installing to eMMC and self-hosting (=
though still using the serial console for now), using ZFS boot environme=
nts to iterate faster than cycling through repeatedly rebuilding and re-=
burning the sd card (the card I've been using is starting to fail, too :=
-D). Should make debugging the mismatches between the StarFive DTBs and =
the clock-related properties FreeBSD expects to find much faster (right =
now the biu and ciu clocks for the mmc devices aren't found by FreeBSD d=
ue to those mismatches, and it's deeper than just a missing property).

I'm also aware of Lup's exceptionally detailed posts, which cover a lot =
of information without me needing to browse the NuttX code --- licensing=
 is one reason why I'm currently focusing on porting OpenBSD's driver's,=
 I'm trying to avoid relying on non-BSD-licensed code references. I foun=
d some of the overview of the RISC-V architecture and privilege levels e=
specially illuminating.

And to be clear OpenBSD already runs pretty nicely on the VisionFive2 (h=
ttps://gist.github.com/csgordon/74658096f7838382b40bd64e11f6983e), Mark =
Kettenis wrote and/or extended drivers to support many of the devices, i=
ncluding PCIe, USB, and the NICs, with help from a couple others (none o=
f whom were me). The only thing they're currently missing for a self-con=
tained system is working support for video out (via proper display drive=
r or UEFI framebuffer).

-Colin

On Mon, Oct 9, 2023, at 21:52, Tomek CEDRO wrote:
> On Tue, Oct 10, 2023 at 3:03=E2=80=AFAM Colin S. Gordon wrote:
> > I've been looking at support for the StarFive VisionFive 2 off and o=
n for the last few weeks, using the OpenBSD support as a reference. Rece=
ntly it was recommended to me that I check here whether anyone else was =
working on this before I got too far, to avoid duplicating and work.
>=20
> Your posts are famous Colin :-)
>=20
> https://discuss.systems/@csgordon/110969847755944311
>=20
>=20
> After I got my VisionFive2 board in January I have tried FreeBSD boot
> method presented by Rob (CC) on GitHub but it was sllllllooow and no
> drivers were available except for UART pins. Did not go any further
> but I will be more than happy to help testing :-)
>=20
> https://github.com/robn/freebsd-vf2
>=20
> https://forums.freebsd.org/threads/freebsd-on-visionfive2-board-with-r=
isc-v-rv64gc-starfive-jh7110-soc.87757/
>=20
>=20
> My friend Lup Yuen Lee (CC) is porting NuttX RTOS to JH7110 and
> already made tons of discoveries that are all documented.. you may
> join forces and share discoveries to make both NuttX and
> FreeBSD/OpenBSD fully available on that new amazing RISC-V platform
> :-)
>=20
> https://www.hackster.io/lupyuen/rtos-on-a-risc-v-sbc-star64-jh7110-apa=
che-nuttx-2a7429
>=20
> https://lupyuen.github.io/articles/release
>=20
> https://www.youtube.com/watch?v=3D6vQ-TXXojbQ
>=20
>=20
> Have fun :-)
>=20
> --=20
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>=20

--d9ad1932acc949c5a779f8dcf6c04a3b
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title><style type=3D"text/css">p.Mso=
Normal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Thanks for=
 the references! I've actually been using a modified version of Rob's sc=
ript so far to test additional kernels --- I have the script pause partw=
ay through so I can installkernel with DESTDIR set to what ends up as th=
e uzip root. But now that I have (super-hacky) access to the eMMC, I'm h=
oping to experiment with installing to eMMC and self-hosting (though sti=
ll using the serial console for now), using ZFS boot environments to ite=
rate faster than cycling through repeatedly rebuilding and re-burning th=
e sd card (the card I've been using is starting to fail, too :-D). Shoul=
d make debugging the mismatches between the StarFive DTBs and the clock-=
related properties FreeBSD expects to find much faster (right now the bi=
u and ciu clocks for the mmc devices aren't found by FreeBSD due to thos=
e mismatches, and it's deeper than just a missing property).<br></div><d=
iv><br></div><div>I'm also aware of Lup's exceptionally detailed posts, =
which cover a lot of information without me needing to browse the NuttX =
code --- licensing is one reason why I'm currently focusing on porting O=
penBSD's driver's, I'm trying to avoid relying on non-BSD-licensed code =
references. I found some of the overview of the RISC-V architecture and =
privilege levels especially illuminating.<br></div><div><br></div><div>A=
nd to be clear OpenBSD already runs pretty nicely on the VisionFive2 (ht=
tps://gist.github.com/csgordon/74658096f7838382b40bd64e11f6983e), Mark K=
ettenis wrote and/or extended drivers to support many of the devices, in=
cluding PCIe, USB, and the NICs, with help from a couple others (none of=
 whom were me). The only thing they're currently missing for a self-cont=
ained system is working support for video out (via proper display driver=
 or UEFI framebuffer).<br></div><div><br></div><div>-Colin<br></div><div=
><br></div><div>On Mon, Oct 9, 2023, at 21:52, Tomek CEDRO wrote:<br></d=
iv><blockquote type=3D"cite" id=3D"qt" style=3D""><div>On Tue, Oct 10, 2=
023 at 3:03=E2=80=AFAM Colin S. Gordon wrote:<br></div><div>&gt; I've be=
en looking at support for the StarFive VisionFive 2 off and on for the l=
ast few weeks, using the OpenBSD support as a reference. Recently it was=
 recommended to me that I check here whether anyone else was working on =
this before I got too far, to avoid duplicating and work.<br></div><div>=
<br></div><div>Your posts are famous Colin :-)<br></div><div><br></div><=
div><a href=3D"https://discuss.systems/@csgordon/110969847755944311" cla=
ss=3D"">https://discuss.systems/@csgordon/110969847755944311</a><br></di=
v><div><br></div><div><br></div><div>After I got my VisionFive2 board in=
 January I have tried FreeBSD boot<br></div><div>method presented by Rob=
 (CC) on GitHub but it was sllllllooow and no<br></div><div>drivers were=
 available except for UART pins. Did not go any further<br></div><div>bu=
t I will be more than happy to help testing :-)<br></div><div><br></div>=
<div><a href=3D"https://github.com/robn/freebsd-vf2">https://github.com/=
robn/freebsd-vf2</a><br></div><div><br></div><div><a href=3D"https://for=
ums.freebsd.org/threads/freebsd-on-visionfive2-board-with-risc-v-rv64gc-=
starfive-jh7110-soc.87757/">https://forums.freebsd.org/threads/freebsd-o=
n-visionfive2-board-with-risc-v-rv64gc-starfive-jh7110-soc.87757/</a><br=
></div><div><br></div><div><br></div><div>My friend Lup Yuen Lee (CC) is=
 porting NuttX RTOS to JH7110 and<br></div><div>already made tons of dis=
coveries that are all documented.. you may<br></div><div>join forces and=
 share discoveries to make both NuttX and<br></div><div>FreeBSD/OpenBSD =
fully available on that new amazing RISC-V platform<br></div><div>:-)<br=
></div><div><br></div><div><a href=3D"https://www.hackster.io/lupyuen/rt=
os-on-a-risc-v-sbc-star64-jh7110-apache-nuttx-2a7429">https://www.hackst=
er.io/lupyuen/rtos-on-a-risc-v-sbc-star64-jh7110-apache-nuttx-2a7429</a>=
<br></div><div><br></div><div><a href=3D"https://lupyuen.github.io/artic=
les/release">https://lupyuen.github.io/articles/release</a><br></div><di=
v><br></div><div><a href=3D"https://www.youtube.com/watch?v=3D6vQ-TXXojb=
Q" class=3D"">https://www.youtube.com/watch?v=3D6vQ-TXXojbQ</a><br></div=
><div><br></div><div><br></div><div>Have fun :-)<br></div><div><br></div=
><div>--&nbsp;<br></div><div>CeDeROM, SQ7MHZ,&nbsp;<a href=3D"http://www=
.tomek.cedro.info">http://www.tomek.cedro.info</a><br></div><div><br></d=
iv></blockquote><div><br></div></body></html>
--d9ad1932acc949c5a779f8dcf6c04a3b--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1455fbf5-c56e-4584-887d-f8edbe66724c>