[U-Boot-Users] how to get result using eeprom cmd under u-boot 1.1
Xu, Jin (SDC)
jxu at WhiteRockNetworks.com
Mon Feb 13 12:53:20 CET 2006
Hello Vladimir
I already done. Thanks for your help!
I'd like share my note here.
How to update eeprom under Uboot
====================================
1 Create a binary file to store eeprom content
-----------------------------------------------
0x200 bytes.
2 Confige uboot environment variable and A TFTP server
------------------------------------------------------
make sure we can download the eeprom content file via tftp
under the uboot shell.
exam: we put the eeprom content file in the tftp root.
3 Update eeprom
------------------------------------------------------
Every thing is OK, and we can do the real job under the
uboot shell now.
1st download the eeprom content file to uboot memory 0x140000:
=>tftp 0x140000 eeprom.bin
then we can check what in the memory:
=>md 0x140000
=>md 0x140100
now we can write to eeprom:
=>eeprom write 0x140000 0x0 0x200
at last we can check what has done:
=>read read 0x140300 0x0 0x200
=>md 0x140300
=>md 0x140400
Thanks & Regards
Xu Jin
-----Original Message-----
From: Vladimir Gurevich [mailto:vag at paulidav.org]
Sent: 2006年2月13日 17:32
To: Xu, Jin (SDC)
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] how to get result using eeprom cmd under u-boot 1.1
Hello Jin,
Xu, Jin (SDC) wrote:
> When I use " eeprom read 0 0 1 " cmd, It only display " EEPROM @0x0
> read: addr 00000000 off 0000 count 1 ... done "
>
The format of the "eeprom" command is (as I'm sure you already know):
eeprom {read,write} <addr> <offset> <count>
The <addr> argument is the MEMORY address and that's where the result of the transaction will be placed.
Thus,
1) Using 0 as <addr> is a pretty risky idea to begin with: :)
2) The more proper usage will be:
eeprom read 0x100000 0 10
md.b 0x100000 10
And, of course, a quick look at the source code is worth thousand emails :)
Happy hacking,
Vladimir
More information about the U-Boot
mailing list