[PATCH] net: Bring up all interfaces before going interactive
Sascha Hauer
s.hauer at pengutronix.de
Fri Sep 16 06:16:06 PDT 2022
On Fri, Sep 16, 2022 at 02:49:42PM +0200, Sascha Hauer wrote:
> So far we only bring up network interfaces when we actually need them.
> This means we could be idling in the shell for long and once the user
> decides to do networking he has to wait for the link to be established.
> We can do better: Before going interactive bring up all known network
> interfaces which makes the links established when the user needs them.
>
> To implement this we have to rework carrier checking a bit, because
> otherwise barebox would wait for the links to be established before
> dropping to the shell.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
> common/startup.c | 3 +++
> include/net.h | 3 +++
> net/eth.c | 34 +++++++++++++++++++++-------------
> 3 files changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/common/startup.c b/common/startup.c
> index f53b73f81a..f63a0ae7d5 100644
> --- a/common/startup.c
> +++ b/common/startup.c
> @@ -37,6 +37,7 @@
> #include <linux/ctype.h>
> #include <watchdog.h>
> #include <glob.h>
> +#include <net.h>
> #include <bselftest.h>
>
> extern initcall_t __barebox_initcalls_start[], __barebox_early_initcalls_end[],
> @@ -208,6 +209,8 @@ enum autoboot_state do_autoboot_countdown(void)
> &outkey);
> command_slice_acquire();
>
> + eth_open_all();
> +
We could make the user experience even a bit better by doing this call
before waiting for the autoboot timeout which then speeds up netboot a
bit.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list