* upgrading u-boot from linux for SH7785LCR board
@ 2010-07-04 18:11 Bill Traynor
2010-07-04 21:24 ` Mike Frysinger
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bill Traynor @ 2010-07-04 18:11 UTC (permalink / raw)
To: linux-sh
I've compiled and tested u-boot from git for the 7785lcr board. I'd
like to write the u-boot.bin to flash but do not have a JTAG to be able
to recover if the write fails.
Given the MTD layout:
dev: size erasesize name
mtd0: 00080000 00040000 "loader"
mtd1: 00080000 00040000 "bootenv"
mtd2: 00400000 00040000 "kernel"
mtd3: 03b00000 00040000 "data"
Is it reasonable to do the following:
flash_erase /dev/mtd[0]
dd if=/tmp/u-boot.bin of=/dev/mtd0 bs\x128k conv=sync
I'd rather not brick the board I have, so if someone who does have the
capability to recover could test this method for me, it'd be appreciated.
Thanks
Bill
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: upgrading u-boot from linux for SH7785LCR board
2010-07-04 18:11 upgrading u-boot from linux for SH7785LCR board Bill Traynor
@ 2010-07-04 21:24 ` Mike Frysinger
2010-07-04 23:01 ` Nobuhiro Iwamatsu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-07-04 21:24 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: Text/Plain, Size: 751 bytes --]
On Sunday, July 04, 2010 14:11:15 Bill Traynor wrote:
> I've compiled and tested u-boot from git for the 7785lcr board. I'd
> like to write the u-boot.bin to flash but do not have a JTAG to be able
> to recover if the write fails.
>
> Given the MTD layout:
> dev: size erasesize name
> mtd0: 00080000 00040000 "loader"
> mtd1: 00080000 00040000 "bootenv"
> mtd2: 00400000 00040000 "kernel"
> mtd3: 03b00000 00040000 "data"
>
> Is it reasonable to do the following:
>
> flash_erase /dev/mtd[0]
> dd if=/tmp/u-boot.bin of=/dev/mtd0 bs=128k conv=sync
why dont you just use the mtdblock interface ? it will take care of all the
weird flash issues like erasing/etc...
all i do is:
cat u-boot.bin > /dev/mtdblock0
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: upgrading u-boot from linux for SH7785LCR board
2010-07-04 18:11 upgrading u-boot from linux for SH7785LCR board Bill Traynor
2010-07-04 21:24 ` Mike Frysinger
@ 2010-07-04 23:01 ` Nobuhiro Iwamatsu
2010-07-05 3:29 ` Bill Traynor
2010-07-05 4:37 ` Mike Frysinger
3 siblings, 0 replies; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2010-07-04 23:01 UTC (permalink / raw)
To: linux-sh
Hi, Bill.
Bill Traynor wrote:
> I've compiled and tested u-boot from git for the 7785lcr board. I'd
> like to write the u-boot.bin to flash but do not have a JTAG to be able
> to recover if the write fails.
>
> Given the MTD layout:
> dev: size erasesize name
> mtd0: 00080000 00040000 "loader"
> mtd1: 00080000 00040000 "bootenv"
> mtd2: 00400000 00040000 "kernel"
> mtd3: 03b00000 00040000 "data"
>
> Is it reasonable to do the following:
>
> flash_erase /dev/mtd[0]
> dd if=/tmp/u-boot.bin of=/dev/mtd0 bs\x128k conv=sync
I think that you shoud use flashcp command if you use flash_erase.
This command is in mtd-utils ( same flash_erase).
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: upgrading u-boot from linux for SH7785LCR board
2010-07-04 18:11 upgrading u-boot from linux for SH7785LCR board Bill Traynor
2010-07-04 21:24 ` Mike Frysinger
2010-07-04 23:01 ` Nobuhiro Iwamatsu
@ 2010-07-05 3:29 ` Bill Traynor
2010-07-05 4:37 ` Mike Frysinger
3 siblings, 0 replies; 5+ messages in thread
From: Bill Traynor @ 2010-07-05 3:29 UTC (permalink / raw)
To: linux-sh
On 10-07-04 05:24 PM, Mike Frysinger wrote:
> On Sunday, July 04, 2010 14:11:15 Bill Traynor wrote:
>
>> I've compiled and tested u-boot from git for the 7785lcr board. I'd
>> like to write the u-boot.bin to flash but do not have a JTAG to be able
>> to recover if the write fails.
>>
>> Given the MTD layout:
>> dev: size erasesize name
>> mtd0: 00080000 00040000 "loader"
>> mtd1: 00080000 00040000 "bootenv"
>> mtd2: 00400000 00040000 "kernel"
>> mtd3: 03b00000 00040000 "data"
>>
>> Is it reasonable to do the following:
>>
>> flash_erase /dev/mtd[0]
>> dd if=/tmp/u-boot.bin of=/dev/mtd0 bs\x128k conv=sync
>>
> why dont you just use the mtdblock interface ? it will take care of all the
> weird flash issues like erasing/etc...
>
> all i do is:
> cat u-boot.bin> /dev/mtdblock0
>
Thanks, that worked perfectly.
> -mike
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: upgrading u-boot from linux for SH7785LCR board
2010-07-04 18:11 upgrading u-boot from linux for SH7785LCR board Bill Traynor
` (2 preceding siblings ...)
2010-07-05 3:29 ` Bill Traynor
@ 2010-07-05 4:37 ` Mike Frysinger
3 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-07-05 4:37 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: Text/Plain, Size: 426 bytes --]
On Sunday, July 04, 2010 23:29:28 Bill Traynor wrote:
> On 10-07-04 05:24 PM, Mike Frysinger wrote:
> > all i do is:
> > cat u-boot.bin> /dev/mtdblock0
>
> Thanks, that worked perfectly.
for safety sake, you might want to dd it back out and cmp the result. so
something like:
dd if=/dev/mtdblock0 of=u-boot.bin.new \
ibs=$(wc -c u-boot.bin | awk '{print $1}') count=1
cmp u-boot.bin u-boot.bin.new
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-05 4:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-04 18:11 upgrading u-boot from linux for SH7785LCR board Bill Traynor
2010-07-04 21:24 ` Mike Frysinger
2010-07-04 23:01 ` Nobuhiro Iwamatsu
2010-07-05 3:29 ` Bill Traynor
2010-07-05 4:37 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox