Welcome! Log In Create A New Profile

Advanced

u-boot producing long delay when $serverip is unavailable...

Posted by davygravy 
u-boot producing long delay when $serverip is unavailable...
September 15, 2021 11:25PM
Is it just me, or does u-boot w/ 2017_environment wait a really long time to boot if $serverip can be reach?

Is the best way to speed this up by altering this netconsole related line in the envars?

<<
fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'


>>
fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'

Or maybe I've missed something super obvious?

TIA,
davy

=====================================================



Edited 1 time(s). Last edit at 09/15/2021 11:26PM by davygravy.
Re: u-boot producing long delay when $serverip is unavailable...
September 16, 2021 03:39PM
Hi davy,

> Is it just me, or does u-boot w/ 2017_environment
> wait a really long time to boot if $serverip can
> be reach?

It is the normal behavior for mainine u-boot too, to produce a false positive sometime (it might have something to do with router behavior). So that's why I scripted 5 pings to make sure that if the serverip is not online, it would produce a real negative.


> Is the best way to speed this up by altering this
> netconsole related line in the envars?

You can go back the original envs as Jeff did long time ago, and do only 1 ping, too. If 5-pings is too long.

However, in the case of a false positive, the result is netconsole will take about 2 minutes to time out. And then the rest will proceed normally.

This is something I meant to look at in u-boot network driver to fix it, but never got around to do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/16/2021 03:44PM by bodhi.
Re: u-boot producing long delay when $serverip is unavailable...
September 16, 2021 08:28PM
I have it set for 2 and for me that is perfect. I imagine different network sizes and topologies might benefit from a bit more time. Easy fix for me. <thumbs up>.

=====================================================
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: