From nobody Tue Oct 10 14:08:43 2023 X-Original-To: freebsd-riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S4d7B1lvJz4wpM1 for ; Tue, 10 Oct 2023 14:09:10 +0000 (UTC) (envelope-from csgordon@fastmail.com) Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S4d796cV1z4NGT for ; Tue, 10 Oct 2023 14:09:09 +0000 (UTC) (envelope-from csgordon@fastmail.com) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id EFDD32B0023A; Tue, 10 Oct 2023 10:09:06 -0400 (EDT) Received: from imap53 ([10.202.2.103]) by compute2.internal (MEProxy); Tue, 10 Oct 2023 10:09:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1696946946; x=1696947546; bh=fw DuVotmuP2tbq3wQDcctY/q4Nxe5C8094EsNsmqmmA=; b=lPlO3cuHzO7qk18fbH SrkuJaLL+8KFOEwKexA97b1NhVEeEETiYSLrFeQL8b6IAvVN/zLBIimEjs2XUPFV yUwiibN5nUr1q34CL6gSGeyTdXREW1aHRB4XWcojHJHGkvxNnq/IQMq5PpNOZYBb vIMv3j5n5Da9Pl2JHBtWOTUFGfIk1JpBNlMy29xQULNtFflo3ylV9ipBF/x37zep tL+nU+6NWsm7G1rglx3n8xFWA7z0/A4waKlZZJ5q/JqmHUwAhi5YGayntrN33QUm d/URBZz8yIwYug+C+xRuLDnd539P0TKxpJCHpMXJgyZHB92igAPTdO5ZlhoaUK0M IYlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=i60c149f6.fm2; t=1696946946; x=1696947546; bh=fwD uVotmuP2tbq3wQDcctY/q4Nxe5C8094EsNsmqmmA=; b=coF2wgbn/Trs70ay7GJ IhKqbEcDgeMijxExqSqRRPD6dGYIl0yLJ3PRzVTl8YgfR4yKNjGPs10YqLqp29dn 1xg7nz+cfauFMcaKJh+FahBk3uxlVKnGSNUVPeGD/uK122ULjmIgcZYv9trsaFIk uAiW4fGEuqhMRpZq2UiP3vuMinmMmmwt/1rgRv9RhM2pjDJYnUAjFYW75bAwlcrq +BcvMHwbxY5MLEnyqi7Gp9wguZ0Pd8wGD4Z53XfRuUlCJWO0oH51CC9dFWxP7Wli pp9V3yeEp3APWCLob07aIB4F8bvkloqhLJUViOoPuWjy0zGhfRu1vC5TOfDCLuIA Xog== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefofgggkfgjfhffhffvvefu tgesrgdtreerreerjeenucfhrhhomhepfdevohhlihhnucfurdcuifhorhguohhnfdcuoe gtshhgohhrughonhesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpefg teejgeegffduleegjeehvedvffegvedtfffgffetvdefgedtleffffejfedvieenucffoh hmrghinhepghhithhhuhgsrdgtohhmpdguihhstghushhsrdhshihsthgvmhhspdhfrhgv vggsshgurdhorhhgpdhhrggtkhhsthgvrhdrihhopdhgihhthhhusgdrihhopdihohhuth husggvrdgtohhmpdgtvggurhhordhinhhfohenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegtshhgohhrughonhesfhgrshhtmhgrihhlrdgtoh hm X-ME-Proxy: Feedback-ID: i60c149f6:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B266F3640066; Tue, 10 Oct 2023 10:09:04 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-958-g1b1b911df8-fm-20230927.002-g1b1b911d List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 Message-Id: <1455fbf5-c56e-4584-887d-f8edbe66724c@app.fastmail.com> In-Reply-To: References: <55416c03-c838-46d5-8f18-f6eb1657f4a5@app.fastmail.com> Date: Tue, 10 Oct 2023 09:08:43 -0500 From: "Colin S. Gordon" To: "Tomek CEDRO" Cc: freebsd-riscv@freebsd.org, robn@despairlabs.com, "Lee, Lup Yuen" Subject: Re: StarFive VisionFive 2 support Content-Type: multipart/alternative; boundary=d9ad1932acc949c5a779f8dcf6c04a3b X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Queue-Id: 4S4d796cV1z4NGT --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
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).

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.

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).

-Colin

On Mon, Oct 9, 2023, at 21:52, Tomek CEDRO wrote:
On Tue, Oct 10, 2= 023 at 3:03=E2=80=AFAM Colin S. Gordon wrote:
> 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.
=
Your posts are famous Colin :-)

<= div>https://discuss.systems/@csgordon/110969847755944311


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
bu= t I will be more than happy to help testing :-)

=



My friend Lup Yuen Lee (CC) is= porting NuttX RTOS to JH7110 and
already made tons of dis= coveries 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
:-)



https://www.youtube.com/watch?v=3D6vQ-TXXojbQ


Have fun :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


--d9ad1932acc949c5a779f8dcf6c04a3b--