Re: Question about the docs at https://wiki.freebsd.org/riscv/ports

From: Mitchell Horne <mhorne_at_freebsd.org>
Date: Fri, 30 Aug 2024 15:43:34 UTC

On 8/29/24 14:43, Dennis Clarke wrote:
> 
> Dear RISC-V user types :
> 
>      I have a package server that does daily builds for amd64 with jails
> setup for 13.3 and 14.1 and of course CURRENT. This works really well
> and generally gets the job done for all of KDE5 and LXDE and XFCE plus
> some database tools and other tidbits. Roughly 3 or 4 hours for 1800
> packages and that serves me well.
> 
>      Regarding the docs for riscv64 package builds at :
> 
>          https://wiki.freebsd.org/riscv/ports
> 
>      I see that it says we need qemu-user-static built and installed and
> then I *may* be able to setup a riscv64 jail?  My plan is to try and get
> a 14.1 jail as well as a CURRENT jail from the sources I have built the
> host with. However qemu is just horribly slow. So terrible that I may
> have to wait a week to get that jail built. So therefore :
> 

I think you misunderstand the use of QEMU here. The jail is not being 
built inside QEMU. The instructions are for cross-compiling riscv64 
packages on an amd64 host. So, a riscv64 jail will be built and 
installed on the host, including a cross-compiler. QEMU is used in a 
limited way here, to emulate execution of riscv64 binaries on the host. 
It is slower than native package building, but faster than full-system 
emulation.

>          (1) are those docs still reasonable ?
> 

These instructions are untouched and untested for a while. They are 
still generally applicable, but there may be stumbling blocks, I am not 
sure.

>          (2) is it just a waste of time ?
> 

Not completely, but the riscv ports experience is still pretty 
incomplete and a distance from "just works". So, it depends on how you 
value spending your time.

>      I have the little SiFive UnMatched board which is supposed to all
> "just work" per https://wiki.freebsd.org/riscv#Supported_Platforms and
> I have a Samsung 990 SSD M.2 thing on it. Will it be able to run proper
> poudriere package builds without too much horror ?
> 

I have never tried native poudriere builds on the Unmatched, but I 
believe some users have with some success. It will (of course) be slow 
compared to commodity amd64 hardware. Running package builds also 
stresses the system, and may expose software or hardware instability.

So, you can try this, but you will be walking an unmarked path, so to 
speak. It is fair to expect some minor "horror", but it is possible to 
build packages.