From owner-freebsd-arm@FreeBSD.ORG Sun Feb 10 07:03:41 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 71D7643C for ; Sun, 10 Feb 2013 07:03:41 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 53FA8B90 for ; Sun, 10 Feb 2013 07:03:40 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r1A73eHl004443; Sun, 10 Feb 2013 07:03:40 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id z4jyk9effcnyd4cvgrjqttt2di; Sun, 10 Feb 2013 07:03:40 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: building RaspPi Images Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <20130210012052.4d7e1a46@ivory.local> Date: Sat, 9 Feb 2013 23:03:38 -0800 Content-Transfer-Encoding: 7bit Message-Id: <58DCA6BE-8C06-4F69-81A2-A3582FBB5B12@kientzle.com> References: <5116CB50.9080303@ceetonetechnology.com> <7757848F-45C6-4DEF-A4A2-5F900EB10A06@kientzle.com> <20130210012052.4d7e1a46@ivory.local> To: Brett Wynkoop X-Mailer: Apple Mail (2.1283) Cc: freebsd-arm@freebsd.org 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:03:41 -0000 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 Except for #3, this should all be entirely routine. For #4, the trick is to not compile any DTB into the kernel. Instead, the DTB is given to the kernel by the boot bits: * For RPi, this already happens: the first-stage boot loads a DTB, ubldr uses "fdt addr" to access that DTB in a known location and then passes it to the kernel. * For Beaglebone, you can use loader.rc commands to load the proper DTB from the UFS partition. I'm using the following on my BeagleBone right now: /boot/beaglebone.dtb /boot/loader.rc contains load /boot/kernel/kernel load -t dtb /boot/beaglebone.dtb autoboot This should be an afternoon's work for someone who already has a good understanding of FreeBSD boot processes. Tim