From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from blu0-omc3-s16.blu0.hotmail.com (blu0-omc3-s16.blu0.hotmail.com [65.55.116.91]) by ozlabs.org (Postfix) with ESMTP id EB1EEB6F75 for ; Mon, 26 Sep 2011 04:52:30 +1000 (EST) Message-ID: Content-Type: multipart/alternative; boundary="_ec2bdc40-8459-4d90-8c3b-5df30db25d77_" From: Sumesh Kaana To: , Subject: Loading Linux from already running code.. Date: Sun, 25 Sep 2011 18:47:15 +0000 MIME-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --_ec2bdc40-8459-4d90-8c3b-5df30db25d77_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All=2C I need some suggestions for booting Linux( >2.6.30 ) with my new project. Scenario:I've a custom built board with PowerPC 440 + 256 MB RAM. there is = NO FLASH on this board.There is a hardware logic which will get an initial = piece of code (through hardware network) into the ram and then execute it. = This code does mandatory initialization of a proprietary chip and this code= MUST execute on power on. any other images (Linux image or ramdisk) can be= loaded any specified area in the memory along with this code. My requirement is to boot Linux at the end of the this initialization. what is the best way to do it?=20 1. Will it be possible to transfer control to a simpleImage.initrd.myboard.= elf(or .bin ..?!) image from already_existing_code?2. Should I use u-boot = and then load uImage=2C ramdisk and the dts blob? Using u-boot will reduce = the effort?3. Is there any other way to approach this?? Regards=2CSumesh = --_ec2bdc40-8459-4d90-8c3b-5df30db25d77_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi All=2C

I need some suggestions for booting Linux( >= =3B2.6.30 ) with my new project.

Scenario:
I've a custom built board with PowerPC 440 + 256 MB RAM. there is NO FLA= SH on this board.
There is a hardware logic which will get an ini= tial piece of code =3B(through hardware network) =3Binto the ram an= d then execute it. This code does mandatory initialization of a proprietary= chip and this code MUST execute on power on. any other images (Linux image= or ramdisk) can be loaded any specified area in the memory along with this= code.

My requirement is to boot Linux at the end = of the this initialization.

what is the best way t= o do it? =3B

1. Will it be possible to transfe= r control to a simpleImage.initrd.myboard.elf(or .bin ..?!)  =3Bimage f= rom already_existing_code?
2. Should I use u-boot and then load u= Image=2C ramdisk and the dts blob? Using u-boot will reduce the effort?
3. Is there any other way to approach =3Bthis??



