2008-07-09 10:56:45     uImage Size

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-07-09 10:56:45     uImage Size

Appalayagari Sreedhar (INDIA)

Message: 58559   

 

Hi,

 

In the uImage the first 64 bytes are header information.

 

14,15and 16 gives the uImage size excluding the header information.

 

Is this correct interpretation? How i can get the uImage size exactly.

 

ntohl(hdr->ih_size)+ sizeof(image_header_t)   -> This expression gives the uImage size?

 

Best Regards,Sreedhar

QuoteReplyEditDelete

 

 

2008-07-09 11:35:05     Re: uImage Size

Robin Getz (UNITED STATES)

Message: 58563   

 

Sreedhar:

 

Exactly what are you trying to do (Why do you need to know the size of the uImage? other than doing "ls -l" on your host?)

 

-Robin

QuoteReplyEditDelete

 

 

2008-07-09 14:52:34     Re: uImage Size

Appalayagari Sreedhar (INDIA)

Message: 58570   

 

Hi Robin,

 

I am encrypting the uImage separetely and while booting i am decryting it in the u-boot,

 

i will decrypt first the 64 bytes by using the expression (len = ntohl(hdr->ih_size)+ sizeof(image_header_t))

 

i am extracting the size of the uImage and reads from flash into the sdram load address and then decrypts the remaining length of the uImage and boot the image.

 

This is what i am doing can you please correct what i am doing is correct if not please guide me.

 

Best Regards,Sreedhar.

QuoteReplyEditDelete

 

 

2008-07-09 21:41:09     Re: uImage Size

Robin Getz (UNITED STATES)

Message: 58575   

 

Sreedhar:

 

You might be better off using a standalone application in U-Boot.

 

Take the entire U-Boot uImage, and do something silly to it (like add one to each byte).

 

In U-Boot, create a standalone application (which can remain closed source according to the U-Boot license), This gets put in your flash after U-Boot.

 

on the U-Boot console/script, you can run the standalone application, which subtracts one from each byte of the uImage, then you can boot it normally.

 

You should not need to touch U-Boot at all.

 

-Robin

QuoteReplyEditDelete

 

 

2008-07-15 03:53:18     Re: uImage Size

Mike Frysinger (UNITED STATES)

Message: 58810   

 

the uImage format is documented in the u-boot source tree (and probably the upstream u-boot wiki).  it is the same for all u-boot ports.  we dont cover it at all because there is nothing Blackfin specific in it.

Attachments

    Outcomes