From owner-freebsd-arm@FreeBSD.ORG Sun Feb 10 07:32:25 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 33C40AF6 for ; Sun, 10 Feb 2013 07:32:25 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by mx1.freebsd.org (Postfix) with ESMTP id DC5A4CDF for ; Sun, 10 Feb 2013 07:32:24 +0000 (UTC) Received: from mxin1-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0MHZ0051SU9QDZ30@smtp5.clear.net.nz> for freebsd-arm@freebsd.org; Sun, 10 Feb 2013 20:32:17 +1300 (NZDT) Received: from 202-0-48-19.paradise.net.nz (HELO bender) ([202.0.48.19]) by smtpin1.paradise.net.nz with ESMTP; Sun, 10 Feb 2013 20:32:15 +1300 Date: Sun, 10 Feb 2013 20:32:22 +1300 From: Andrew Turner Subject: Re: building RaspPi Images In-reply-to: <58DCA6BE-8C06-4F69-81A2-A3582FBB5B12@kientzle.com> To: Tim Kientzle Message-id: <20130210203222.6b51e505@bender> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <5116CB50.9080303@ceetonetechnology.com> <7757848F-45C6-4DEF-A4A2-5F900EB10A06@kientzle.com> <20130210012052.4d7e1a46@ivory.local> <58DCA6BE-8C06-4F69-81A2-A3582FBB5B12@kientzle.com> Cc: freebsd-arm@freebsd.org, Brett Wynkoop X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2013 07:32:25 -0000 On Sat, 9 Feb 2013 23:03:38 -0800 Tim Kientzle wrote: > On Feb 9, 2013, at 10:20 PM, Brett Wynkoop wrote: > > > > I was thinking that we should be able to generate a generic image > > that will boot on both the Pi and the Bone. Maybe a config file > > that includes the needed drivers for both boards. > > I've thought about this and believe it is pretty routine, > though I've not had time to actually try implementing it. > > This specific combination is simplified by the fact > that the boot bits are so different, so you can just > put them all on the same SD card image. > > There are a few pieces you'll need to work through: > 1. An MSDOS partition with all the boot bits from both systems > 2. A kernel with all of the drivers for both systems > 3. ubldr will need to identify the board somehow > 4. ubldr will need to obtain the correct FDT 5. Update the kernel to allow it to be built for multiple boards. You will need to at least fix: - locore.S generates a fixed VA -> PA map, it's not too hard to fix this, I've looked into it but don't have the time to get it into a usable state. - initarm calls a number of functions that have are implemented on a per SoC family case. - Update the IRQ mask/unmask/next irq functions to allow multiple implementations and pick the correct one on boot. - Ditto for DELAY, DMA, reset, etc functions. I would suggest the first step is to get a kernel that can boot on the BeagleBone and PandaBoard. As they both have Ti CPUs they are similar enough we could skip some of the items in my list as they are already using a common SoC specific code base. Andrew