Skip to contentSkip to conversation

Question about md output

U-Boot ffileppo at libero.it 2 participants 2 messages May 12, 2012

lore
Share & tools
lore
#0 lore raw

Dear all,

I need to access data values stored in flash for integrity checking.

Thus, I would like to parse the output of md (memory display) and store its output to enviromental varaibles.

For example, when invoking:

=> md 0x100000 1
00100000: 8083764e bd86200a 60a19054 2c12c402

I would like to store one ore more memory values in some env variables.

1) Is it feasible with the current uboot scripting features?

2) Would it be possible to modify the md command so that it also store its output to env variables?

3) Or, would it be possible to modify the md command so that its output is just a word value which can be used for uboot scripting capabilities? e.g.

=> md 0x100000 1 2
bd86200a

=> md 0x100000 1 4
2c12c402

Best Regards,

FF

#1 lore raw

Dear "ffileppo at libero.it",

Quoted 2 lines · In message <28478089.7028571336829211206.JavaMail.defaultUser@defaultHost> you…

I need to access data values stored in flash for integrity checking.

This is something where teh test / itest commands come in handy.

Quoted 2 lines

Thus, I would like to parse the output of md (memory display) and store its output to enviromental varaibles.

This is probably the wrong approach to do what you have in mind.

Quoted 1 line

1) Is it feasible with the current uboot scripting features?

No. But actually it is not needed either. Use itest instead.

Quoted 2 lines

2) Would it be possible to modify the md command so that it also store its output to env variables?

It would be possible, but it makes little sense to me.

Quoted 3 lines

3) Or, would it be possible to modify the md command so that its output is just a word value which can be used for uboot scripting capabilities? e.g.

Ditto.

Have a look at itest; if you still make no progress then please describe what you actually want to do, so we can show you how to do it efficiently - without need to modify code.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
America has been discovered before, but it has always been hushed up.
- Oscar Wilde