From owner-freebsd-embedded@FreeBSD.ORG Wed Sep 19 07:49:58 2007 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07B2316A419 for ; Wed, 19 Sep 2007 07:49:58 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 53C9113C49D for ; Wed, 19 Sep 2007 07:49:56 +0000 (UTC) (envelope-from marius.nuennerich@gmx.de) Received: (qmail invoked by alias); 19 Sep 2007 07:49:55 -0000 Received: from f049187105.adsl.alicedsl.de (EHLO sol.hackerzberg.local) [78.49.187.105] by mail.gmx.net (mp047) with SMTP; 19 Sep 2007 09:49:55 +0200 X-Authenticated: #5707313 X-Provags-ID: V01U2FsdGVkX18Jz2ZmHjMJ/87ACjV/oXX47EJSic/UxsC7nek/zR nHxZZHA9WL6ox+ Date: Wed, 19 Sep 2007 09:50:03 +0200 From: Marius Nuennerich To: Rafal Jaworowski Message-ID: <20070919095003.19d95312@sol.hackerzberg.local> In-Reply-To: <46EFFB5E.9040407@semihalf.com> References: <20070918115334.569521c1@sol.hackerzberg.local> <20070918.080043.-1625879466.imp@bsdimp.com> <46EFFB5E.9040407@semihalf.com> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.12; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-arm@FreeBSD.ORG, freebsd-embedded@FreeBSD.ORG Subject: Re: Porting FreeBSD to the Neo1973 (arm920t) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 07:49:58 -0000 On Tue, 18 Sep 2007 18:22:54 +0200 Rafal Jaworowski wrote: > M. Warner Losh wrote: > > : > > : Any idea what to do next? How to get the uart working? And how to tell > > : the kernel to use it as console? > > > > It might also make sense to create a mkimage port. I have another > > AT91RM9200 board with uboot I'd like to be able to boot from... > > > > If you mean mkimage from U-Boot, it doesn't require to be "ported" as it > already supports branding images as FreeBSD right now. The problem is > that stock U-Boot would not recognize them during usual boot command. > There are modifications to U-Boot required to run FreeBSD kernel directly. > > For FreeBSD/powerpc running with U-Boot we have loader(8) running as a > second stage bootloader on top of it (as a standalone app), which loads > and runs the kernel, providing it with full metadata etc. This however > needs changes to U-Boot itself, and they were not merged with its > mainline yet, but I can provide patches if you're intersted. For the > loader(8) piece you can have a look at some preliminary approach in the > e500 branch in P4 for reference: in particular it has a common library > that is intended to be used also on ARM, MIPS etc., only the lowest > level gluing needs equivalent asm routines. Do we really need loader(8)? > > For early development however there's a quick path that one can always > exercise to boot the kernel (or anything else): > > 1. on the host: > - build FreeBSD kernel > - objcopy it to kernel.bin > > 2. at U-Boot > - tftp /tftpboot/kernel.bin > - go Sadly this won't work with qemu-neo1973 on FreeBSD, because it's not possible to attach emulated usb devices from qemu to the freebsd host. I think something like gadgetfs in linux is missing for that. And even if we had that I don't know if u-boot is capable of speaking CDC ethernet over usb so that we can tftp the kernel. The Neo1973 has no real ethernet onboard. Another way is possibly to copy the kernel to an sd card (or image for qemu) and boot it from there. But until now qemu always says size = 0 when I use -sd sd.img. And I haven't found a way to format I file with fat32. I installed e2fsprogs and will try that later as u-boot can read ext2 too. Kind regards Marius