Skip to contentSkip to conversation

tftp time outs

DISCUSSION Matteo Guglielmi 2 participants 6 messages Sep 5, 2021 – Sep 8, 2021

lore
Share & tools
lore
#0 lore raw

Dear All,

I've noticed that when u-boot is downloading

files from a tftp server (e.g. vmlinuz, initrd

etc.) it starts to time out quite heavily

"##T #T #T..." if I simply ping the NIC of

the raspberry 4b on which it's running.

Thanks for any comment or suggestion on this

behavior.

#1 lore raw

Hi Matteo,

Which version of U-Boot are you using?

Try setting the following environment variables:

tftpblocksize=512
tftptimeout=10000

-- Harm

-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: [email protected] <[email protected]>
Subject: tftp time outs
Date: Sun, 05 Sep 2021 13:49:46 +0000

Dear All,

I've noticed that when u-boot is downloading

files from a tftp server (e.g. vmlinuz, initrd

etc.) it starts to time out quite heavily

"##T #T #T..." if I simply ping the NIC of

the raspberry 4b on which it's running.

Thanks for any comment or suggestion on this

behavior.

#2 lore raw

Hi Harm,

thanks for the suggestion.

I have this set in my .config file

for the compilation of u-boot:

CONFIG_TFTP_BLOCKSIZE=1468

CONFIG_TFTP_WINDOWSIZE=1

I'm also using a custom boot.cmd file... should I instead just put
your vars in it like this:

tftpblocksize=512
tftptimeout=10000

or like this:

setenv tftpblocksize 512
setenv tftptimeout 10000

?

I'm still new to u-boot even though
I could make it do exactly what I needed... extremely useful to boot
my cluster of raspberry pis 4 b with individual kernel options each.

PS:

Any good book around on u-boot?

Good doc seems so difficult to get.

Thank you!

________________________________
From: Harm Berntsen <[email protected]>
Sent: Tuesday, September 7, 2021 10:12:45 AM
To: Matteo Guglielmi
Cc: [email protected]
Subject: Re: tftp time outs

Hi Matteo,

Which version of U-Boot are you using?

Try setting the following environment variables:

tftpblocksize=512
tftptimeout=10000

-- Harm

-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: [email protected] <[email protected]>
Subject: tftp time outs
Date: Sun, 05 Sep 2021 13:49:46 +0000

Dear All,

I've noticed that when u-boot is downloading

files from a tftp server (e.g. vmlinuz, initrd

etc.) it starts to time out quite heavily

"##T #T #T..." if I simply ping the NIC of

the raspberry 4b on which it's running.

Thanks for any comment or suggestion on this

behavior.

#3 lore raw

Great to hear U-Boot is helping you :). For documentation I go to the documentation included in the source code (doc subfolder) and the source code itself.

When CONFIG_NET_TFTP_VARS is enabled you can overwrite the compiled settings with the environment variables (see net/tftp.c in the source code).

I have no experience with boot.cmd files but it looks like you will need the setenv variant :).
-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: Harm Berntsen <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: tftp time outs
Date: Tue, 07 Sep 2021 12:51:37 +0000

Hi Harm,

thanks for the suggestion.

I have this set in my .config file

for the compilation of u-boot:

CONFIG_TFTP_BLOCKSIZE=1468

CONFIG_TFTP_WINDOWSIZE=1

I'm also using a custom boot.cmd
file... should I instead just put
your vars in it like this:

tftpblocksize=512
tftptimeout=10000

or like this:

setenv tftpblocksize 512
setenv tftptimeout 10000

?

I'm still new to u-boot even though
I could make it do exactly what I
needed... extremely useful to boot
my cluster of raspberry pis 4 b with
individual kernel options each.

PS:

Any good book around on u-boot?

Good doc seems so difficult to get.

Thank you!

________________________________
From: Harm Berntsen <[email protected]>
Sent: Tuesday, September 7, 2021 10:12:45 AM
To: Matteo Guglielmi
Cc: [email protected]
Subject: Re: tftp time outs

Hi Matteo,

Which version of U-Boot are you using?

Try setting the following environment variables:

tftpblocksize=512
tftptimeout=10000

-- Harm

-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: [email protected] <[email protected]>
Subject: tftp time outs
Date: Sun, 05 Sep 2021 13:49:46 +0000

Dear All,

I've noticed that when u-boot is downloading

files from a tftp server (e.g. vmlinuz, initrd

etc.) it starts to time out quite heavily

"##T #T #T..." if I simply ping the NIC of

the raspberry 4b on which it's running.

Thanks for any comment or suggestion on this

behavior.

#4 lore raw

I've added the two variables to my u-boot script before calling tftpboot:

echo "Downloading kernel..."
setenv tftpblocksize 512
setenv tftptimeout 10000
tftpboot ${ramdisk_addr_r} ${tftp_prefix}/${snap_dir}/${kernel_filename}

but that did not help:

Downloading kernel...
Using ethernet@7d580000 device
TFTP from server 10.123.123.1; our IP address is 10.123.123.201 Filename 'rpi/conf/e4-5f-01-0f-0a-d8/snap/vmlinuz'.
Load address: 0x2700000
Loading: T #T T T #T T ################################################ 8 MiB

     130.9 KiB/s

done

as you can see, while I'm pinging the nic of the raspberry I get a lot of time outs and as soon as I stop pinging it, the download process goes on smoothly.

U-boot version is:

U-Boot 2021.07 (Sep 08 2021 - 11:13:19 +0200)

