All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tools: make imxheader size align on page size
Date: Wed, 16 Apr 2014 15:36:31 +0200	[thread overview]
Message-ID: <fa1bf19a6bd528e63cdef2db290460e9@agner.ch> (raw)
In-Reply-To: <a382350a4aca873fc5f7b270bb0f0ed6@agner.ch>

Am 2014-04-16 15:17, schrieb Stefan Agner:
> Hi Stefano,
> 
> Am 2014-04-16 17:44, schrieb Stefano Babic:
>> On 16/04/2014 15:29, stefan at agner.ch wrote:
>>> From: Stefan Agner <stefan@agner.ch>
>>>
>>> The i.MX V2 headers total size is 0x7fc. The header is placed
>>> in front of the U-Boot binary which of course is aligned to
>>> text base. Hence the header starting point is not page
>>> aligned (e.g. at 0x3f400404). This is still a valid header,
>>> which boots fine using serial loader. However, the image
>>> fails to boot from NAND (tested on a VF61x SoC).
>>>
>>
>> Can you better explain this ? There is only one board in mainline with
>> vf610. CONFIG_SYS_TEXT_BASE is set to 0x3f008000. I cannot get the
>> offset in your example. Are you referring to NAND page ? But if the
>> header must be aligned with the NAND page, this is pretty bad because we
>> have to adjust the header depending on the selected NAND chip. I do not
>> see this limitation in the manual.
> I've not submitted my board yet, I altered it to use 0x3f400800 as
> CONFIG_SYS_TEXT_BASE. I just realize that a header length of 0x7fc
> doesn't fit with 0x3f400404 even though (that would be 0x3f400004 if
> anything). But the mkimage utility reports
> Load Address: 3f400420
> Entry Point:  3f400800
> I'm a bit confused now, why is the header only 0x400 now?

Ok I checked this again, the header total size is _not_ 0x7fc, thats
imximage_init_loadsize, which is the header size + flash load size
(0x400 for NAND). 

The header total size is 0x3fc (sizeof(imx_header_v2_t)) right now. This
patch would make alter it to be exactly 0x400.

In case this discussion ends up adding this padding word, I will send a
new patch with correct numbers and better description.

  reply	other threads:[~2014-04-16 13:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 13:29 [U-Boot] [PATCH] tools: make imxheader size align on page size stefan at agner.ch
2014-04-16 15:44 ` Stefano Babic
2014-04-16 13:17   ` Stefan Agner
2014-04-16 13:36     ` Stefan Agner [this message]
2014-04-17  8:50       ` Stefano Babic
2014-04-23  2:34         ` Stefan Agner
2014-04-23 15:19           ` Stefano Babic
2014-04-23  9:55             ` Stefan Agner
2014-04-23 18:07               ` Stefano Babic
2014-04-17 12:34     ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa1bf19a6bd528e63cdef2db290460e9@agner.ch \
    --to=stefan@agner.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.