Until recently, I’ve been booting my Le Potato from an SD card in the standard extlinux-compatible mode (this is just how my distro – NixOS – builds sd cards out of the box). Now I’ve purchased an eMMC, transferred the OS root to it, everything is fine, however I am still using that same SD card for booting as it has the firmware and the bootloader.
As the next step, I am trying to transfer the bootloader to eMMC and switch to UEFI mode. I have created an EFI partition, installed Grub in EFI mode, and flashed the official Libre Computer firmware for this board (from https://boot.libre.computer/ci/).
When I reboot in this configuration, everything is fine, except… there is no networking. I am not sure what is happening, as I am booting the exact same operating system – the only difference is in the early boot sequence (before stage1).
I have compared the two kernel logs, and everything looks fine until it begins to initialise the phy:
This is when booting from the SD card using extlinux config:
meson8b-dwmac c9410000.ethernet end0: renamed from eth0
meson8b-dwmac c9410000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
meson8b-dwmac c9410000.ethernet end0: PHY [mdio_mux-0.e40908ff:08] driver [Meson GXL Internal PHY] (irq=46)
meson8b-dwmac c9410000.ethernet end0: No Safety Features support found
meson8b-dwmac c9410000.ethernet end0: PTP not supported by HW
meson8b-dwmac c9410000.ethernet end0: configuring for phy/rmii link mode
This is when booting from the eMMC in UEFI mode:
meson8b-dwmac c9410000.ethernet end0: renamed from eth0
meson8b-dwmac c9410000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
meson8b-dwmac c9410000.ethernet end0: __stmmac_open: Cannot attach to PHY (error: -19)
I found people complaining about this exact issue with this exact NIC, however the proposed solution is extremely unimpressive.
I am starting to suspect the devicetree: in extlinux mode, NixOS tells U-Boot to load its devicetree (which is just the one from the upstream Kernel), while in UEFI mode, I believe, the devicetree is bundled in the firmware, right?
So, my questions are:
- What could be causing this issue?
- Are the official distributions doing something special to get ethernet working? I am looking at the Debian image, but I don’t see anything unusual…
- Is there a way to force U-boot from the official firmware to load my devicetree to see if it makes any difference?