________________________________
From: Harm Berntsen <[email protected]>
Sent: Wednesday, September 8, 2021 9:37:15 AM
To: Matteo Guglielmi
Cc: [email protected]
Subject: Re: tftp time outs

Great to hear U-Boot is helping you :). For documentation I go to the documentation included in the source code (doc subfolder) and the source code itself.

When CONFIG_NET_TFTP_VARS is enabled you can overwrite the compiled settings with the environment variables (see net/tftp.c in the source code).

I have no experience with boot.cmd files but it looks like you will need the setenv variant :).
-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: Harm Berntsen <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: tftp time outs
Date: Tue, 07 Sep 2021 12:51:37 +0000

Hi Harm,

thanks for the suggestion.

I have this set in my .config file

for the compilation of u-boot:

CONFIG_TFTP_BLOCKSIZE=1468

CONFIG_TFTP_WINDOWSIZE=1

I'm also using a custom boot.cmd
file... should I instead just put
your vars in it like this:

tftpblocksize=512
tftptimeout=10000

or like this:

setenv tftpblocksize 512
setenv tftptimeout 10000

?

I'm still new to u-boot even though
I could make it do exactly what I
needed... extremely useful to boot
my cluster of raspberry pis 4 b with
individual kernel options each.

PS:

Any good book around on u-boot?

Good doc seems so difficult to get.

Thank you!

________________________________
From: Harm Berntsen <[email protected]>
Sent: Tuesday, September 7, 2021 10:12:45 AM
To: Matteo Guglielmi
Cc: [email protected]
Subject: Re: tftp time outs

Hi Matteo,

Which version of U-Boot are you using?

Try setting the following environment variables:

tftpblocksize=512
tftptimeout=10000

-- Harm

-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: [email protected] <[email protected]>
Subject: tftp time outs
Date: Sun, 05 Sep 2021 13:49:46 +0000

Dear All,

I've noticed that when u-boot is downloading

files from a tftp server (e.g. vmlinuz, initrd

etc.) it starts to time out quite heavily

"##T #T #T..." if I simply ping the NIC of

the raspberry 4b on which it's running.

Thanks for any comment or suggestion on this

behavior.

#5 lore raw

The network stack of u-boot is limited, maybe it can't handle the ping traffic at the same time as the TFTP transfer? I'm just guessing here...

-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: Harm Berntsen <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: tftp time outs
Date: Wed, 08 Sep 2021 09:27:31 +0000

I've added the two variables to my u-boot script before calling tftpboot:

echo "Downloading kernel..."
setenv tftpblocksize 512
setenv tftptimeout 10000
tftpboot ${ramdisk_addr_r}
${tftp_prefix}/${snap_dir}/${kernel_filename}

but that did not help:

Downloading kernel...
Using ethernet@7d580000 device
TFTP from server 10.123.123.1; our IP address is 10.123.123.201 Filename 'rpi/conf/e4-5f-01-0f-0a-d8/snap/vmlinuz'. Load address: 0x2700000
Loading: T #T T T #T T ################################################  8 MiB 130.9 KiB/s
done

as you can see, while I'm pinging the nic of the raspberry I get a lot of time
outs and as soon as I stop pinging it, the download process goes on smoothly.

U-boot version is:

U-Boot 2021.07 (Sep 08 2021 - 11:13:19 +0200)

________________________________
From: Harm Berntsen <[email protected]>
Sent: Wednesday, September 8, 2021 9:37:15 AM
To: Matteo Guglielmi
Cc: [email protected]
Subject: Re: tftp time outs

Great to hear U-Boot is helping you :). For documentation I go to the documentation included in the source code (doc subfolder) and the source code itself.

When CONFIG_NET_TFTP_VARS is enabled you can overwrite the compiled settings with the environment variables (see net/tftp.c in the source code).

I have no experience with boot.cmd files but it looks like you will need the setenv variant :).
-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: Harm Berntsen <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: tftp time outs
Date: Tue, 07 Sep 2021 12:51:37 +0000

Hi Harm,

thanks for the suggestion.

I have this set in my .config file

for the compilation of u-boot:

CONFIG_TFTP_BLOCKSIZE=1468

CONFIG_TFTP_WINDOWSIZE=1

I'm also using a custom boot.cmd
file... should I instead just put
your vars in it like this:

tftpblocksize=512
tftptimeout=10000

or like this:

setenv tftpblocksize 512
setenv tftptimeout 10000

?

I'm still new to u-boot even though
I could make it do exactly what I
needed... extremely useful to boot
my cluster of raspberry pis 4 b with
individual kernel options each.

PS:

Any good book around on u-boot?

Good doc seems so difficult to get.

Thank you!

________________________________
From: Harm Berntsen <[email protected]>
Sent: Tuesday, September 7, 2021 10:12:45 AM
To: Matteo Guglielmi
Cc: [email protected]
Subject: Re: tftp time outs

Hi Matteo,

Which version of U-Boot are you using?

Try setting the following environment variables:

tftpblocksize=512
tftptimeout=10000

-- Harm

-----Original Message-----
From: Matteo Guglielmi <[email protected]>
To: [email protected] <[email protected]>
Subject: tftp time outs
Date: Sun, 05 Sep 2021 13:49:46 +0000

Dear All,

I've noticed that when u-boot is downloading

files from a tftp server (e.g. vmlinuz, initrd

etc.) it starts to time out quite heavily

"##T #T #T..." if I simply ping the NIC of

the raspberry 4b on which it's running.

Thanks for any comment or suggestion on this

behavior.