From owner-freebsd-arm@FreeBSD.ORG Sun Feb 10 07:07:36 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 ED25551D for ; Sun, 10 Feb 2013 07:07:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ia0-x22e.google.com (mail-ia0-x22e.google.com [IPv6:2607:f8b0:4001:c02::22e]) by mx1.freebsd.org (Postfix) with ESMTP id B44B1BEF for ; Sun, 10 Feb 2013 07:07:36 +0000 (UTC) Received: by mail-ia0-f174.google.com with SMTP id o25so5583737iad.33 for ; Sat, 09 Feb 2013 23:07:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=hMwMxeDPlMeCwuV0j2RoMpGFYAp5K/TNGtrY3Zx+8eQ=; b=kl7cDK0vyd6jLk1SQnjNw/nkCnzsfDiUhagtQtCK2ms2iP5bR+06jQpiWIks+239Ix srviJbp/cy/Lt09oHrbyffmgrXPmFUR/mCVek0klp16+4paNuHpJk6rG6TZoPYi1vQsF JYv+UyIR9uDY3FH2ftJf0l8wZPwFWxuTYk6g18z9vGVGtdqUrBiihdhM7mns0kyPnKB/ GNyyCakVM8rYGpybFL0RNbt1bUgge+eX9tHlmAgtxzj0YY89pBsXs79/RpvGQNykOQ16 Lcc2bcLADcH+Lzc17D5kJGtGIahqB2oTa9MeMS7uU+QLi11Ouqh0Rn9j7Kk6MVFJr61m PRCw== X-Received: by 10.50.242.9 with SMTP id wm9mr9030860igc.59.1360480056247; Sat, 09 Feb 2013 23:07:36 -0800 (PST) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ig8sm23183598igc.10.2013.02.09.23.07.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Feb 2013 23:07:35 -0800 (PST) Sender: Warner Losh Subject: Re: building RaspPi Images Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <58DCA6BE-8C06-4F69-81A2-A3582FBB5B12@kientzle.com> Date: Sun, 10 Feb 2013 00:07:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5116CB50.9080303@ceetonetechnology.com> <7757848F-45C6-4DEF-A4A2-5F900EB10A06@kientzle.com> <20130210012052.4d7e1a46@ivory.local> <58DCA6BE-8C06-4F69-81A2-A3582FBB5B12@kientzle.com> To: Tim Kientzle X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQkKH9QAWMItWm3gdLbRLP31NzjAYygWUkqP4IWeSWLSezKyYS8JYRC0z7BIBYqS8oQiNibr 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:07:37 -0000 On Feb 10, 2013, at 12:03 AM, Tim Kientzle wrote: > On Feb 9, 2013, at 10:20 PM, Brett Wynkoop wrote: >>=20 >> 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. >=20 > I've thought about this and believe it is pretty routine, > though I've not had time to actually try implementing it. >=20 > 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. >=20 > 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 uboot is supposed to be providing the correct FDT. IF we aren't using = it, we're doing FDT wrong and need to fix that. > Except for #3, this should all be entirely routine. >=20 > 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: >=20 > * 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. Doesn't the RPi's boot loader give our /boot/loader enough info to get = this without the fdt addr command? > * 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 why isnt' the beagle board's boot loader passing it to /boot/loader? > This should be an afternoon's work for someone who already > has a good understanding of FreeBSD boot processes. The real solution here is to get the FDT plumbed through from the boards = primary boot strap code into our code. Linux requires that this be = passed in via like r2 for Linux to boot. We should make use of that too. Warner