From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Soneticom.com (soneticom.com [209.114.210.150]) by ozlabs.org (Postfix) with ESMTP id 6678A67B67 for ; Wed, 26 Jul 2006 08:43:00 +1000 (EST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6B039.F45657A4" Subject: Booting Linux Kernel without bootloader Date: Tue, 25 Jul 2006 18:30:39 -0400 Message-ID: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> From: "Clint Thomas" To: List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------_=_NextPart_001_01C6B039.F45657A4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey guys, I have gone through the Linuxppc embedded and dev lists for information related to what I am trying to do, but was unable to find exactly what i'm looking for. 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. =20 Clinton Thomas cthomas@soneticom.com =20 ------_=_NextPart_001_01C6B039.F45657A4 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hey = guys,

I=20 have gone through the Linuxppc embedded and dev lists for information = related to=20 what I am trying to do, but was unable to find exactly what i'm looking=20 for.

Basically, the system I want linux running on does not = require the=20 initialization of hardware that U-boot provides, or at least it does not = need it=20 to boot the linux kernel. I want to load an uncompressed linux kernel = into=20 memory and start the execution of the kernel, without using any kind of=20 bootloader. Is this possible? Or does linux need some kind of firmware = or other=20 software to tell it to start executing? Thanks for any info you might=20 have.
 
Clinton=20 Thomas
cthomas@soneticom.com
 
------_=_NextPart_001_01C6B039.F45657A4-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mercury.testsyseng.com (unknown [209.120.144.205]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id F09B667B71 for ; Wed, 26 Jul 2006 09:57:56 +1000 (EST) Message-ID: <44C6AB80.9040000@digis.net> Date: Tue, 25 Jul 2006 17:38:40 -0600 From: bennett78 MIME-Version: 1.0 To: Clint Thomas Subject: Re: Booting Linux Kernel without bootloader References: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> In-Reply-To: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> Content-Type: multipart/alternative; boundary="------------060304030901080100020007" Cc: linuxppc-embedded@ozlabs.org Reply-To: bennett78@digis.net List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------060304030901080100020007 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Clint Thomas wrote: > Hey guys, > > I have gone through the Linuxppc embedded and dev lists for > information related to what I am trying to do, but was unable to find > exactly what i'm looking for. > > 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. You seem to be looking for a striped down U-boot functionality: o copy flash to ram and run code but to do this: o processor registers need to be initilized o caches need to be flushed o interrupts need to be disabled o C environment (stack) needs to be setup U-boot is fairly small compared to a x86 BIOS which has to find multiple boot device choices, yet supports multiple architectures. I'm using a BDI2000 to load/debug u-boot running in SDRAM for a new PPC hardware design. U-boot is probably easier to debug than the kernel! U-boot has other features that help with initial H/W turnon: o it's a debug/monitor o ram test o ram/register read/modify o u-boot environment o IP address, mac address o Linux boot options - NFS verses flash o Ethernet/NFS option using a server enables: o debugging kernel changes o debugging kernel driver modules o quick change of application processes o cross compile target code on server to local target o telnet to embedded H/W o knows how to flash partitions o u-boot (/dev/mtd0) (well I use the BDI to flash here) o can flash kernel (/dev/mtd1) o can flash root fs (/dev/mtd2) o can flash config data (/dev/mtd3) o this partitioning will help with future F/W updates o kind of required if your flash is soldered to the board o to read/write flash requires u-boot to relocate itself to ram > > Clinton Thomas > cthomas@soneticom.com > _______________________________________________ > >Linuxppc-embedded mailing list >Linuxppc-embedded@ozlabs.org >https://ozlabs.org/mailman/listinfo/linuxppc-embedded > Frank Bennett */Technical Contractor/* /Triad Systems Engineering 200 West Mountain Avenue, Suite 103C Ft. Collins, CO 80521 /http://www.traidsyseng.com frank.bennett@triadsyseng.com / / "I think there's a world market for about five computers." -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943 --------------060304030901080100020007 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Clint Thomas wrote:
Hey guys,

I have gone through the Linuxppc embedded and dev lists for information related to what I am trying to do, but was unable to find exactly what i'm looking for.

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.
You seem to be looking for a striped down U-boot functionality:
    o copy flash to ram and run code
but to do this:
    o processor registers need to be initilized
    o caches need to be flushed
    o interrupts need to be disabled
    o C environment (stack) needs to be setup
U-boot is fairly small compared to a x86 BIOS which has to find
multiple boot device choices, yet supports multiple architectures.

I'm using a BDI2000 to load/debug u-boot running in SDRAM
for a new PPC hardware design.  U-boot is probably easier to
debug than the kernel!
U-boot has other features that help with initial H/W turnon:
    o it's a debug/monitor
          o ram test
          o ram/register read/modify
    o u-boot environment
          o IP address, mac address
          o Linux boot options - NFS verses flash
          o Ethernet/NFS option using a server enables:
             o debugging kernel changes
             o debugging kernel driver modules
             o quick change of application processes
             o cross compile target code on server to local target
             o telnet to embedded H/W
    o knows how to flash partitions
          o u-boot (/dev/mtd0) (well I use the BDI to flash here)
          o can flash kernel (/dev/mtd1)
          o can flash root fs (/dev/mtd2)
          o can flash config data (/dev/mtd3)
          o this partitioning will help with future F/W updates
          o kind of required if your flash is soldered to the board
          o to read/write flash requires u-boot to relocate itself to ram
 
Clinton Thomas
cthomas@soneticom.com
 _______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Frank Bennett
Technical Contractor

Triad Systems Engineering
200 West Mountain Avenue, Suite 103C
Ft. Collins, CO 80521
http://www.traidsyseng.com
frank.bennett@triadsyseng.com

"I think there's a world market for about five computers."
        -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943



--------------060304030901080100020007-- 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.dev.rtsoft.ru (unknown [85.21.88.2]) by ozlabs.org (Postfix) with SMTP id 3CD8667B5D for ; Wed, 26 Jul 2006 20:42:23 +1000 (EST) Message-ID: <44C747E0.2010207@ru.mvista.com> Date: Wed, 26 Jul 2006 14:45:52 +0400 From: Andrei Konovalov MIME-Version: 1.0 To: Clint Thomas Subject: Re: Booting Linux Kernel without bootloader References: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> In-Reply-To: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Clint, You may want to look at the arch/ppc/boot/simple bootwrapper. This wrapper links together with the compressed kernel image into single file. One just needs to load this file into memory and pass control to the wrapper. The bootwrapper uncompresses the kernel into memory and passes the board information in bd_t structure. As an example, Xilinx ML300 or ML403 boards (without any firmware) can be booted this way: load zImage.elf into RAM (e.g. using JTAG debugger) and jump to the the wrapper entry point. This stuff is not in arch/powerpc yet, but recently Mark Greer has posted the patches to fix that: [PATCH 0/6] bootwrapper: arch/powerpc/boot code reorg patches Thanks, Andrei Clint Thomas wrote: > Hey guys, > > I have gone through the Linuxppc embedded and dev lists for information > related to what I am trying to do, but was unable to find exactly what > i'm looking for. > > 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. > > Clinton Thomas > cthomas@soneticom.com > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-embedded From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ruth.realtime.net (mercury.realtime.net [205.238.132.86]) by ozlabs.org (Postfix) with ESMTP id 49161679E9 for ; Thu, 27 Jul 2006 00:48:29 +1000 (EST) Date: Wed, 26 Jul 2006 09:06:25 -0500 From: Milton Miller To: cthomas@Soneticom.com, linuxppc-embedded@ozlabs.org, Subject: Re: Booting Linux Kernel without bootloader Message-Id: <11153922785140e0f761.861021530.miltonm@bga.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue Jul 25 2006 05:30:39 PM CDT, 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. To run a powerpc (not ppc, which will be removed) kernel, in addition to the uncompressed kernel you will need to supply a device tree structure, point r3 to it, zero r5, and set r4 to the load address (zero as you have described). See Documentation/powerpc/booting-without-of.txt for details. Then arrange for you processor to start executing at address 0. Note that /vmlinux has an elf header, you can use objcopy to remove it or adjust r4 and your start point; the kernel will copy itself to 0, clear bss and set up the stack. The device tree structure must be placed above the bss space in memory, not just the initialized data. milton From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [63.240.77.83]) by ozlabs.org (Postfix) with ESMTP id 0799267A2E for ; Fri, 28 Jul 2006 18:04:01 +1000 (EST) Message-ID: <44C9C4E4.2060206@dlasys.net> Date: Fri, 28 Jul 2006 04:03:48 -0400 From: "David H. Lynch Jr." MIME-Version: 1.0 To: Clint Thomas , linuxppc-embedded Subject: Re: Booting Linux Kernel without bootloader References: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> In-Reply-To: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> Content-Type: multipart/alternative; boundary="------------030408080004050600060401" Reply-To: dhlii@comcast.net List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------030408080004050600060401 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Clint Thomas wrote: > Hey guys, > > I have gone through the Linuxppc embedded and dev lists for > information related to what I am trying to do, but was unable to find > exactly what i'm looking for. > > 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. You system powers on. It starts executing whatever is at the reset vector, Something has to get you from the ppc powering up and going to never never land, to starting to execute Linux. The steps to get from Power on to booting Linux may not be that complicated, Much of what needs to be done can likely be included as part of the code for your board in arch/ppc/boot/simple. But something still has to be done. In my instance I am dealing with a Xilinx V4 (not an ML403). A small "monitor" program is automatically loaded as part of the FPGA .bit image. On power on it starts executing. It sets up the CPU, cache, and very minimal hardware configuration, and then loads Linux out of flash and executes it. Linux does not have to have alot setup to boot. But something has to to some minimal initial setup, get Linux into the memory of your system, and jump to it. > > Clinton Thomas > cthomas@soneticom.com > > ------------------------------------------------------------------------ > > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-embedded -- Dave Lynch DLA Systems Software Development: Embedded Linux 717.627.3770 dhlii@dlasys.net http://www.dlasys.net fax: 1.253.369.9244 Cell: 1.717.587.7774 Over 25 years' experience in platforms, languages, and technologies too numerous to list. "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." Albert Einstein --------------030408080004050600060401 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Clint Thomas wrote:
Hey guys,

I have gone through the Linuxppc embedded and dev lists for information related to what I am trying to do, but was unable to find exactly what i'm looking for.

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.

    You system powers on. It starts executing whatever is at the reset vector, Something has to get you from the ppc powering up and going to never never land, to starting to execute Linux.
    The steps to get from Power on to booting Linux may not be that complicated, Much of what needs to be done can likely be included as part of the code for your board in arch/ppc/boot/simple.
    But something still has to be done.

    In my instance I am dealing with a Xilinx V4 (not an ML403). A small "monitor" program is automatically loaded as part of the FPGA .bit image. On power on it starts executing.
    It sets up the CPU, cache, and very minimal hardware configuration, and then loads Linux out of flash and executes it.
   
    Linux does not have to have alot setup to boot. But something has to to some minimal initial setup, get Linux into the memory of your system, and jump to it.


   




 
Clinton Thomas
cthomas@soneticom.com
 

_______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
--------------030408080004050600060401-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mercury.testsyseng.com (unknown [209.120.144.205]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 0C9CD67A2E for ; Sat, 29 Jul 2006 00:03:15 +1000 (EST) Message-ID: <44CA1909.5080001@digis.net> Date: Fri, 28 Jul 2006 08:02:49 -0600 From: bennett78 MIME-Version: 1.0 To: dhlii@comcast.net Subject: Re: Booting Linux Kernel without bootloader References: <3C02138692C13C4BB675FE7EA240952915DF66@bluefin.Soneticom.local> <44C9C4E4.2060206@dlasys.net> In-Reply-To: <44C9C4E4.2060206@dlasys.net> Content-Type: multipart/alternative; boundary="------------070108020504090709010501" Cc: Clint Thomas , linuxppc-embedded Reply-To: bennett78@digis.net List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------070108020504090709010501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David H. Lynch Jr. wrote: > Clint Thomas wrote: > >> Hey guys, >> >> I have gone through the Linuxppc embedded and dev lists for >> information related to what I am trying to do, but was unable to find >> exactly what i'm looking for. >> >> 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. > > > You system powers on. It starts executing whatever is at the reset > vector, Something has to get you from the ppc powering up and going to > never never land, to starting to execute Linux. > The steps to get from Power on to booting Linux may not be that > complicated, Much of what needs to be done can likely be included as > part of the code for your board in arch/ppc/boot/simple. > But something still has to be done. > > In my instance I am dealing with a Xilinx V4 (not an ML403). A > small "monitor" program is automatically loaded as part of the FPGA > .bit image. On power on it starts executing. Curious, how long does the V4 take to load up it's brain? (using a serial EEprom?) > It sets up the CPU, cache, and very minimal hardware > configuration, and then loads Linux out of flash and executes it. > > Linux does not have to have alot setup to boot. But something has > to to some minimal initial setup, get Linux into the memory of your > system, and jump to it. > >> >> Clinton Thomas >> cthomas@soneticom.com >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Linuxppc-embedded mailing list >>Linuxppc-embedded@ozlabs.org >>https://ozlabs.org/mailman/listinfo/linuxppc-embedded >> > > >-- >Dave Lynch DLA Systems >Software Development: Embedded Linux >717.627.3770 dhlii@dlasys.net http://www.dlasys.net >fax: 1.253.369.9244 Cell: 1.717.587.7774 >Over 25 years' experience in platforms, languages, and technologies too numerous to list. > >"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." >Albert Einstein > > >------------------------------------------------------------------------ > >_______________________________________________ >Linuxppc-embedded mailing list >Linuxppc-embedded@ozlabs.org >https://ozlabs.org/mailman/listinfo/linuxppc-embedded > Frank Bennett */Technical Contractor/* /Triad Systems Engineering 200 West Mountain Avenue, Suite 103C Ft. Collins, CO 80521 /http://www.traidsyseng.com frank.bennett@triadsyseng.com / /office: 970-493-7586 cell: 970-402-9269 "I think there's a world market for about five computers." -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943 --------------070108020504090709010501 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit David H. Lynch Jr. wrote:
Clint Thomas wrote:
Hey guys,

I have gone through the Linuxppc embedded and dev lists for information related to what I am trying to do, but was unable to find exactly what i'm looking for.

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.

    You system powers on. It starts executing whatever is at the reset vector, Something has to get you from the ppc powering up and going to never never land, to starting to execute Linux.
    The steps to get from Power on to booting Linux may not be that complicated, Much of what needs to be done can likely be included as part of the code for your board in arch/ppc/boot/simple.
    But something still has to be done.

    In my instance I am dealing with a Xilinx V4 (not an ML403). A small "monitor" program is automatically loaded as part of the FPGA .bit image. On power on it starts executing.
Curious, how long does the V4 take to load up it's brain? (using a serial EEprom?)
    It sets up the CPU, cache, and very minimal hardware configuration, and then loads Linux out of flash and executes it.
   
    Linux does not have to have alot setup to boot. But something has to to some minimal initial setup, get Linux into the memory of your system, and jump to it.

 
Clinton Thomas
cthomas@soneticom.com
 

_______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
  

_______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Frank Bennett
Technical Contractor

Triad Systems Engineering
200 West Mountain Avenue, Suite 103C
Ft. Collins, CO 80521
http://www.traidsyseng.com
frank.bennett@triadsyseng.com
office: 970-493-7586
cell:   970-402-9269

"I think there's a world market for about five computers."
        -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943



--------------070108020504090709010501-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from web36601.mail.mud.yahoo.com (web36601.mail.mud.yahoo.com [209.191.85.18]) by ozlabs.org (Postfix) with SMTP id 1BEE467B82 for ; Wed, 2 Aug 2006 13:49:08 +1000 (EST) Message-ID: <20060802034907.22411.qmail@web36601.mail.mud.yahoo.com> Date: Tue, 1 Aug 2006 20:49:07 -0700 (PDT) From: Parav Pandit Subject: Re: Booting Linux Kernel without bootloader To: Milton Miller , cthomas@Soneticom.com, linuxppc-embedded@ozlabs.org In-Reply-To: <11153922785140e0f761.861021530.miltonm@bga.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --- Milton Miller wrote: > On Tue Jul 25 2006 05:30:39 PM CDT, 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. > > To run a powerpc (not ppc, which will be removed) > kernel, in addition to the uncompressed kernel you > will need to supply a device tree structure, point > r3 to it, zero r5, and set r4 to the load address > (zero as you have described). See > Documentation/powerpc/booting-without-of.txt for > details. Then arrange for you processor to start > executing at address 0. Note that /vmlinux has an > elf header, you can use objcopy to remove it or > adjust r4 and your start point; the kernel will copy > itself to 0, clear bss and set up the stack. The > device tree structure must be placed above the bss > space in memory, not just the initialized data. Linux kernel does the bss cleaning after start_kernel() even though boot loader does it. So one step less. Parav > > milton > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-embedded > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by ozlabs.org (Postfix) with ESMTP id 7BB3C67B72 for ; Wed, 2 Aug 2006 14:17:44 +1000 (EST) Received: by ug-out-1314.google.com with SMTP id e2so1658383ugf for ; Tue, 01 Aug 2006 21:17:42 -0700 (PDT) Message-ID: <528646bc0608012117i6a5afb37l7e9ee327309aca9b@mail.gmail.com> Date: Tue, 1 Aug 2006 22:17:41 -0600 From: "Grant Likely" Sender: glikely@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: text/plain; charset=ISO-8859-1; format=flowed 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: , On 7/25/06, Clint Thomas wrote: > > > Hey guys, > > I have gone through the Linuxppc embedded and dev lists for information > related to what I am trying to do, but was unable to find exactly what i'm > looking for. > > 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. Loading a kernel into memory and starting execution *is* a boot loader. :) You could use the bootwrapper that is in the kernel source tree (zImage). If a zImage's entry point is at the execution entry point, then it will start the Linux kernel correctly. However, it is still a compressed image. If you *really* need an uncompressed image, I would start with the bootwrapper and hack it to work with an non-gzipped kernel image. However, why do you want to do it this way? You probably won't gain much in boot time and it will be more difficult to maintain. Cheers, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ruth.realtime.net (mercury.realtime.net [205.238.132.86]) by ozlabs.org (Postfix) with ESMTP id 94F6967C1A for ; Thu, 3 Aug 2006 19:46:12 +1000 (EST) Date: Thu, 3 Aug 2006 02:48:21 -0500 From: Milton Miller To: grant.likely@secretlab.ca, cthomas@soneticom.com, Subject: Re: Booting Linux Kernel without bootloader Message-Id: <311545913012eb141f24.1102520059.miltonm@bga.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue Aug 1 2006 11:17:41 PM CDT, Grant Likely wrote: > On 7/25/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. > > Loading a kernel into memory and starting execution *is* a boot loader. :) If it's running on the cpu, then I agreee. But he didn't say how he was loading the image into memory, and if it is via an external agent then I would not necessarly call that a boot loader, altough it is performing those tasks. Actually, that may be too broad. Is kexec a boot loader? > > You could use the bootwrapper that is in the kernel source tree > (zImage). If a zImage's entry point is at the execution entry point, > then it will start the Linux kernel correctly. However, it is still a > compressed image. > The boot wrapper is a reference implementation, not a required piece of the boot sequence. As I stated in my previous post, the kernel entry conditions are documted and loading the vmlinux raw is reasonable, asssuming that the other conditions can be met (registers and device treee, and maybe initrd). > If you *really* need an uncompressed image, I would start with the > bootwrapper and hack it to work with an non-gzipped kernel image. > However, why do you want to do it this way? You probably won't gain > much in boot time and it will be more difficult to maintain. Actually, the code is aready there to just copy anything inthe kernel section that is without the gzip header. milton From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by ozlabs.org (Postfix) with ESMTP id CF346679E0 for ; Fri, 4 Aug 2006 00:35:00 +1000 (EST) Received: by ug-out-1314.google.com with SMTP id e2so239800ugf for ; Thu, 03 Aug 2006 07:34:58 -0700 (PDT) Message-ID: <528646bc0608030734j163acdd0gf37f19ece6f18c09@mail.gmail.com> Date: Thu, 3 Aug 2006 08:34:57 -0600 From: "Grant Likely" Sender: glikely@gmail.com To: "Milton Miller" Subject: Re: Booting Linux Kernel without bootloader In-Reply-To: <311545913012eb141f24.1102520059.miltonm@bga.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed References: <311545913012eb141f24.1102520059.miltonm@bga.com> Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 8/3/06, Milton Miller wrote: > On Tue Aug 1 2006 11:17:41 PM CDT, Grant Likely wrote: > > On 7/25/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. > > > > Loading a kernel into memory and starting execution *is* a boot loader. :) > > If it's running on the cpu, then I agreee. But he didn't say how he was loading > the image into memory, and if it is via an external agent then I would not > necessarly call that a boot loader, altough it is performing those tasks. > Actually, that may be too broad. Is kexec a boot loader? I would say it is. :) IMHO, even the basic tasks of correctly setting up the initial conditions can be considered a bootloader. > > You could use the bootwrapper that is in the kernel source tree > > (zImage). If a zImage's entry point is at the execution entry point, > > then it will start the Linux kernel correctly. However, it is still a > > compressed image. > > > > The boot wrapper is a reference implementation, not a required piece of the > boot sequence. As I stated in my previous post, the kernel entry conditions > are documted and loading the vmlinux raw is reasonable, asssuming that > the other conditions can be met (registers and device treee, and maybe > initrd). I agree. However, the original post sounded to me like he was looking for a canned solution. I know zImage isn't exactly what he asked for because it is a compressed image, but it does achieve the *effect* he asked for. I am curious as to the source of his requirements. ie. what is loading the kernel into ram? Where is it coming from? I've got a similar situation on my Virtex-4 platform. The FPGA takes care of all device initialization. However, the kernel is loaded of a CF card via a *slow* JTAG interface. Loading an uncompressed image is more time consuming than loading a compressed image and uncompressing it in software. > > > If you *really* need an uncompressed image, I would start with the > > bootwrapper and hack it to work with an non-gzipped kernel image. > > However, why do you want to do it this way? You probably won't gain > > much in boot time and it will be more difficult to maintain. > > Actually, the code is aready there to just copy anything inthe kernel > section that is without the gzip header. Perfect! cheers, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ruth.realtime.net (mercury.realtime.net [205.238.132.86]) by ozlabs.org (Postfix) with ESMTP id 164F767A3E for ; Fri, 4 Aug 2006 02:27:51 +1000 (EST) In-Reply-To: <528646bc0608030734j163acdd0gf37f19ece6f18c09@mail.gmail.com> References: <311545913012eb141f24.1102520059.miltonm@bga.com> <528646bc0608030734j163acdd0gf37f19ece6f18c09@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Milton Miller Subject: Re: Booting Linux Kernel without bootloader Date: Thu, 3 Aug 2006 11:27:51 -0500 To: "Grant Likely" Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Aug 3, 2006, at 9:34 AM, Grant Likely wrote: > On 8/3/06, Milton Miller wrote: >> On Tue Aug 1 2006 11:17:41 PM CDT, Grant Likely wrote: >> > On 7/25/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. >> >> > You could use the bootwrapper that is in the kernel source tree >> > (zImage). If a zImage's entry point is at the execution entry >> point, >> > then it will start the Linux kernel correctly. However, it is >> still a >> > compressed image. >> > >> >> The boot wrapper is a reference implementation, not a required piece >> of the >> boot sequence. ... > > I agree. However, the original post sounded to me like he was looking > for a canned solution. I know zImage isn't exactly what he asked for > because it is a compressed image, but it does achieve the *effect* he > asked for. Actually the existing zImage will not do that, it requires a client interface to allocate memory, etc. There are alternates available but they are not yet merged. > I am curious as to the source of his requirements. ie. what is > loading the kernel into ram? Where is it coming from? That would be useful to help suggest alternatives. > I've got a similar situation on my Virtex-4 platform. The FPGA takes > care of all device initialization. However, the kernel is loaded of a > CF card via a *slow* JTAG interface. Loading an uncompressed image is > more time consuming than loading a compressed image and uncompressing > it in software. This is often the case. However, if its loaded via some kind of DMA access from a higher powered cpu then loading the uncompressed kernel could be the fastest way. Since we don't know we can only mention things to consider as we state what can be done. milton From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.230]) by ozlabs.org (Postfix) with ESMTP id 153BD67B32 for ; Fri, 4 Aug 2006 02:34:51 +1000 (EST) Received: by wr-out-0506.google.com with SMTP id 36so488828wra for ; Thu, 03 Aug 2006 09:34:50 -0700 (PDT) Message-ID: <528646bc0608030934j6864669agdddbb413e6480e8f@mail.gmail.com> Date: Thu, 3 Aug 2006 10:34:49 -0600 From: "Grant Likely" Sender: glikely@gmail.com To: "Milton Miller" Subject: Re: Booting Linux Kernel without bootloader In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed References: <311545913012eb141f24.1102520059.miltonm@bga.com> <528646bc0608030734j163acdd0gf37f19ece6f18c09@mail.gmail.com> Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 8/3/06, Milton Miller wrote: > > I've got a similar situation on my Virtex-4 platform. The FPGA takes > > care of all device initialization. However, the kernel is loaded of a > > CF card via a *slow* JTAG interface. Loading an uncompressed image is > > more time consuming than loading a compressed image and uncompressing > > it in software. > > This is often the case. However, if its loaded via some kind of DMA > access > from a higher powered cpu then loading the uncompressed kernel could be > the fastest way. Since we don't know we can only mention things to > consider as we state what can be done. As alwasy; the devil is in the details. :) -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [204.127.192.84]) by ozlabs.org (Postfix) with ESMTP id B2C8F67B76 for ; Fri, 4 Aug 2006 02:49:32 +1000 (EST) Message-ID: <44D22914.6060509@dlasys.net> Date: Thu, 03 Aug 2006 12:49:24 -0400 From: "David H. Lynch Jr." MIME-Version: 1.0 To: Grant Likely , linuxppc-embedded Subject: Re: Booting Linux Kernel without bootloader References: <311545913012eb141f24.1102520059.miltonm@bga.com> <528646bc0608030734j163acdd0gf37f19ece6f18c09@mail.gmail.com> In-Reply-To: <528646bc0608030734j163acdd0gf37f19ece6f18c09@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Reply-To: dhlii@comcast.net List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Grant Likely wrote: > > I've got a similar situation on my Virtex-4 platform. The FPGA takes > care of all device initialization. However, the kernel is loaded of a > CF card via a *slow* JTAG interface. Loading an uncompressed image is > more time consuming than loading a compressed image and uncompressing > it in software. > > I am working with the Pico E-12. It is a CF formfactor device. It has only a pseudo Parallel/Jtag interface exported through the CF connector Pico calls the Keyhole Port, and A UartLite, and TEMAC off some mini connector. Pico has their own "monitor" program that fits in 32K of ram inside the FPGA that loads and executes ELF files (or FPGA bit images) from a very simple FileSystem (basically a linked list). Then they have Host software to Read/Write the Flash, update files in Flash, ... that works primarily through the Keyhole. I just build the Kernel as an ELF file, update the ELF File in Flash and tell it to boot that file and away it goes. -- Dave Lynch DLA Systems Software Development: Embedded Linux 717.627.3770 dhlii@dlasys.net http://www.dlasys.net fax: 1.253.369.9244 Cell: 1.717.587.7774 Over 25 years' experience in platforms, languages, and technologies too numerous to list. "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." Albert Einstein From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ruth.realtime.net (mercury.realtime.net [205.238.132.86]) by ozlabs.org (Postfix) with ESMTP id 03EDD679FC for ; Fri, 4 Aug 2006 04:29:34 +1000 (EST) Date: Thu, 3 Aug 2006 13:02:19 -0500 From: Milton Miller To: dhlii@comcast.net, grant.likely@secretlab.ca, linuxppc-embedded@ozlabs.org, Subject: Re: Booting Linux Kernel without bootloader Message-Id: <31154628139507ed7ab4.783368690.miltonm@bga.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu Aug 3 2006 11:49:24 AM CDT, David H. Lynch Jr. wrote: > Grant Likely wrote: > > > > I've got a similar situation on my Virtex-4 platform. The FPGA takes > > care of all device initialization. However, the kernel is loaded of a > > CF card via a *slow* JTAG interface. Loading an uncompressed image is > > more time consuming than loading a compressed image and uncompressing > > it in software. > > > > I am working with the Pico E-12. It is a CF formfactor device. It > has only a pseudo Parallel/Jtag > interface exported through the > CF connector Pico calls the Keyhole > Port, and A UartLite, and TEMAC off some mini connector. > Pico has their own "monitor" program that fits in 32K of ram inside > the FPGA that loads and executes ELF files (or FPGA bit images) > from a very simple FileSystem (basically a linked list). Then they > have Host software to Read/Write the Flash, update files in Flash, ... > that works primarily through the Keyhole. > > I just build the Kernel as an ELF file, update the ELF File in Flash > and tell it to boot that file and away it goes. The kernel requires some data be passed to it via both memory (the device tree struct) and registers (pointer to same and a bit), or registers set and a client interface. You don't want the later. See Documentation/powerpc/booting-without-of.txt. If loading from the filesystem is faster than decompressing and copying the image to place, and the loader supports multiple load segments, defined entry points, and loading to address 0, then you could construct an elf that is the kernel load segment, the device tree, and an entry point that sets the few registers and jumps to the kernel. Generating such an image would still belong to the boot directory. A zImage based compressed image may still be faster. milton