From owner-freebsd-arm@FreeBSD.ORG Tue Oct 9 09:10:21 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB38361D; Tue, 9 Oct 2012 09:10:20 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 496B98FC14; Tue, 9 Oct 2012 09:10:19 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id c50so3588121eek.13 for ; Tue, 09 Oct 2012 02:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ca9uLA11LIoxfxkb0fxsWviWzzoKKQu5/4TgR/CE3T0=; b=Z3ZlunjWjFIBIPt7bH1Rm194xdKVA80YB6ptYdLdzxoDNfKhH0OV7rWXkJcdiVx9vE OIjir440P43C5WNJWsBz9CCiHEdWCpqubJb3fiq/fPwYuRC1GqLSX62O+Wt3AEb+9CcM /GtTeHO9RUMM3nGSpL3OcyWhvf8O+ZlFpnF4BSHhm5LSLK7p23Q1jDFcOe3TPkxMaz81 RSuBY9Rf7f5MgUQcJ+/hWpwLtyUdoqwKfLDqtgYFOXfFrpWdj9Sd0jB5jHF8CIcHb+7J vBIkqn5sebO0XVnJN0ZamfD/TAcevDGwXyjoq+il0d8jYRZ88bfOqDAzaT1zuwrGTsjK DCIw== MIME-Version: 1.0 Received: by 10.14.184.133 with SMTP id s5mr26599256eem.31.1349773818932; Tue, 09 Oct 2012 02:10:18 -0700 (PDT) Received: by 10.14.140.205 with HTTP; Tue, 9 Oct 2012 02:10:18 -0700 (PDT) In-Reply-To: <8C1192B3-EC56-4D9E-824E-774700FB2EE9@kientzle.com> References: <0DCAC001-FF06-431A-A486-2B50BE913B0D@bsdimp.com> <7E18623F-3945-4EA0-B332-5A5C717B20F0@kientzle.com> <9896AA3E-D8A0-4CE8-8160-4672AA07388F@cheney.net> <6B74ADD7-3266-4919-BEB4-B10E0C1BAB58@kientzle.com> <5679C679-A434-4714-BE61-4DC093DA7F34@kientzle.com> <8C1192B3-EC56-4D9E-824E-774700FB2EE9@kientzle.com> Date: Tue, 9 Oct 2012 17:10:18 +0800 Message-ID: Subject: Re: Towards an ARM system-building script From: Ganbold Tsagaankhuu To: Tim Kientzle Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: arm@freebsd.org, Oleksandr Tymoshenko 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: Tue, 09 Oct 2012 09:10:21 -0000 On Tue, Oct 9, 2012 at 12:42 PM, Tim Kientzle wrote: > > On Oct 8, 2012, at 9:07 PM, Ganbold Tsagaankhuu wrote: > >> On Mon, Sep 24, 2012 at 2:55 AM, Tim Kientzle wrote: >>> On Sep 4, 2012, at 9:52 PM, Tim Kientzle wrote: >>>> On Sep 4, 2012, at 9:33 PM, Dave Cheney wrote: >>>> >>>>> Sorry to butt in on this discussion, but how feasible would it be to = adapt this build script to the pandaboard. I understand there may be a conf= ig in svn similar to the beaglebone which may be applicable. > >>> I've made significant progress and would >>> appreciate any feedback: >>> >>> github.com/kientzle/freebsd-beaglebone >>> >>> * PandaBoard: I have a completely untested >>> sketch. Someone with a PandaBoard will need >>> to work through the U-Boot configuration to make >>> this work. >> >> I tried your script on PandaBoard ES. >> Basically it works with some modifications/considerations: > > Wonderful! Thanks for trying it! > > Please send me any patches you used; I'll try > to incorporate them. > >> 1. PANDABOARD kernel config should be modified to use mmcsd card as root= . > > Would anyone object to adding this line to FreeBSD SVN? > > # Boot device is 2nd slice on MMC/SD card > options ROOTDEVNAME=3D\"ufs:mmcsd0s2\" > > >> 2. u-boot build complains about the board was configured to support THUM= B mode > > Hmmm=85 Not sure I understand this. > >> 3. Maybe there is need some more patches to have correct u-boot.bin, >> since it looks for uImage for instance > > There will certainly need to be some U-Boot patches. > > Perhaps Oleksandr can point us to the source he > used for that u-boot.bin? If so, I can help fill in > the options so it can correctly chain ubldr. > >> 4. I didn't dig into ubldr/u-boot much, instead modified uEnv.txt to >> load kernel.bin from first partition which is FAT. I tried 8MB of FAT. Progress, seems like ubldr is working after patching u-boot. Here are the patches, uEnv.txt etc: http://people.freebsd.org/~ganbold/pandaboard/ MLO is used from http://people.freebsd.org/~gonzo/pandaboard/ Ganbold >> 5. I used MLO, u-boot.bin from http://people.freebsd.org/~gonzo/pandaboa= rd/ >> >> So how does ubldr work? Can it load kernel.bin from second partition >> in case of PandaBoard? > > Yes, it can. At heart, ubldr is the same as the FreeBSD > loader(8) that's used for i386/amd64 booting. In particular, > it can load the kernel from UFS. > > The main difference between ubldr and loader(8) > is in how they access hardware: loader(8) uses > the PC BIOS and ubldr talks to U-Boot to do low-level > device access. > > I think ubldr makes a lot of sense for BeagleBone and > probably PandaBoard. I'm not sure it makes sense > for Raspberry Pi, though that's a different discussion. > > But ubldr requires that U-Boot be built with a few > non-standard options, so again we'll certainly have > to patch U-Boot to enable those options. > > > Tim >