From owner-freebsd-arm@freebsd.org Tue Oct 3 22:10:13 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8133DE25F54 for ; Tue, 3 Oct 2017 22:10:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 622F4660ED for ; Tue, 3 Oct 2017 22:10:13 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a38d33d4-a887-11e7-a937-4f970e858fdb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id a38d33d4-a887-11e7-a937-4f970e858fdb; Tue, 03 Oct 2017 22:10:18 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v93MA9sW002044; Tue, 3 Oct 2017 16:10:09 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1507068609.86205.81.camel@freebsd.org> Subject: Re: GENERIC kernel (was Re: BeagleBone Crochet Build Problem) From: Ian Lepore To: Warner Losh , lausts@acm.org Cc: "freebsd-arm@freebsd.org" Date: Tue, 03 Oct 2017 16:10:09 -0600 In-Reply-To: References: <176dbdd5-1a32-06b2-7dd8-0647cc0fbe20@acm.org> <1506954050.22078.55.camel@freebsd.org> <1506962766.22078.69.camel@freebsd.org> <20171003170053.GB2918@lonesome.com> <8eb57091-0b6f-3f0a-8c80-997b951a383f@acm.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Oct 2017 22:10:13 -0000 On Tue, 2017-10-03 at 14:55 -0600, Warner Losh wrote: > On Tue, Oct 3, 2017 at 2:03 PM, Thomas Laus wrote: > > > > > On 10/03/17 13:00, Mark Linimon wrote: > > > > > > On Mon, Oct 02, 2017 at 10:46:06AM -0600, Ian Lepore wrote: > > > > > > > > Why are we working towards a GENERIC kernel for arm? > > > My intuition would be: > > > > > >  - easier to tell new FreeBSD users how to start > > >  - less work for Release Engineering to make targets > > > > > > OTOH I'm not doing the work so I don't get to set the > > > direction :-) > > > > > > My _opinion_ is that we still seem to have a steeper > > > curve for our new users than is necessary.  I intend to > > > think about that more this fall. > > > > > That is probably 'wishful thinking' for the very distant future.  Most > > of the common ARM SOC's have very different capabilities between each > > other.  Each also requires a unique U-Boot partition that gets read > > before the FreeBSD kernel is loaded. > > > While this is true, how to create them can be described generically. You > put these bits in this physical location, or on that partition and away you > go. The pre-boot environment is indeed different, but it's highly desirable > to have everything after that identical. It ensures uniformity in a highly > fragmented segment of our user base. Different kernels, even generated from > the same sources, run the risk of being subtly different from each other, > leading to less coverage between the boards. We've had issues related to > this in the past from time to time. > > I'm working on a program I'm calling "spin" which will take a description > of what to use (eg, u-boot for the banana ramma board plus FreeBSD 12.3R) > and it will create a bootable image knowing nothing more. If it also has to > know which of a bazillion kernels to use, that makes things more > complicated. > > We want more uniformity, not less. Much of the differences we have today > are arbitrary (and often wrong). > > > > > > I strongly favor the current approach that has a custom kernel > > configuration file and U-Boot for each SOC.  All of the common ARM > > systems have a limited amount of real estate to store FreeBSD kernel and > > base system because it all must fit on a SD memory card.  Having a > > GENERIC kernel that covers all SOC variants would consume flash space > > that will never be used. > > Nobody is saying that you can't do this. Just that GENERIC will be the > union of all these kernel and be what you get by default. Since nobody has > quantified the differences, I'm having trouble getting worked up over the > somewhat trivial difference in size (especially compared to most SD cards > today). > > Warner Well, I guess I'll stop pretending there's any chance this freight train can be stopped.  I find the advantages mentioned so far dubious at best, specious at worst, except for the single item "packaged base".  I don't know much about how that stuff is structured, but I can see how having lots of different kernels might be difficult for packaging. But we absolutely have to solve the problem of making it easy for people to create custom kernel configs.  "Include GENERIC and add some nodevice/nooption lines" is just not going to work.  Right now I use "include IMX6" and then some nodevice/nooption lines, and that works fine. So if IMX6 goes away as a standalone buildable config, there needs to be some other thing like it that can be included.  The idea that keeps nudging me is that our GENERIC should look like:   include std.armv6   include std.armdebug   include std.a10   include std.a20   include std.bcm2835   include std.imx6   ... Now anybody can create a custom config by including std.armv6, std.armdebug if they want it, and their soc's std file.  (The std.armdebug is also for re@, so that it's easy for them to adjust when making releases.) The problem is that I'm so backed up with other obbligations and problem reports not getting dealt with and of course $work, so I never find any time to give a scheme like this a try. -- Ian