Re: [U-Boot] Loading uImage into RAM

2014-05-06 Thread Wolfgang Denk
Dear Belisko Marek,

In message  
you wrote:
> Hi Abdullah,
> 
> On Tue, May 6, 2014 at 11:54 AM, Abdullah YILDIZ
>  wrote:
> > Hi Belisko,
> >
> > On Tue, May 6, 2014 at 12:34 PM, Belisko Marek  
> > wrote:
> >> Hi Abdullah,
> >>
> >> On Tue, May 6, 2014 at 10:55 AM, Abdullah YILDIZ
> >>  wrote:
> >>> I'm trying to understand how u-boot loads zImage into RAM.
> >>>
> >>> mkimage is called as
> >>>
> >>> mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040
> >>> -d arch/arm/boot/zImage /bootImage/uImage
> >>>
> > Why is entry point different from load address of uImage?
> It is set to skip 64bytes (0x40) of mkimage header.

Actually the configuration given here looks bogus.  The 64 byte
header of the legacy image format does NOT get copied to the address
range starting at load address, so you actually start execution at a
64 byte offset within your binary.  This is likely incorrect.

A common error is to misunderstand that the "loadaddr" variable used
in U-Boot as target address for the image download has _nothing_ to do
with the "loadaddr" parameter of the mkimage command , which gives the
address where the "bootm" command will copy the image to (eventually
uncompressing it).  Unfortunately ARM never adapted to use this.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Die Scheu vor Verantwortung ist die Krankheit unserer Zeit.
 -- Otto von Bismarck
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Loading uImage into RAM

2014-05-06 Thread Belisko Marek
Hi Abdullah,

On Tue, May 6, 2014 at 11:54 AM, Abdullah YILDIZ
 wrote:
> Hi Belisko,
>
> On Tue, May 6, 2014 at 12:34 PM, Belisko Marek  
> wrote:
>> Hi Abdullah,
>>
>> On Tue, May 6, 2014 at 10:55 AM, Abdullah YILDIZ
>>  wrote:
>>> I'm trying to understand how u-boot loads zImage into RAM.
>>>
>>> mkimage is called as
>>>
>>> mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040
>>> -d arch/arm/boot/zImage /bootImage/uImage
>>>
> Why is entry point different from load address of uImage?
It is set to skip 64bytes (0x40) of mkimage header.
>>> Here, 'a' stands for load address and 'e' stands for entry point (64
>>> bytes are used for wrapping?). However, when loading uImage from
>>> u-boot, boot operation starts at address 0x8010. Furthermore,
>>> u-boot recognizes the load address and entry point as 0x80008000.
>> Kernel uImage is loaded from NAND to ram at address which $loadaddr
>> points to (check print $loadaddr)
>> or env command which loading kerenl image from NAND.
>> Then by bootm command is copied to address which is specified in
>> mkimage (e.g. 0x80008000). Hope this helps.
>
>
> Kind regards.
>
> abdullah

BR,

marek

-- 
as simple and primitive as possible
-
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Loading uImage into RAM

2014-05-06 Thread Abdullah YILDIZ
Hi Belisko,

On Tue, May 6, 2014 at 12:34 PM, Belisko Marek  wrote:
> Hi Abdullah,
>
> On Tue, May 6, 2014 at 10:55 AM, Abdullah YILDIZ
>  wrote:
>> I'm trying to understand how u-boot loads zImage into RAM.
>>
>> mkimage is called as
>>
>> mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040
>> -d arch/arm/boot/zImage /bootImage/uImage
>>
Why is entry point different from load address of uImage?
>> Here, 'a' stands for load address and 'e' stands for entry point (64
>> bytes are used for wrapping?). However, when loading uImage from
>> u-boot, boot operation starts at address 0x8010. Furthermore,
>> u-boot recognizes the load address and entry point as 0x80008000.
> Kernel uImage is loaded from NAND to ram at address which $loadaddr
> points to (check print $loadaddr)
> or env command which loading kerenl image from NAND.
> Then by bootm command is copied to address which is specified in
> mkimage (e.g. 0x80008000). Hope this helps.


Kind regards.

abdullah
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Loading uImage into RAM

2014-05-06 Thread Belisko Marek
Hi Abdullah,

On Tue, May 6, 2014 at 10:55 AM, Abdullah YILDIZ
 wrote:
> I'm trying to understand how u-boot loads zImage into RAM.
>
> mkimage is called as
>
> mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040
> -d arch/arm/boot/zImage /bootImage/uImage
>
> Here, 'a' stands for load address and 'e' stands for entry point (64
> bytes are used for wrapping?). However, when loading uImage from
> u-boot, boot operation starts at address 0x8010. Furthermore,
> u-boot recognizes the load address and entry point as 0x80008000.
Kernel uImage is loaded from NAND to ram at address which $loadaddr
points to (check print $loadaddr)
or env command which loading kerenl image from NAND.
Then by bootm command is copied to address which is specified in
mkimage (e.g. 0x80008000). Hope this helps.

>
> Loading from NAND 128MiB 3,3V 8-bit, offset 0x1c
>   Image Name:   Linux-2.6.27.8
>   Image Type:   ARM Linux Kernel Image (uncompressed)
>   Data Size:1735148 Bytes =  1.7 MB
>   Load Address: 80008000
>   Entry Point:  80008000
>
> ## Booting kernel from Legacy Image at 8010 ...
>   Image Name:   Linux-2.6.27.8
>   Image Type:   ARM Linux Kernel Image (uncompressed)
>   Data Size:1735148 Bytes =  1.7 MB
>   Load Address: 80008000
>   Entry Point:  80008000
>   Verifying Checksum ... OK
>   Loading Kernel Image ... OK
>
> OK
>
> Starting kernel ...
>
> Could you help me with this?
>
> abdullah
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

BR,

marek

-- 
as simple and primitive as possible
-
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Loading uImage into RAM

2014-05-06 Thread Abdullah YILDIZ
I'm trying to understand how u-boot loads zImage into RAM.

mkimage is called as

mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008040
-d arch/arm/boot/zImage /bootImage/uImage

Here, 'a' stands for load address and 'e' stands for entry point (64
bytes are used for wrapping?). However, when loading uImage from
u-boot, boot operation starts at address 0x8010. Furthermore,
u-boot recognizes the load address and entry point as 0x80008000.

Loading from NAND 128MiB 3,3V 8-bit, offset 0x1c
  Image Name:   Linux-2.6.27.8
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:1735148 Bytes =  1.7 MB
  Load Address: 80008000
  Entry Point:  80008000

## Booting kernel from Legacy Image at 8010 ...
  Image Name:   Linux-2.6.27.8
  Image Type:   ARM Linux Kernel Image (uncompressed)
  Data Size:1735148 Bytes =  1.7 MB
  Load Address: 80008000
  Entry Point:  80008000
  Verifying Checksum ... OK
  Loading Kernel Image ... OK

OK

Starting kernel ...

Could you help me with this?

abdullah
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot