Skip to contentSkip to conversation

get file via tftp and write to filesystem, get length of tftp transfer

DISCUSSION Elmar Psilog 2 participants 4 messages Nov 30, 2021 – Dec 1, 2021

lore
Share & tools
lore
#0 lore raw

Hello, is it possible to download a file via network (tftp) and write it to a filesystem as ext4? This looks like a combination of tftpboot and ext4write but how to get sizebytes?
I don't find how to get the length information from tftpboot into a variable - it seems to me only displayed on screen. Did I miss something? Thanks for you patience.
Elmar

#1 lore raw
Quoted 5 lines · Elmar Psilog

Hello, is it possible to download a file via network (tftp) and write it to a filesystem as ext4? This looks like a combination of tftpboot and ext4write but how to get sizebytes?
I don't find how to get the length information from tftpboot into a variable - it seems to me only displayed on screen. Did I miss something?

The filesize environment variable is almost always set when we "read" something from a source, including tftp.

Signature · 1 line
Tom
#2 lore raw
Quoted 11 lines · Elmar Psilog
Quoted 6 lines

Hello, is it possible to download a file via network (tftp) and write it to a filesystem as ext4? This looks like a combination of tftpboot and ext4write but how to get sizebytes?
I don't find how to get the length information from tftpboot into a variable - it seems to me only displayed on screen. Did I miss something?

The filesize environment variable is almost always set when we "read" something from a source, including tftp.

Thanks Tom! How could I miss that?

Writing ext4 only works if it was formatted with -O ^metadata_csum.

Best regards, Elmar

#3 lore raw
Quoted 8 lines · Elmar Psilog
Quoted 8 lines · Elmar Psilog
Quoted 6 lines

Hello, is it possible to download a file via network (tftp) and write it to a filesystem as ext4? This looks like a combination of tftpboot and ext4write but how to get sizebytes?
I don't find how to get the length information from tftpboot into a variable - it seems to me only displayed on screen. Did I miss something?

Quoted 6 lines
Quoted 3 lines

The filesize environment variable is almost always set when we "read" something from a source, including tftp.

Thanks Tom! How could I miss that?

Writing ext4 only works if it was formatted with -O ^metadata_csum.

Yes, there's
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
but someone needs to pick it up and re-spin it.

Signature · 1 line
Tom