From owner-freebsd-ppc@FreeBSD.ORG Fri Jun 2 19:46:24 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E74E16A4F6; Fri, 2 Jun 2006 19:46:24 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [62.233.211.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2EF643D60; Fri, 2 Jun 2006 19:46:23 +0000 (GMT) (envelope-from raj@semihalf.com) Received: from localhost (localhost [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 3C1B814286; Fri, 2 Jun 2006 21:46:21 +0200 (CEST) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05558-04; Fri, 2 Jun 2006 21:46:20 +0200 (CEST) Message-ID: <4480958B.2060205@semihalf.com> Date: Fri, 02 Jun 2006 21:46:19 +0200 From: Rafal Jaworowski MIME-Version: 1.0 To: Aditya Godbole References: <4b178a13.c18b236b.81b8e00@dommail.onthenet.com.au> In-Reply-To: <4b178a13.c18b236b.81b8e00@dommail.onthenet.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Peter Grehan , freebsd-ppc@freebsd.org Subject: Re: Booting from u-boot X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2006 19:46:25 -0000 Peter Grehan wrote: >> I was thinking of writing an openfirmware emulator code >> that will map the information given by u-boot to the format >> expected by the freebsd openfirmware code. In other words, >> implement the 'openfirmware' function in the kernel itself >> and use it. > > That is an interesting approach, though you may end up doing > just as much work in writing the emulation code as if you > removed the dependency on openfirmware in the kernel. > I would agree with what Peter says - and it's not particularly difficult to divorce the kernel from OF and bind it to something else instead. I did this sort of thing while doing a FreeBSD port to an MCP750 CompactPCI board which had Motorola's PPCBug firmware. One of the things you could also consider would be not booting the kernel directly off U-Boot but getting the 3rd stage loader(8) run first, so you could pass the kernel env in the native way (that's what I did on the PPCBug) and generally have the kernel in the form it normally is produced with buildkernel (and not prepend it with U-Boot header etc.). Having said that I'd be actually very interested in your making the FreeBSD kernel compliant with U-Boot and be able to run it directly. >> Has anyone done this before? > > Not to my knowledge. > We ported U-Boot to many h/w platforms and know it pretty well, also brought FreeBSD to this compactPCI board, so might help you somehow. What device are you using? Rafal