From owner-freebsd-arm@FreeBSD.ORG Mon Mar 5 19:40:21 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 1F6D816A400 for ; Mon, 5 Mar 2007 19:40:21 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.freebsd.org (Postfix) with ESMTP id B396813C491 for ; Mon, 5 Mar 2007 19:40:20 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id EFA1933CAE; Mon, 5 Mar 2007 21:40:18 +0200 (SAST) Date: Mon, 5 Mar 2007 21:40:18 +0200 From: John Hay To: "M. Warner Losh" Message-ID: <20070305194018.GA73100@zibbi.meraka.csir.co.za> References: <20070228102459.GB28669@zibbi.meraka.csir.co.za> <45E5A73E.20503@errno.com> <20070228.094155.660269855.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070228.094155.660269855.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arm@freebsd.org Subject: Re: redboot based boot loader for kernels? 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: Mon, 05 Mar 2007 19:40:21 -0000 > : > Hi, > : > > : > Does anyone have or is busy with an app that one can load in the > : > redboot flash, that will load the kernel from the active partition > : > of a compact flash? I know one can load the kernel in the redboot > : > flash, but that makes remote upgrading more difficult. The way I > : > have done with our wrap and soekris boards, is to create 2 slices > : > on the CF. When upgrading, you just format and install on the > : > non-active slice, change the active bit and reboot. > : > : A certain someone promised to add read/write support for the flash. > > That would be me... My day job has been crazy and my new son isn't > yet sleeping through the night. > > : When that happens another option is to write the new kernel to flash > : before rebooting. Otherwise we need a redboot image that grok's ufs or > : a secondary bootstrap that can be written to flash that knows how to > : boot from cf (I recall the latter might be in the obsd thecus work). > > The at91 boot2 groks ufs and only needs a function that can read the > sectors from the underlying media to grok new media. Of course, it > inherited most of that from the i386 boot2. Ok, I have it somewhat working for my Avila Gateworks board. I have a bug somewhere in the code that do 16 bit reads from the CF, so for now I have switched to 8 bit accesses. :-/ I'll search for that a little later. One thing that I would like to do is to pass the disk/slice info to the kernel. The reason being that I have 2 FreeBSD slices and would like the kernel to mount the one the boot loader tells it to. From looking at how some of the other archs do it, it looks like I will need some arm assembler foo. :-/ Anybody got ideas/code? I even thought of compiling the kernel with "options ROOTDEVNAME" and then the loader can load the kernel in ram and then search for the ufs:ad0s1a string and twiddle it as appropriate, but that would not work well with .gz.tramp kernels. :-) John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org