From nobody Thu Jul 15 14:53:40 2021 X-Original-To: freebsd-arm@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 F39FC127CA12 for ; Thu, 15 Jul 2021 14:53:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GQcnm5Jj6z3rbS for ; Thu, 15 Jul 2021 14:53:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1626360821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bf5w6bhdBIK50yWtJkmFSAL/kj35R6uSxgtyCObWWwg=; b=TcIgUneSvxq0jlThWQgWRGV40B+IVzH9+ApMHOd5+OFKAwpWMhisgWn+Cgp5h1vVeB3zER ng5GHKiz//o0CucFvdzbJwV1eazyeLwz8XWOAgJn9tp395/tTNQTy+e+5hmv0d177YBmHB ZEr7UJfwlXN44eev7iF/GJiAOydhmP4= Received: from skull.home.blih.net (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id f9a3d7a9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Jul 2021 14:53:41 +0000 (UTC) Date: Thu, 15 Jul 2021 16:53:40 +0200 From: Emmanuel Vadot To: Sleep Walker Cc: Free BSD Subject: Re: FreeBSD for new SOC Message-Id: <20210715165340.bfc0e3ca57f841ca7ff13d79@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4GQcnm5Jj6z3rbS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, 15 Jul 2021 14:21:53 +0300 Sleep Walker 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