* [U-Boot] [PATCH] sbc8548: document how to write main flash from alternate flash
@ 2015-03-16 17:57 Paul Gortmaker
2015-03-16 18:37 ` York Sun
0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2015-03-16 17:57 UTC (permalink / raw)
To: u-boot
If you are running on the alternate flash in order to fix a
corrupted main flash image, it might be good to have the steps
for that documented as well.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
board/sbc8548/README | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/board/sbc8548/README b/board/sbc8548/README
index feac5e3e63e5..493ea837ba3b 100644
--- a/board/sbc8548/README
+++ b/board/sbc8548/README
@@ -138,6 +138,18 @@ image in the SODIMM that is built with CONFIG_SYS_ALT_BOOT enabled,
md eff00000 10
protect on all
+If you are running the alternate 64MB /CS0 settings and want to update
+the "normal" default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
+disabled) the steps will become:
+
+ tftp u-boot.bin
+ md 200000 10
+ protect off all
+ erase effa0000 efffffff
+ cp.b 200000 effa0000 60000
+ md effa0000 10
+ protect on all
+
Finally, if you are running the alternate 64MB /CS0 settings and want
to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
enabled) the steps will become:
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] sbc8548: document how to write main flash from alternate flash
2015-03-16 17:57 [U-Boot] [PATCH] sbc8548: document how to write main flash from alternate flash Paul Gortmaker
@ 2015-03-16 18:37 ` York Sun
2015-03-16 19:53 ` [U-Boot] [PATCH v2] " Paul Gortmaker
0 siblings, 1 reply; 5+ messages in thread
From: York Sun @ 2015-03-16 18:37 UTC (permalink / raw)
To: u-boot
On 03/16/2015 10:57 AM, Paul Gortmaker wrote:
> If you are running on the alternate flash in order to fix a
> corrupted main flash image, it might be good to have the steps
> for that documented as well.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> board/sbc8548/README | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/board/sbc8548/README b/board/sbc8548/README
> index feac5e3e63e5..493ea837ba3b 100644
> --- a/board/sbc8548/README
> +++ b/board/sbc8548/README
> @@ -138,6 +138,18 @@ image in the SODIMM that is built with CONFIG_SYS_ALT_BOOT enabled,
> md eff00000 10
> protect on all
>
> +If you are running the alternate 64MB /CS0 settings and want to update
> +the "normal" default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
> +disabled) the steps will become:
> +
> + tftp u-boot.bin
> + md 200000 10
> + protect off all
> + erase effa0000 efffffff
> + cp.b 200000 effa0000 60000
> + md effa0000 10
> + protect on all
> +
> Finally, if you are running the alternate 64MB /CS0 settings and want
> to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
> enabled) the steps will become:
>
It's good to have it documented. I don't think the "protect" command is needed
in this case (and some other cases in this README). You are not flashing current
booting image, the protection is just a software flag which only marks "RO" for
current image. You can confirm by running "flinfo" to show all sectors. The
protected sectors have "RO".
York
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2] sbc8548: document how to write main flash from alternate flash
2015-03-16 18:37 ` York Sun
@ 2015-03-16 19:53 ` Paul Gortmaker
2015-03-16 20:01 ` York Sun
0 siblings, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2015-03-16 19:53 UTC (permalink / raw)
To: u-boot
If you are running on the alternate flash in order to fix a
corrupted main flash image, it might be good to have the steps
for that documented as well.
Also delete any protect commands from non-active flash banks;
they are only required for the instances where you are writing
to the currently in use flash image.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[v2: drop protect commands from instances where we flash the non
active flash bank ; it wasn't protected anyway.]
board/sbc8548/README | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/board/sbc8548/README b/board/sbc8548/README
index feac5e3e63e5..92731645f266 100644
--- a/board/sbc8548/README
+++ b/board/sbc8548/README
@@ -132,11 +132,19 @@ image in the SODIMM that is built with CONFIG_SYS_ALT_BOOT enabled,
tftp u-boot.bin
md 200000 10
- protect off all
era eff00000 efffffff
cp.b 200000 eff00000 100000
md eff00000 10
- protect on all
+
+If you are running the alternate 64MB /CS0 settings and want to update
+the "normal" default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
+disabled) the steps will become:
+
+ tftp u-boot.bin
+ md 200000 10
+ erase effa0000 efffffff
+ cp.b 200000 effa0000 60000
+ md effa0000 10
Finally, if you are running the alternate 64MB /CS0 settings and want
to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2] sbc8548: document how to write main flash from alternate flash
2015-03-16 19:53 ` [U-Boot] [PATCH v2] " Paul Gortmaker
@ 2015-03-16 20:01 ` York Sun
2015-03-16 20:18 ` Paul Gortmaker
0 siblings, 1 reply; 5+ messages in thread
From: York Sun @ 2015-03-16 20:01 UTC (permalink / raw)
To: u-boot
On 03/16/2015 12:53 PM, Paul Gortmaker wrote:
> If you are running on the alternate flash in order to fix a
> corrupted main flash image, it might be good to have the steps
> for that documented as well.
>
> Also delete any protect commands from non-active flash banks;
> they are only required for the instances where you are writing
> to the currently in use flash image.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>
> [v2: drop protect commands from instances where we flash the non
> active flash bank ; it wasn't protected anyway.]
>
> board/sbc8548/README | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/board/sbc8548/README b/board/sbc8548/README
> index feac5e3e63e5..92731645f266 100644
> --- a/board/sbc8548/README
> +++ b/board/sbc8548/README
> @@ -132,11 +132,19 @@ image in the SODIMM that is built with CONFIG_SYS_ALT_BOOT enabled,
>
> tftp u-boot.bin
> md 200000 10
> - protect off all
> era eff00000 efffffff
> cp.b 200000 eff00000 100000
> md eff00000 10
> - protect on all
> +
> +If you are running the alternate 64MB /CS0 settings and want to update
> +the "normal" default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
> +disabled) the steps will become:
> +
> + tftp u-boot.bin
> + md 200000 10
> + erase effa0000 efffffff
> + cp.b 200000 effa0000 60000
> + md effa0000 10
>
> Finally, if you are running the alternate 64MB /CS0 settings and want
> to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
>
Paul,
Sorry I didn't catch this in previous version. In your instruction, you presume
the tftp location is 0x200000, which may not be the case. I suggest you add
specific location in tftp command so it is clear.
I also noticed the file size seems different in your README, comparing with the
section above. It may be worth to double check.
York
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2] sbc8548: document how to write main flash from alternate flash
2015-03-16 20:01 ` York Sun
@ 2015-03-16 20:18 ` Paul Gortmaker
0 siblings, 0 replies; 5+ messages in thread
From: Paul Gortmaker @ 2015-03-16 20:18 UTC (permalink / raw)
To: u-boot
On 15-03-16 04:01 PM, York Sun wrote:
>
>
> On 03/16/2015 12:53 PM, Paul Gortmaker wrote:
>> If you are running on the alternate flash in order to fix a
>> corrupted main flash image, it might be good to have the steps
>> for that documented as well.
>>
>> Also delete any protect commands from non-active flash banks;
>> they are only required for the instances where you are writing
>> to the currently in use flash image.
>>
>> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> ---
>>
>> [v2: drop protect commands from instances where we flash the non
>> active flash bank ; it wasn't protected anyway.]
>>
>> board/sbc8548/README | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/board/sbc8548/README b/board/sbc8548/README
>> index feac5e3e63e5..92731645f266 100644
>> --- a/board/sbc8548/README
>> +++ b/board/sbc8548/README
>> @@ -132,11 +132,19 @@ image in the SODIMM that is built with CONFIG_SYS_ALT_BOOT enabled,
>>
>> tftp u-boot.bin
>> md 200000 10
>> - protect off all
>> era eff00000 efffffff
>> cp.b 200000 eff00000 100000
>> md eff00000 10
>> - protect on all
>> +
>> +If you are running the alternate 64MB /CS0 settings and want to update
>> +the "normal" default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
>> +disabled) the steps will become:
>> +
>> + tftp u-boot.bin
>> + md 200000 10
>> + erase effa0000 efffffff
>> + cp.b 200000 effa0000 60000
>> + md effa0000 10
>>
>> Finally, if you are running the alternate 64MB /CS0 settings and want
>> to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
>>
>
> Paul,
>
> Sorry I didn't catch this in previous version. In your instruction, you presume
> the tftp location is 0x200000, which may not be the case. I suggest you add
> specific location in tftp command so it is clear.
Sure, I can do that.
>
> I also noticed the file size seems different in your README, comparing with the
> section above. It may be worth to double check.
I think the reason for that was that the alternate flash has a large
sector size, and we can't get the exact number of 0x60000 alignment
on 0x80000 sized sectors. From "fli" output:
FF980000 E FFA00000 E FFA80000 E FFB00000 E FFB80000 E
FFC00000 E FFC80000 E FFD00000 E FFD80000 E FFE00000 E
FFE80000 E FFF00000 RO FFF80000 RO
I guess it could be 0x80000 for write instead of 0x100000, but for
some reason I recall it being useful to invalidate the environment
sector at the same time on the alt bank ; I can't recall why anymore...
The eTSEC aren't detected when I build v2015.04-rc3 ; if I solve that
then I'll try a 80000 write for alt flash and see if it comes up OK.
(if you have a hint about the eTSEC, let me know ; will save me a bisect)
P.
--
>
> York
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-16 20:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16 17:57 [U-Boot] [PATCH] sbc8548: document how to write main flash from alternate flash Paul Gortmaker
2015-03-16 18:37 ` York Sun
2015-03-16 19:53 ` [U-Boot] [PATCH v2] " Paul Gortmaker
2015-03-16 20:01 ` York Sun
2015-03-16 20:18 ` Paul Gortmaker
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.