From owner-freebsd-arm@FreeBSD.ORG Thu Feb 15 16:46:29 2007 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E44416A401 for ; Thu, 15 Feb 2007 16:46:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 227D813C474 for ; Thu, 15 Feb 2007 16:46:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l1FGk03G002439; Thu, 15 Feb 2007 09:46:00 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 15 Feb 2007 09:46:42 -0700 (MST) Message-Id: <20070215.094642.1645217654.imp@bsdimp.com> To: krassi@bulinfo.net From: "M. Warner Losh" In-Reply-To: <45D45269.4050509@bulinfo.net> References: <45D3119F.4020302@bulinfo.net> <20070214.083339.-1581797982.imp@bsdimp.com> <45D45269.4050509@bulinfo.net> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 15 Feb 2007 09:46:00 -0700 (MST) Cc: freebsd-arm@freebsd.org Subject: Re: At91rm9200 boot? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2007 16:46:29 -0000 In message: <45D45269.4050509@bulinfo.net> Krassimir Slavchev writes: : M. Warner Losh wrote: : > In message: <45D3119F.4020302@bulinfo.net> : > Krassimir Slavchev writes: : > : I have board with at91rm9200, 64Mb SDRAM, 4Mb dataflash and 64kb iic. : > : There is bootloader installed in iic which boots linux kernel from : > : dataflash. : > : What I need to know for this bootloader to be able to boot FreeBSD kernel? : > : > How to install the FreeBSD kernel in place of the linux kernel : > currently in dataflash. : > : > Depending on the dataflash, you may also be able to do any or all of : > the following: : > (1) install the freebsd boot loader that boots from SD cards (boot2) : > (2) install the freebsd boot loader that boots from dataflash (bootspi) : > : These boot loaders can't be fitted in the 8kbytes eeprom (24C64). Well, they could be made to fit into 8KB, but they don't right now. A lot of effort has been made to make them small. bootspi likely is the easiest candidate, since it is closest. I tried really hard to make boot2 fit into 8k, but ran out of time. I did manage to slim down the boot loaders from about 48k when I started to 9-10k after all was said and done. The at91rm9200 parts have 16k of SRAM, of which 12k are useful. The newer AT91SAM926x parts have only 4kb of SRAM, so I'm unsure what I'll be doing there. : > (3) Use the FreeBSD dataflash support to manage this situation. : > : Where to find more information about this support? At the moment there's only source. src/sys/dev/flash/at45d.c has the main support for dataflash. SPI infrastructure is in src/sys/dev/spi and src/sys/arm/at91/at91_spi.c. /dev/flash/spi0, etc, appears when these devices are active. The block size that the dataflash supports is, alas, hard coded into at45d.c file at the moment, but I think that most parts have at least some support in there. Warner