From owner-freebsd-mips@FreeBSD.ORG Mon Nov 29 23:00:49 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EEF51065673 for ; Mon, 29 Nov 2010 23:00:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D4EEE8FC19 for ; Mon, 29 Nov 2010 23:00:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oATMvvHR031108 for ; Mon, 29 Nov 2010 15:57:57 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4CF42FF5.6030401@bsdimp.com> Date: Mon, 29 Nov 2010 15:57:57 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 MIME-Version: 1.0 To: freebsd-mips@freebsd.org References: <201011181136.47152.milu@dat.pl> <201011241145.43480.freebsd-mips@dino.sk> In-Reply-To: <201011241145.43480.freebsd-mips@dino.sk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Re: First RSPRO deployed!] flash utility mkfwimage and RSPRO boot question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 23:00:49 -0000 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