Regards=2C
Sumesh
=
= --_ec2bdc40-8459-4d90-8c3b-5df30db25d77_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nm5-vm0.bullet.mail.bf1.yahoo.com (nm5-vm0.bullet.mail.bf1.yahoo.com [98.139.213.150]) by ozlabs.org (Postfix) with SMTP id 3B017B6F68 for ; Tue, 27 Sep 2011 03:27:09 +1000 (EST) Subject: Re: Loading Linux from already running code.. From: Carlos Munoz To: Sumesh Kaana In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Mon, 26 Sep 2011 10:26:56 -0700 Message-ID: <1317058016.1650.50.camel@pug> Mime-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , You could build a tarball containing the root files system, dtb, Linux, plus a header indicating where the different pieces need to be loaded. Then your initial code loads the different parts at the right memory locations, sets up the Linux arguments, and jumps to Linux. -Carlos On Sun, 2011-09-25 at 18:47 +0000, Sumesh Kaana wrote: > Hi All, > > > I need some suggestions for booting Linux( >2.6.30 ) with my new > project. > > > Scenario: > I've a custom built board with PowerPC 440 + 256 MB RAM. there is NO > FLASH on this board. > There is a hardware logic which will get an initial piece of > code (through hardware network) into the ram and then execute it. This > code does mandatory initialization of a proprietary chip and this code > MUST execute on power on. any other images (Linux image or ramdisk) > can be loaded any specified area in the memory along with this code. > > > My requirement is to boot Linux at the end of the this initialization. > > > what is the best way to do it? > > > 1. Will it be possible to transfer control to a > simpleImage.initrd.myboard.elf(or .bin ..?!) image from > already_existing_code? > 2. Should I use u-boot and then load uImage, ramdisk and the dts blob? > Using u-boot will reduce the effort? > 3. Is there any other way to approach this?? > > > > > > > Regards, > Sumesh > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 354F6B6F72 for ; Tue, 27 Sep 2011 04:13:28 +1000 (EST) Received: by qyk32 with SMTP id 32so9848767qyk.17 for ; Mon, 26 Sep 2011 11:13:25 -0700 (PDT) MIME-Version: 1.0 Sender: ittette@gmail.com In-Reply-To: <1317058016.1650.50.camel@pug> References: <1317058016.1650.50.camel@pug> Date: Mon, 26 Sep 2011 20:13:24 +0200 Message-ID: Subject: Re: Loading Linux from already running code.. From: Philipp Ittershagen To: Carlos Munoz Content-Type: text/plain; charset=UTF-8 Cc: linuxppc-dev@lists.ozlabs.org, Sumesh Kaana List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Sep 26, 2011 at 7:26 PM, Carlos Munoz wrote: > You could build a tarball containing the root files system, dtb, Linux, > plus a header indicating where the different pieces need to be loaded. > Then your initial code loads the different parts at the right memory > locations, sets up the Linux arguments, and jumps to Linux. That is exactly what the firmware-independent simpleImage.initrd.* targets already do. The resulting elf file include the dtb and initrd as well as a prompt-like boot arg cli. I think it will be possible to just place the simpleImage.initrd.* into you memory and let the existing code jump to the start adress of the elf image. I managed to start a ppc core using JTAG and the simpleImage.initrd elf files and I think the procedure is very much the same but instead of the JTAG debugger setting the PC to the start address, your startup code has to do it. Philipp From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from blu0-omc3-s20.blu0.hotmail.com (blu0-omc3-s20.blu0.hotmail.com [65.55.116.95]) by ozlabs.org (Postfix) with ESMTP id B533AB6F83 for ; Tue, 27 Sep 2011 16:51:34 +1000 (EST) Message-ID: Content-Type: multipart/alternative; boundary="_21713310-484d-4c88-9dd6-5ae7e0731e76_" From: Sumesh Kaana To: , Subject: RE: Loading Linux from already running code.. Date: Tue, 27 Sep 2011 06:51:30 +0000 In-Reply-To: References: , <1317058016.1650.50.camel@pug>, MIME-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --_21713310-484d-4c88-9dd6-5ae7e0731e76_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Philipp and Carlos=2C Thanks for the reply. When simpleImage.elf is loaded by a debugger=2C the debugger reads the elf = image header and places various sections of image into right place in the R= AM. But when I do it from already_running_code=2C I should manually unpack = the elf and place the sections in the memory=2C then jump to the start addr= ess=2C Am I right? Also=2C Is it possible to load a simpleImage.bin file and jump to the start address= using a function pointer=2C Hence I can avoid unpack_elf_image()...? - Wil= l this work? Thanks=2C Sumesh. > Date: Mon=2C 26 Sep 2011 20:13:24 +0200 > Subject: Re: Loading Linux from already running code.. > From: p.ittershagen@googlemail.com > To: cmunoz@sablenetworks.com > CC: linuxppc-dev@lists.ozlabs.org=3B sumeshkkn@hotmail.com >=20 > On Mon=2C Sep 26=2C 2011 at 7:26 PM=2C Carlos Munoz wrote: > > You could build a tarball containing the root files system=2C dtb=2C Li= nux=2C > > plus a header indicating where the different pieces need to be loaded. > > Then your initial code loads the different parts at the right memory > > locations=2C sets up the Linux arguments=2C and jumps to Linux. >=20 > That is exactly what the firmware-independent simpleImage.initrd.* > targets already do. The resulting elf file include the dtb and initrd > as well as a prompt-like boot arg cli. > I think it will be possible to just place the simpleImage.initrd.* > into you memory and let the existing code jump to the start adress of > the elf image. I managed to start a ppc core using JTAG and the > simpleImage.initrd elf files and I think the procedure is very much > the same but instead of the JTAG debugger setting the PC to the start > address=2C your startup code has to do it. >=20 >=20 > Philipp > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev = --_21713310-484d-4c88-9dd6-5ae7e0731e76_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Philipp and Carlos=2C

Thanks for the reply.

When simpleIma= ge.elf is loaded by a debugger=2C the debugger reads the elf image header a= nd places various sections of image into right place in the RAM. But when I= do it from already_running_code=2C I should manually unpack the elf and pl= ace the sections in the memory=2C then jump to the start address=2C Am I ri= ght?

Also=2C
Is it possible to load a simpleImage.bin file and ju= mp to the start address using a function pointer=2C Hence I can avoid unpac= k_elf_image()...? - Will this work?


Thanks=2C
Sumesh.

=

>=3B Date: Mon=2C 26 Sep 2011 20:13:24 +0200
>=3B Subje= ct: Re: Loading Linux from already running code..
>=3B From: p.ittersh= agen@googlemail.com
>=3B To: cmunoz@sablenetworks.com
>=3B CC: li= nuxppc-dev@lists.ozlabs.org=3B sumeshkkn@hotmail.com
>=3B
>=3B O= n Mon=2C Sep 26=2C 2011 at 7:26 PM=2C Carlos Munoz <=3Bcmunoz@sablenetwor= ks.com>=3B wrote:
>=3B >=3B You could build a tarball containing t= he root files system=2C dtb=2C Linux=2C
>=3B >=3B plus a header indi= cating where the different pieces need to be loaded.
>=3B >=3B Then = your initial code loads the different parts at the right memory
>=3B &= gt=3B locations=2C sets up the Linux arguments=2C and jumps to Linux.
&g= t=3B
>=3B That is exactly what the firmware-independent simpleImage.i= nitrd.*
>=3B targets already do. The resulting elf file include the dt= b and initrd
>=3B as well as a prompt-like boot arg cli.
>=3B I t= hink it will be possible to just place the simpleImage.initrd.*
>=3B i= nto you memory and let the existing code jump to the start adress of
>= =3B the elf image. I managed to start a ppc core using JTAG and the
>= =3B simpleImage.initrd elf files and I think the procedure is very much
= >=3B the same but instead of the JTAG debugger setting the PC to the star= t
>=3B address=2C your startup code has to do it.
>=3B
>=3B=
>=3B Philipp
>=3B _____________________________________________= __
>=3B Linuxppc-dev mailing list
>=3B Linuxppc-dev@lists.ozlabs.= org
>=3B https://lists.ozlabs.org/listinfo/linuxppc-dev
=
= --_21713310-484d-4c88-9dd6-5ae7e0731e76_--