I have u-boot configured to use tftpboot to grab the linux image over the ethernet network. If the tftp server on an external device is already setup and running, everything works fine. However, if my device powers on before the server is ready, it will timeout. Once it times out, it will no longer attempt to connect to the server to get the file.:
Filename 'image.ub'.
Load address: 0x10000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
Zynq>
Even though it says "starting again", nothing actually restarts. Once the server finally becomes ready, there is no communications to get the linux image. Note that I can use the serial port to manually restart the tftpboot, but I need it to retry automatically.
Is there some option that will make a retry actually occur? Here is some environmental variables:
> echo $default_bootcmd
run uenvboot; run cp_kernel2ram && bootm 0x10000000; run netboot
> echo $netboot
tftpboot ${netstart} ${kernel_img} && bootm
> echo $uenvboot
if run sd_uEnvtxt_existence_test; then run loadbootenv; echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
The last message that is output by U-Boot,
Retry count exceeded; starting again
originates from tftp_timeout_handler() and restart(), which then calls net_start_again().
Is there some option that will make a retry actually occur?
The U-Boot routine net_start_again() indicates that the environment variable netretry
determines the local variables retrycnt
and retry_forever
.
Try defining the environment variable netretry
with value yes
, i.e.
setenv netretry yes
When variable netretry
does not exist in the environment, the code indicates that no retry would be attempted (per this patch), as you experienced.