Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2007 09:50:03 +0200
From:      Marius Nuennerich <marius.nuennerich@gmx.de>
To:        Rafal Jaworowski <raj@semihalf.com>
Cc:        freebsd-arm@FreeBSD.ORG, freebsd-embedded@FreeBSD.ORG
Subject:   Re: Porting FreeBSD to the Neo1973 (arm920t)
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Sep 2007 18:22:54 +0200
Rafal Jaworowski <raj@semihalf.com> 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 <location> /tftpboot/kernel.bin
> - go <entry point>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070919095003.19d95312>