Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2010 15:57:57 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        freebsd-mips@freebsd.org
Subject:   Re: [Re: First RSPRO deployed!] flash utility mkfwimage and RSPRO boot	question
Message-ID:  <4CF42FF5.6030401@bsdimp.com>
In-Reply-To: <201011241145.43480.freebsd-mips@dino.sk>
References:  <D74327E9-0A8A-4B46-B4DD-16D0FAF8E3BB@gmail.com>	<201011181136.47152.milu@dat.pl>	<CBBB7D88-210F-4706-A8FD-83FDA7EBA914@gmail.com> <201011241145.43480.freebsd-mips@dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/24/2010 03:45, Milan Obuch wrote:
> On a related problem - there is no boot loader for mips (as /boot/loader is
> for i386/amd64 and some variants). I would like to try it in place of kernel
> and have real kernel with some kernel modules (if built and placed in
> /boot/kernel, they work just fine - I did it with nullfs module, having
> if_vlan loaded gives me possibility to create arge1.1 etc) and some loader
> config, which could be used to set some FDT object properties if we decide to
> move later in this direction. All this would mean greater flexibility in my
> eyes.
There's a standardized interface on ARM right now for this sort of 
thing.  uboot can be compiled (CONFIG_API, iirc) such that it will 
remain resident during the /boot/loader stage and provide features that 
/boot/loader would normally get from the BIOS on x86.  There are efforts 
underway to port this to MIPS, but there's no work publicly available 
yet.  Porting the interface to redboot might be interesting, since the 
api/abi is defined by header files living inside uboot...

Of course, one could create custom drivers for /boot/loader that you 
could use to create a very specialized /boot/loader for your individual 
platform.  There'd be some additional tweaking to the early startup 
sequence as well to cope with the /boot/loader <-> kernel interface, but 
that's relatively minor.  Bonus points, however, if you make that goo 
configurable more easily.

There's no work underway to get FDT working on MIPS, as far as I know.  
However, I think it is a great idea.  Linux is moving that direction, 
and we'll eventually be able to leverage off Linux's dts blobs that 
board vendors will start shipping with their kit.

IIRC, there were some minor cleanup issues needed to get /boot/loader 
compiling on MIPS.  But I last tried 3 years or so ago and haven't paid 
much attention since then.  Looking at what's there now, it appears that 
you'd need to create a mips subdirectory, a Makefile.mips listing common 
subdirs, and you'd need to make sure that the ficl/mips tree is, like, 
real.  Once you had all that, you'd be able to start writing custom 
drivers for reading the flash blocks...

Warner



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