From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dfu: dfu_sf: Take the start address into account
Date: Wed, 23 Sep 2015 09:53:21 -0600 [thread overview]
Message-ID: <5602CAF1.5060307@wwwdotorg.org> (raw)
In-Reply-To: <CAOMZO5ACXYrZNzUo0pTxxgFRB6VEf7j5RTEkWm1583wwFmUjBw@mail.gmail.com>
On 09/23/2015 09:44 AM, Fabio Estevam wrote:
> On Wed, Sep 23, 2015 at 12:36 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> On Wed, Sep 23, 2015 at 12:22 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>
>>> This feels wrong. The entries in the DFU list must already be
>>> sector-aligned, so there's no need for the code to round them. If the
>>> entries are not already aligned, then the aligned erase operations will
>>> erase other data, which will cause corruption.
>>
>> The start address does not need to be sector-aligned.
>>
>> In my case the SPL image needs to be placed at 0x400.
>
> Also, just to clarify: in this patch we make sure that the erase
> operation are always sector-aligned.
>
> Only the write operations can be 'shifted' due to the start address
> passed via dfu_alt_info.
So it's OK to erase the data between 0..0x400 and not replace it? Even
if that's true in your case, it seems quite unlikely in general.
Instead, the DFU region should start and end at sector-aligned locations
so that erasing the region doesn't negatively affect other data. If
logical objects in your flash aren't sector aligned, then that simply
means you need to construct a complete flash image and write the whole
thing at once. I don't thin there's any other way to avoid corruption.
next prev parent reply other threads:[~2015-09-23 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 3:50 [U-Boot] [PATCH] dfu: dfu_sf: Take the start address into account Fabio Estevam
2015-09-23 8:09 ` Lukasz Majewski
2015-09-23 15:22 ` Stephen Warren
2015-09-23 15:36 ` Fabio Estevam
2015-09-23 15:44 ` Fabio Estevam
2015-09-23 15:53 ` Stephen Warren [this message]
2015-10-20 0:06 ` [U-Boot] " Tom Rini
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=5602CAF1.5060307@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox