Jump to content

Radxa Zero minimal (Ubuntu Noble 24.04) image - network-online.target reached early because of delayed wlan0 device loading


Recommended Posts

Posted

See https://github.com/canonical/netplan/pull/456#discussion_r1569065581

 

The way the netplan + networkd integration is designed requires all the network devices (wlan0 in particular) to exist at /sbin/init time - otherwise, the netplan generator disables `systemd-networkd-wait-online.service` which also causes `network-online.target` to be reached early. In particular, this breaks any network FS mounts on boot.

 

Of note, I tried logging in to file the bug via the dev contribution platform, but it looks I'm blocked from JIRA access, so am filing it here instead.

Posted
15 hours ago, Henry Tung said:

the way the netplan + networkd integration is designed

 

Bug in NetPlan / systemd-networkd or bug in Armbian implementation? We have no options to maintain NetPlan or any other similar complex user space component. Armbian uses Ubuntu  / Debian packages without changes as we are focused into Kernel space, framework, tools, build automation.

 

If there is a workaround, we can push it somewhere. Like this one: https://github.com/armbian/build/commit/7f32a5853513745ee6aa55b6d3856ac67ec036e2

 

16 hours ago, Henry Tung said:

Of note, I tried logging in to file the bug via the dev contribution platform

 

Forum is just fine. Armbian itself don't have resources to touch any of this, but someone might know something and help you / everyone.

 

I briefly understand what is the problem, but no idea how to solve it.

Posted (edited)

I haven't identified exactly what module load or trigger causes the network device to appear - waiting for 10 seconds during generator execution doesn't do the trick, so there is something explicit that happens post-initramfs stage that allows wlan0 to be instantiated, and if I understand the comment thread correctly, having the initramfs handle it would be the intended fix. Have to do some testing to figure out which module/firmware/etc. though, so that will have to wait for a few days until I have some time with the system to experiment.

Edited by Henry Tung
Posted (edited)

Found an appropriate workaround: Add the `brcmfmac_wcc` module to `/etc/initramfs-tools/modules`, and the wireless interface will be instantiated during initramfs loading and the netplan generator won't be confused by its absence.

 

Also found another issue where the extra `brcmfmac43456-sdio.clm_blob` firmware file isn't properly registered by the module code, so mkinitramfs skips it. That's inherited from the Raspberry Pi firmware files which introduced the extra `clm_blob`. I filed it for the Pi kernel here: https://github.com/raspberrypi/linux/issues/6828, but the same issue affects the Armbian kernel + firmware combination.

 

The fix is either a kernel patch or an initramfs hack like the following hook:

 

#!/bin/sh -e
# Copy missing firmware files for brcmfmac driver
PREREQ=""      
prereqs () { echo "${PREREQ}"; }
case "${1}" in prereqs) prereqs; exit 0 ;; esac ;
. /usr/share/initramfs-tools/hook-functions
echo "Copying missing firmware files for brcmfmac..."
cp /lib/firmware/brcm/brcmfmac43456-sdio.clm_blob ${DESTDIR}/lib/firmware/brcm/

 

The hack is unaware of any firmware file platform variants like `radxa,zero` or `radxa,rockpi4b` and such - it just turns out the `brcmfmac43456-sdio.clm_blob` file doesn't have any.

Edited by Henry Tung

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines