Skip to contentSkip to conversation

how to download a file to specified mem location using tftp

DISCUSSION zzs 3 participants 6 messages Nov 15, 2012

lore
Share & tools
lore

zzs

author
#0 lore raw

tftp command only have filename args, Now I want
download a file to mem loctaion, ex 0x21f00000.
How to do that?

Signature · 9 lines
Best Regards,
zzs



_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 7 lines · zzs

tftp command only have filename args, Now I want
download a file to mem loctaion, ex 0x21f00000.
How to do that?

--
Best Regards,
zzs

AFAIR,
memcpy -s /mnt/tftp/file -d /dev/mem 0 <memaddr> <size>

(but /dev/mem is default value for -d).

Quoted 4 lines

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 7 lines
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
Quoted 10 lines · Antony Pavlov
Quoted 3 lines · zzs

tftp command only have filename args, Now I want
download a file to mem loctaion, ex 0x21f00000.
How to do that?

AFAIR,
memcpy -s /mnt/tftp/file -d /dev/mem 0 <memaddr> <size>

(but /dev/mem is default value for -d).

If you have tftp command only (old barebox without tftp filesystem support) then use

barebox:/ tftp your_file
barebox:/ memcpy -s your_file 0 0x21f00000 <file size>

Signature · 7 lines
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
author
#3 lore raw
Quoted 7 lines · In message <CAA4bVAEhhLxXfzNZ_mBP_=W-TNOHOkEnwF=vgBMBy16ezd2_NA@mail.gmail.com>…
Quoted 7 lines
Quoted 3 lines

tftp command only have filename args, Now I want
download a file to mem loctaion, ex 0x21f00000.
How to do that?

AFAIR,
memcpy -s /mnt/tftp/file -d /dev/mem 0 <memaddr> <size>

Quoted 9 lines
Quoted 2 lines

(but /dev/mem is default value for -d).

If you have tftp command only (old barebox without tftp filesystem support) then use

barebox:/ tftp your_file
barebox:/ memcpy -s your_file 0 0x21f00000 <file size>

Thanks, I'm a barebox beginner.

So how to mount tftp to /mnt/tftp

my barebox version is 2012.10.0

Signature · 9 lines
Best Regards,
zzs



_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
author
#4 lore raw
Quoted 2 lines

So how to mount tftp to /mnt/tftp

Greped barebox code, Now I SEE

mkdir /mnt/tftp -p && mount -t tftp $eth0.serverip /mnt/tftP

Signature · 9 lines
Best Regards,
zzs



_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw
Quoted 5 lines · zzs
Quoted 2 lines

So how to mount tftp to /mnt/tftp

Greped barebox code, Now I SEE

mkdir /mnt/tftp -p && mount -t tftp $eth0.serverip /mnt/tftP

Additionally you'll find this:

mkdir /mnt/tftp
automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'

which will automount it for you once you need it.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox