From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by ozlabs.org (Postfix) with ESMTP id 7EE4167B62 for ; Wed, 26 Jul 2006 16:15:50 +1000 (EST) Received: by nf-out-0910.google.com with SMTP id c2so493245nfe for ; Tue, 25 Jul 2006 23:15:48 -0700 (PDT) Message-ID: Date: Wed, 26 Jul 2006 09:15:48 +0300 From: "Kalle Pokki" Sender: kallepokki@gmail.com To: "Clint Thomas" Subject: Re: Booting Linux Kernel without bootloader In-Reply-To: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_216858_12173082.1153894548115" References: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_Part_216858_12173082.1153894548115 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/26/06, Clint Thomas wrote: > Basically, the system I want linux running on does not require the > initialization of hardware that U-boot provides, or at least it does not > need it to boot the linux kernel. I want to load an uncompressed linux > kernel into memory and start the execution of the kernel, without using any > kind of bootloader. Is this possible? Or does linux need some kind of > firmware or other software to tell it to start executing? Thanks for any > info you might have. > Once the hardware is initialised, it is pretty straightforward to boot the linux kernel. All you have to have is the kernel at address zero, struct bd_info filled in some place in memory, kernel command line stored in memory, and registers r3 ... r7 containing pointers to these. For reference, look 1) include/asm-ppc/ppcboot.h for example struct bd_info 2) arch/ppc/syslib/m8260_setup.c for the registers If you have some custom hardware, you need to create (basically empty) platform code, since the existing ones would try to touch some board control registers you don't have. But remember, you need to initialise the memory controller and all sorts of things yourself somehow - with a JTAG debugger or a custom boot loader. ------=_Part_216858_12173082.1153894548115 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/26/06, Clint Thomas <cthomas@soneticom.com> wrote:

 
Basically, the system I want linux running on does not require the initialization of hardware that U-boot provides, or at least it does not need it to boot the linux kernel. I want to load an uncompressed linux kernel into memory and start the execution of the kernel, without using any kind of bootloader. Is this possible? Or does linux need some kind of firmware or other software to tell it to start executing? Thanks for any info you might have.

Once the hardware is initialised,  it is pretty straightforward to boot the linux kernel. All you have to have is the kernel at address zero, struct bd_info filled in some place in memory, kernel command line stored in memory, and registers r3 ... r7 containing pointers to these.

For reference, look
1) include/asm-ppc/ppcboot.h for example struct bd_info
2) arch/ppc/syslib/m8260_setup.c for the registers

If you have some custom hardware, you need to create (basically empty) platform code, since the existing ones would try to touch some board control registers you don't have.

But remember, you need to initialise the memory controller and all sorts of things yourself somehow - with a JTAG debugger or a custom boot loader.


------=_Part_216858_12173082.1153894548115--