[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ARM boot process
- To: "M. Warner Losh" <imp_(_at_)_bsdimp_(_dot_)_com>
- Subject: Re: ARM boot process
- From: Andre Oppermann <andre_(_at_)_freebsd_(_dot_)_org>
- Date: Tue, 05 Sep 2006 19:04:21 +0200
- Cc: freebsd-arm_(_at_)_freebsd_(_dot_)_org
M. Warner Losh wrote:
In message: <44FC3626_(_dot_)_701_(_at_)_freebsd_(_dot_)_org>
Andre Oppermann <andre_(_at_)_freebsd_(_dot_)_org> writes:
: I'm new to the embedded system world and have got some Atmel
: at91rm9200 eval boards I'm playing with. Most of them came
: with Linux and some boot loader to it.
: The supplied boot loaders can't load a FreeBSD arm kernel and
: complain about wrong magic.
Which kernel were you using?
After I sent the original email I tried a couple of things and got
some help on developers IRC as well (missing you there lately).
What I did was to check out the arm tree from p4 and do a 'make
TARGET_ARCH=arm kernel-toolchain' followed by a 'make TARGET_ARCH=
arm KERNCONF=KB920X buildkernel'. The KB920X is modified such that
it includes the hints.at91rm9200. One step I somehow did but can't
reproduce today was the 'make trampoline' target. Every time and way
I try it now fails in elf_trampoline.c because it doesn't have proper
sys/* includes as seen from the kernel compile directory. There I'm
stuck right now. The kernel from yesterday successfully boots on the
KB9202 and mounts root over NFS. The loader is the super-primitive
one that comes with the board. I'm setting mac, ip and tftp server
address, do the tftp download to 0x20000000 and start from that address.
What I've got no clue yet is how to build a MFS image that gets fused
with the kernel so I may skip NFS and boot with only TFTP or even put
it on flash.
boot0* is to bootstrap the board. boot0 lets you load an arbitrary
program to execute. boot0iic allows you to load an image to put in
the iic eeprom (maybe on only on the KB9202). boot0spi allows you to
load an image into the SPI part.
bootiic is usually what you put in the iic part to boot. It's fully
functional. If you have different eeprom parts, you'll need to tweak
OK, this looks pretty much like the Kwikbyte loader.
bootspi is what I put in the SPI part. It is presently optimized for
the part that I have, and might need some tweaks.
bootsd will boot off a SD card. It doesn't quite work yet, there's
some unaligned accesses that I'm still working on sorting out...
SD is the interesting part. ;-)
I included the qdmmc driver in my working kernel as well but it fails
to detect an inserted SD (1GB) or MMC (16MB) card. How does the IO pin
setup on the AT91RM9200 work? Where are the IOs assigned to the functions?
: For the at91rm9200 a number of boot loaders are in boot/arm/
: but so far I haven't figured out which one to use. Eventually
: I'd like to have it boot from the SD card.
That's not yet in the tree. I'm working on booting off a UFS
I've not looked at integrating the SD support with things like redboot
or uboot yet.
What does boot2 do? And how can I boot an ARM kernel w/o doing the
trampoline step? Is that possible at all?
Once I'm up to speed and familiar with ARM/AT91RM9200 I'm ready to help
on improving it. The devices/ports I'll primarily care about and will
use are SPI, TWI, 8bit parallel bus, SD/MMC, SSC, EMAC.
freebsd-arm_(_at_)_freebsd_(_dot_)_org mailing list
To unsubscribe, send any mail to "freebsd-arm-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org