* how to download a file to specified mem location using tftp
@ 2012-11-15 3:11 zzs
2012-11-15 5:45 ` Antony Pavlov
0 siblings, 1 reply; 6+ messages in thread
From: zzs @ 2012-11-15 3:11 UTC (permalink / raw)
To: barebox
tftp command only have filename args, Now I want
download a file to mem loctaion, ex 0x21f00000.
How to do that?
--
Best Regards,
zzs
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to download a file to specified mem location using tftp
2012-11-15 3:11 how to download a file to specified mem location using tftp zzs
@ 2012-11-15 5:45 ` Antony Pavlov
2012-11-15 6:02 ` Antony Pavlov
0 siblings, 1 reply; 6+ messages in thread
From: Antony Pavlov @ 2012-11-15 5:45 UTC (permalink / raw)
To: barebox
On 15 November 2012 07:11, zzs <zzs213@126.com> wrote:
> 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).
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to download a file to specified mem location using tftp
2012-11-15 5:45 ` Antony Pavlov
@ 2012-11-15 6:02 ` Antony Pavlov
2012-11-15 6:30 ` zzs
0 siblings, 1 reply; 6+ messages in thread
From: Antony Pavlov @ 2012-11-15 6:02 UTC (permalink / raw)
To: barebox
On 15 November 2012 09:45, Antony Pavlov <antonynpavlov@gmail.com> wrote:
> On 15 November 2012 07:11, zzs <zzs213@126.com> wrote:
>> 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>
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to download a file to specified mem location using tftp
2012-11-15 6:02 ` Antony Pavlov
@ 2012-11-15 6:30 ` zzs
2012-11-15 7:07 ` zzs
0 siblings, 1 reply; 6+ messages in thread
From: zzs @ 2012-11-15 6:30 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
In message <CAA4bVAEhhLxXfzNZ_mBP_=W-TNOHOkEnwF=vgBMBy16ezd2_NA@mail.gmail.com> Antony Pavlov wrote:
> >> 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>
>
Thanks, I'm a barebox beginner.
So how to mount tftp to /mnt/tftp
my barebox version is 2012.10.0
--
Best Regards,
zzs
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to download a file to specified mem location using tftp
2012-11-15 6:30 ` zzs
@ 2012-11-15 7:07 ` zzs
2012-11-15 7:41 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: zzs @ 2012-11-15 7:07 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
> 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
--
Best Regards,
zzs
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to download a file to specified mem location using tftp
2012-11-15 7:07 ` zzs
@ 2012-11-15 7:41 ` Sascha Hauer
0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-11-15 7:41 UTC (permalink / raw)
To: Antony Pavlov, barebox
On Thu, Nov 15, 2012 at 03:07:55PM +0800, zzs wrote:
> > 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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-15 7:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 3:11 how to download a file to specified mem location using tftp zzs
2012-11-15 5:45 ` Antony Pavlov
2012-11-15 6:02 ` Antony Pavlov
2012-11-15 6:30 ` zzs
2012-11-15 7:07 ` zzs
2012-11-15 7:41 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox