[U-Boot-Users] DULG/Manual: 7.6. Standalone Operation with Ramdisk Image

Wolfgang Denk wd at denx.de
Tue Sep 21 17:19:19 CEST 2004


In message <20040921.071207.22523.923750 at webmail16.lax.untd.com> you wrote:
> 
> Does it mean that a minimal ramdisk image ramdisk_image.zip " could be programmed directly onto flash (bypassing putting it into ram first and then copying it into flash) using CodeWarrior/WireTap CCS"s "Flash Programmer" tool into next 8 sectors, start

Please use shorter lines. Maximum linelength should never exceed 70
characters or so.

The strict answer to your question is "no". U-Boot  cannot  handle  a
"ramdisk_image.zip"  file  -  whatever  this  might  be. It expects a
ramdisk image (compressed or uncompressed) with a valid U-Boot header
as created using the "mkimage" tool.

> ing from address 0xFFF80000 ?

Yes, but you can also program it using U-Boot.

> Aternatively - if I am to strictly follow steps outlined in DULG/Manual: 7.6. "Standalone Operation with Ramdisk Image"
> I am not clear on addresses used there ?

Try to _understand_ what these commands are doing.

>  My "normal" (without ramdisk) booting sequence is:
>  => tftpboot 200000 uimage  
>  => bootm 200000

We load the kernel image to RAM and boot it there - the  RAM  address
must be large enough to not collide with the excepion vectors (on PPC
0  ...  16 kB) or with the code, data and stack used by U-Boot itself
(assume the top 1 MB of your RAM), and it must allow that  the  Linux
kernel  image gets uncompressed without overwriting the image itself.
If you assume an uncompressed kernel size of 2 MB or  so  this  means
you  cannot load below 0x200000 or so. [Actually a _small_ overlap is
possible as uncompression works starting at low addresses.]

So in short: any load address between 0x200000 and [RAMSIZE - 1 MB  -
size of compressed kernel] will work fine.

>  So what addressess I should use in:
> 1. 
>  => tftp "/tftpboot/SIMPLE-PPCBOOT-ramdisk"

Any address between 0x200000 and [RAMSIZE - 1 MB - size of compressed
kernel]. As a default, use 0x200000.

>  and in 
> 2. 
>  => cp.b 

Use the tftp load address as source address and an address  in  flash
which is not use otherwise as target address.

>  and in
> 3. 
>  => bootm

The current address where your image is located - in RAM or in  flash
as you like.

> per suggestion from Himba for 1. : "Some flash address after the end of kernel image should be fine." 
> 
> the "tftpboot" address should be  >= (00200000 + "864300 Bytes") ?

0x00200000 is a RAM address.

Use "flinfo" to get information about available flash and which parts
(marked as RO = read-only) are in use for U-Boot. Use "imls"  to  get
information  about  existing images. Locate any area that is free (i.
e. not used by anything you need - like  the  kernel  image)  and  of
sufficient contiguous size. Remember that you can erase flash only in
"erase units" ("sectors").

> Is there U-Boot command to complement "imi" which would give the address
> of the next available sector on the flash after the kernel image, where ramdisk inmage could be put (to avoid calculations) ?

No, you have to do the calculation manually.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Every solution breeds new problems.




More information about the U-Boot mailing list