Hi Ilias,

On Wednesday, September 9th, 2026 at 9:18 AM, Ilias Apalodimas 
<[email protected]> wrote:

> Hi Petr,
> 
> On Wed, 9 Sept 2026 at 09:27, Petr Hodina via B4 Relay
> <[email protected]> wrote:
> >
> > From: Petr Hodina <[email protected]>
> >
> > Gate the initr_net() INITCALL on CONFIG_NET_SKIP_BOOT_INIT at the
> > call site in initcall_run_r(), so boards with no wired NIC can skip
> > the boot-time probe and "Net:" banner without touching initr_net()
> > itself.
> >
> > Signed-off-by: Petr Hodina <[email protected]>
> > ---
> > initr_net() probes for Ethernet and prints a "Net:" banner when `NET` option
> > is enabled, which is not relevant for boards that use USB gadgets
> > for networking.
> 
> Why? Doesn't that eventually print 'Net: No ethernet found.' ?
> 

The current implementation runs the `INITCALL(initr_net)` code only if the `NET`
option is enabled. Otherwise you don't run it and initialize the Ethernet 
interface
by calling `eth_initialize`.

Given that the board doesn't have a physical NIC (on a mobile device) but still
the networking stack is required wouldn't it be better to also skip 
initialization
of peripheral that's not present?

> >
> > Add CONFIG_NET_SKIP_BOOT_INIT to skip that boot-time probe. Later
> > invocations still probe UCLASS_ETH normally. Defaults to n.
> 
> What do you mean normally?
> I don't think adding a Kconfig option to disable a print is worth the hassle.

As stated above it's not about the print statement it's about the 
initialization.
The reason why I mentioned normally is that the `eth_init` would be called
in the `net_loop`.

Kind regards
Petr

Reply via email to