Skip to contentSkip to conversation

variable substitution not working with cp.b

U-Boot André Schwarz 3 participants 4 messages Sep 22, 2010

lore
Share & tools
lore
#0 lore raw

I'm running on MVBLM7 board using CONFIG_SYS_HUSH_PARSER.

While working on some scripts using env-variables holding some physical address values I stumbled over this :

my env-variables used :

loadaddr=0x400000
kernel_addr=0xff81000
kernel_len=0x200000

mvBL-M7> erase $kernel_addr +$kernel_len

................................ done
Erased 32 sectors

################# -> using variable as source doesn't work. mvBL-M7> cp.b $load_addr $kernel_addr $kernel_len cp - memory copy

Usage:
cp [.b, .w, .l] source target count

################# -> using addr as source works fine. mvBL-M7> cp.b 0x400000 $kernel_addr $kernel_len Copy to Flash... done
mvBL-M7>

Why does $load_addr not get expanded ?
Any ideas ?

Regards,
Andr?

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

#1 lore raw

Hi Andr?,

Quoted 34 lines · Andr? Schwarz

I'm running on MVBLM7 board using CONFIG_SYS_HUSH_PARSER.

While working on some scripts using env-variables holding some physical address values I stumbled over this :

my env-variables used :

loadaddr=0x400000
kernel_addr=0xff81000
kernel_len=0x200000

mvBL-M7> erase $kernel_addr +$kernel_len

................................ done
Erased 32 sectors

################# -> using variable as source doesn't work. mvBL-M7> cp.b $load_addr $kernel_addr $kernel_len cp - memory copy

Usage:
cp [.b, .w, .l] source target count

################# -> using addr as source works fine. mvBL-M7> cp.b 0x400000 $kernel_addr $kernel_len Copy to Flash... done
mvBL-M7>

Quoted 2 lines

Why does $load_addr not get expanded ?
Any ideas ?

Just some ideas:
- Mixed up "loadaddr" with "load_addr"?
- And do "loadaddr" resp. "load_addr" really exist?
- Tried using ${variable}, instead of $variable?

Kind regards,
Jens

#2 lore raw
In reply to André Schwarz
Quoted 2 lines · On Wednesday, September 22, 2010 04:21:34 Andr? Schwarz wrote:

loadaddr=0x400000
mvBL-M7> cp.b $load_addr $kernel_addr $kernel_len

loadaddr != load_addr
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100922/0a631a11/attachment.pgp

#3 lore raw
Quoted 6 lines · Mike Frysinger
Quoted 2 lines · On Wednesday, September 22, 2010 04:21:34 Andr? Schwarz wrote:

loadaddr=0x400000
mvBL-M7> cp.b $load_addr $kernel_addr $kernel_len

loadaddr != load_addr
-mike

hrmpf - brown paper bag again....

Thanks,
Andr?

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner