Re: FreeBSD for new SOC

From: Emmanuel Vadot <manu_at_bidouilliste.com>
Date: Thu, 15 Jul 2021 16:53:40 +0200
On Thu, 15 Jul 2021 14:21:53 +0300
Sleep Walker <s199p.wa1k9r_at_gmail.com> wrote:

> Hello FreeBSD ARM community!
> 
> I would like to discuss one issue.
> 
> A lot of devices have already been sold in the world on Amlogic processors.
> These are SBCs and VIDEO consoles.
> But they all run on Andriod or Linux. No FreeBSD support ;-).
> 
> If it had been, the user community would have grown a lot, FreeBSD would
> have grown in popularity, and the number of testers and committers would
> have increased.

 I highly doubt that. If that was true we would have seen a number of
new commiters ~12 years ago when we started to add support to armv7 and
later when we added arm64.

> This would make FreeBSD for ARM even more stable.

 That would certainly make FreeBSD driver less arch specific (even if
with Allwinner/RockChip/NVidia this is less true) but not more stable.

> What are your thoughts on porting FreeBSD to Amlogic?
> Such attempts have been made before
> https://github.com/tomtor/image-freebsd-c2
> NetBSD supports multiple SBCs on Amlogic
> http://www.armbsd.org/arm/
> Why don't we add this support too?

 I can think of a lot of reasons :
 - Back in the days when I started doing some FreeBSD porting there was
no public TRM for Amlogic SoC, I think it changed but I haven't checked
every SoC.
 - Even with docs you will always hit some huge blocker and :
 - Porting takes time, a lot of time. We're still fixing bugs for
Allwinner or RockChip.
 - ...

> I know several Chinese manufacturers who would be happy to send samples
> of their products to developers.

 "Paying" developer with SBC isn't a good way to make things happen.

> I recently received a RADXA ZERO on Amlogic S905Y2 as a free samples
> https://wiki.radxa.com/Zero/hardware
> https://forum.radxa.com/t/introduce-the-radxa-zero/6550
> 
> It is a very interesting and tiny device, it comes with Android
> pre-installed on eMMC,
> not even Mainline Linux support yet.
> 
> I've been studying FreeBSD for ARM for two years now and really want to
> learn
> add support for new SOCs to FreeBSD.
> 
> I now have 3 SOCs to add
> 1) Pine64 Quartz64,
> 2) Radxa Zero
> 3) First Russian ARM SOC - BAIKAL-M
> https://www.baikalelectronics.com/products/338/
> 
> In all three variants, I have the necessary equipment.
> And I have a great desire to learn.
> 
> I have already written a USB driver for BAIKAL-M and am successfully
> booting the system in multi-user mode.
> The results can be viewed here https://pkg.personalbsd.org/baikal/
> 
> It succeeded because many devices on BAIKAL-M use fixed-clock and
> everything is built on DesignWare IP.
> 
> But I stopped at the need to write a clock driver necessary for Ethernet
> and PCIe to work.
> 
> If anyone would agree to advise me, I would be extremely grateful.

 Read other SoC clock driver.
 Clock drivers are hard, they always were and always will be hard.
 Not having docs on the clock api doesn't help for sure (and I need to
take time to document that) but that didn't stopped others (me
included) to write clock drivers.

> I am willing to provide access to BAIKAL-M but ssh (since USB Ethernet
> works)
> for easier collaboration and learning.
> 
> Any help or advice would be appreciated.
> 
> I am extremely interested in participating in the FreeBSD porting project
> to the new SOC because I want to contribute to the popularization of
> FreeBSD.
> 
> --
> Yours faithfully,
> Sergey Tyuryukanov

 All that being said, I don't really see an interest for Amlogic over
say Allwinner or Rockchip.
 I've never seen the interest in adding a SoC/board just "because".
 What do they provide that other SoCs can't do ?
 I suggest you start by doing some work on drivers for already
supported SoC, it's way easier and that way you will familiarize
yourself with FreeBSD kernel interfaces.

 Cheers,

-- 
Emmanuel Vadot <manu_at_bidouilliste.com> <manu_at_freebsd.org>
Received on Thu Jul 15 2021 - 14:53:40 UTC

Original text of this message