AML-A311D-CC Ethernet link down after boot

Running ArchLinux ARM on the AML-A311D-CC with firmware from 2025-Sep-04.
I have build U-Boot following the instructions at U-Boot for Libre Computer AML-A311D-CC ‘Alta’ (A311D) — Das U-Boot unknown version documentation (using tag v2026.01) and prepared the sd-card following ODROID-N2 | Arch Linux ARM (using the previously build u-boot)
I’m getting the following errors on network setup:

Log
Feb 08 15:27:13 alarm systemd[1]: Reached target Login Prompts.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ sfty not found
Feb 08 15:27:13 alarm systemd[1]: Started OpenSSH Daemon.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
Feb 08 15:27:13 alarm systemd-logind[504]: New seat seat0.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
Feb 08 15:27:13 alarm systemd[1]: Reached target SSH Access Available.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
Feb 08 15:27:13 alarm systemd[1]: Started User Login Management.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: COE Type 2
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Normal descriptors
Feb 08 15:27:13 alarm systemd[1]: Reached target Multi-User System.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
Feb 08 15:27:13 alarm kernel: debugfs: 'ff800280.cec' already exists in 'regmap'
Feb 08 15:27:13 alarm kernel: videodev: Linux video capture interface: v2.00
Feb 08 15:27:13 alarm kernel: Registered IR keymap rc-empty
Feb 08 15:27:13 alarm kernel: rc rc0: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0
Feb 08 15:27:13 alarm kernel: rc rc0: lirc_dev: driver meson-ir registered at minor = 0, raw IR receiver, no transmitter
Feb 08 15:27:13 alarm systemd[1]: Reached target Graphical Interface.
Feb 08 15:27:13 alarm kernel: input: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0/input0
Feb 08 15:27:13 alarm systemd[1]: Startup finished in 670ms (kernel) + 2.509s (initrd) + 4.566s (userspace) = 7.746s.
Feb 08 15:27:13 alarm kernel: rc rc0: sw decoder init
Feb 08 15:27:13 alarm kernel: meson-ir ff808000.ir: receiver initialized
Feb 08 15:27:13 alarm kernel: meson_vdec: module is from the staging directory, the quality is unknown, you have been warned.
Feb 08 15:27:13 alarm systemd[1]: Reached target Hardware activated USB gadget.
Feb 08 15:27:13 alarm systemd[1]: Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
Feb 08 15:27:13 alarm systemd[1]: Starting Virtual Console Setup...
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: renamed from eth0
Feb 08 15:27:13 alarm systemd[1]: systemd-vconsole-setup.service: Deactivated successfully.
Feb 08 15:27:13 alarm systemd[1]: Stopped Virtual Console Setup.
Feb 08 15:27:13 alarm systemd-networkd[459]: eth0: Interface name change detected, renamed to end0.
Feb 08 15:27:13 alarm systemd[1]: Starting Virtual Console Setup...
Feb 08 15:27:13 alarm systemd-networkd[459]: end0: Configuring with /etc/systemd/network/20-wired.network.
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
Feb 08 15:27:13 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: cannot attach to PHY (error: -ENODEV)
Feb 08 15:27:13 alarm systemd-networkd[459]: end0: Could not bring up interface, ignoring: No such device
Feb 08 15:27:13 alarm systemd[1]: Finished Virtual Console Setup.

I can bring the link up by re-plugging the network cable but as I’m planning to use poe to power the device this is not an option for me.
I have seen hub.libre.computer/t/alta-aml-a311d-cc-ethernet-issues/3657/21 where it was explained that this error was overcome by disabling Ethernet support in u-boot, which would be acceptable for me.

Please use official firmware: How to Flash Firmware or Recover Firmware on Libre Computer AML Boards

Upstream can be problematic sometimes.

The firmware mentioned above is the one from https://boot.libre.computer/release/aml-a311d-cc/aml-a311d-cc-spiflash.img.
That should be the official one shouldn’t it?

I’ve been using ArchLinuxARM on the Alta.

I use the standard bootloader that’s shipped on the SPI. I run ArchLinuxARM’s linux-aarch64 kernel package.

Ever since the stmmac was compiled into the kernel, the ethernet probes fine on boot.

I previously asked about the upstreaming progress on fix that’s in the libre computer kernel to wait for the phy that’s behind the mdio-mux.

This is what shows up in my dmseg

[   12.089555] meson8b-dwmac ff3f0000.ethernet end0: renamed from eth0
[   12.247909] meson8b-dwmac ff3f0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
[   12.335955] meson8b-dwmac ff3f0000.ethernet end0: PHY [mdio_mux-0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=30)
[   12.374602] meson8b-dwmac ff3f0000.ethernet end0: No Safety Features support found
[   12.382827] meson8b-dwmac ff3f0000.ethernet end0: PTP not supported by HW
[   12.384510] meson8b-dwmac ff3f0000.ethernet end0: configuring for phy/rgmii link mode
[   15.042409] meson8b-dwmac ff3f0000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx

Before, if the phy was not able to be detected, I could manually networkctl up end0after logging in, and the ethernet device could be detected.

                  -`                     alarm@alta
                 .o+`                    ----------
                `ooo/                    OS: Arch Linux ARM aarch64
               `+oooo:                   Host: aml-a311d-cc
              `+oooooo:                  Kernel: Linux 6.19.0-2-aarch64-ARCH
              -+oooooo+:                 Uptime: 18 hours, 40 mins
            `/:-:++oooo+:                Packages: 412 (pacman)
           `/++++/+++++++:               Shell: bash 5.3.9
          `/++++++++++++++:              Terminal: /dev/pts/0
         `/+++ooooooooooooo/`            CPU: g12b (6) @ 2.21 GHz
        ./ooosssso++osssssso+`           GPU: Amlogic meson-g12a-mali [Integrated]
       .oossssso-````/ossssss+`          Memory: 2.07 GiB / 3.68 GiB (56%)
      -osssssso.      :ssssssso.         Swap: Disabled
     :osssssss/        osssso+++.        Disk (/): 20.57 GiB / 28.26 GiB (73%) - ext4
    /ossssssss/        +ssssooo/-        Local IP (end0): 192.168.20.182/24
  `/ossssso+/:-        -:/+osssso+-      Locale: en_US.UTF-8

Thanks for the Info. I’m also using the linux-aarch64 kernel package.

Could you tell me how you are using the SPI. I have followed the explanation for the ODROID N2 to get the alta to boot as that was the only explanation with which I was able to build a booting sd-card.

Currently I got mine to detect the phy on poweron by disabeling all networking in u-boot. But when I reboot the alta (not a full power cycle) it again can’t detect it. And yes I’m also able to do a networkctl up end0 to bring up the ethernet device after boot. But as I want to use the alta as a server that is not really an option (well I could add a timer to fire some time after boot to bring up the interface but I’m still not that desperate).

I’ve being using the bootloader on the SPI as documented in Libre Computer Board BIOS/Firmware Update Images

On my SD card, there’s no boot loader installed, there’s an EFI partition on it, which I created an EFI/arch directory, and copied the Image initramfs-linux.img to. (e.g. cp /boot/Image /boot/iniitramfs-linux.img /boot/efi/EFI/arch)

Then in the boot loader, I made an boot entry to boot that kernel.

  • UEFI Config
  • Add Boot Option
  •   Description: Arch Linux
      File: mmc 1:1/EFI\arch\Image
      Initrd File: mmc 1:1/EFI\arch\initramfs-linux.img
      Fdt File: mmc 1:1/dtb\amlogic\meson-g12b-a311d-libretech-cc.dtb
      Optional Data: root=/dev/mmcblk1p2 rw
    

Note 1: I have a weird setup, my EFI partition is on the SD card, and the root partition is on the eMMC. (That’s why you see mmcblk1p2, when it would be mmcblk0p2 if the root was also on the SD card.)

Note 2: Normally on the Libre Computer images, it uses UEFI to find the EFI system partition and boot into Grub as an EFI application, which then boots the kernel (the standard process in the x86_64 world). However, I didn’t feel like adding the extra Grub step in my ArchLinuxARM setup, so I just booted straight into the kernel (since the kernel image can be used as an EFI application directly)

Note 3: Since Libre Computer spent the effort to design their boards to work as an UEFI system, you should be able to use https://archboot.com/ to run an installer (like x86_64 world) as an EFI application, instead of dealing with prebuilt system images.

Just a heads up, I am hitting a bug with the SD card on warm reboots (e.g. systemctl reboot). In the upstream kernel, the SD card is using UHS modes which uses 1.8v signaling. However, when rebooting the SD card does not get powered off, so the card does not switch back to 3.3v signaling. (So I have to power off the board, and re-power the board)

I believe this is the workaround in the libre-computer kernel

Jonas tried to get this upstream…

…but it was never accepted.

So you may want to build the libre-computer LTS kernels instead of using the mainline linux-aarch64 kernel from ArchLinuxARM.

Thank you for the help. I was not aware that the Alta had an integrated boot loader.

Boot

I have set up the Sd-card without bootloader and am using the one on the SPI and have it also setup to just boot the UKI Image. The only difference is that I’m only supplying the directory with the device trees.

UEFI boot config
#/boot/extlinux/extlinux.conf
default arch
menu title U-Boot menu
prompt 20
timeout 10

label arch
  menu label Arch Linux ARM linux-aarch64
  linux /boot/Image
  initrd /boot/initramfs-linux.img
  fdtdir /boot/dtbs/
  append root=/dev/mmcblk0p1 console=ttyAML0,115200n8 loglevel=6 rw earlycon consoleblank=0

Ethernet interface

This works sometimes. It seems to work more often on a cold boot than on a warm reboot. (I also don’t seem to have the bug with the SD card on warm reboots.)

I have attached the relevant (if more information is needed I’m happy to supply more) part of the system log of a where the interface was brought up and one where it stayed down. (running the linux-aarch64 6.19-2 kernel package)

Log (interface DOWN)
Feb 15 17:09:47 alarm systemd-networkd[448]: eth0: Interface name change detected, renamed to end0.
Feb 15 17:09:47 alarm kernel: meson-ir ff808000.ir: receiver initialized
Feb 15 17:09:47 alarm systemd[1]: Starting Virtual Console Setup...
Feb 15 17:09:47 alarm kernel: mc: Linux media interface: v0.10
Feb 15 17:09:47 alarm systemd-networkd[448]: end0: Configuring with /etc/systemd/network/en.network.
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
Feb 15 17:09:47 alarm systemd-networkd[448]: end0: Could not bring up interface, ignoring: No such device
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ sfty not found
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: COE Type 2
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Normal descriptors
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
Feb 15 17:09:47 alarm kernel: videodev: Linux video capture interface: v2.00
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: renamed from eth0
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
Feb 15 17:09:47 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: cannot attach to PHY (error: -ENODEV)
Feb 15 17:09:47 alarm kernel: meson_vdec: module is from the staging directory, the quality is unknown, you have been warned.
Feb 15 17:09:48 alarm systemd[1]: Finished Virtual Console Setup.
Log (interface UP)
Feb 15 17:28:11 alarm systemd[1]: Starting Load JSON user/group Records from Credentials...
Feb 15 17:28:11 alarm kernel: mc: Linux media interface: v0.10
Feb 15 17:28:11 alarm kernel: videodev: Linux video capture interface: v2.00
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: IRQ sfty not found
Feb 15 17:28:11 alarm systemd[1]: Finished Load JSON user/group Records from Credentials.
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
Feb 15 17:28:11 alarm systemd-resolved[437]: Clock change detected. Flushing caches.
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: COE Type 2
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Normal descriptors
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[...]
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: renamed from eth0
Feb 15 17:28:11 alarm systemd-networkd[451]: eth0: Interface name change detected, renamed to end0.
Feb 15 17:28:11 alarm systemd[1]: Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
Feb 15 17:28:11 alarm systemd[1]: Starting Virtual Console Setup...
Feb 15 17:28:11 alarm systemd-networkd[451]: end0: Configuring with /etc/systemd/network/en.network.
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
[...]
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: PHY [mdio_mux-0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=30)
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: No Safety Features support found
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: PTP not supported by HW
Feb 15 17:28:11 alarm kernel: meson8b-dwmac ff3f0000.ethernet end0: configuring for phy/rgmii link mode
Feb 15 17:28:11 alarm systemd[1]: Finished Virtual Console Setup.
Feb 15 17:28:11 alarm systemd-networkd[451]: end0: Link UP

This seems to me like a race-condition and I would be happy to work on fixing it when I have time. That being said I have zero experience working on the kernel and drivers and would need some help to know where to start.

Scripts

For the time being I have written a small script which is run after boot to bring the interface up. I do not think that this should be a permanent solution.

I have attached the script and systemd service and timer in case anyone finds them useful.

Scripts
#/usr/local/bin/bring-interface-up
---
#!/bin/bash

one_interface_up(){
	for iface in "$1"; do
		state="$(cat /sys/class/net/$iface/operstate)"
		echo "Interface $iface is $state"
		if [[ "$state" == "up" ]]
		then
			return 0;
		fi
	done
	echo "No interface is up"
	return 1;
}

try_to_bring_any_interface_up(){
	for iface in "$1"; do
		echo "Trying to bring $iface up"
		ip link set up "$iface"
	done
}

interfaces=$(ls "/sys/class/net/" | sed -e 's/lo//')
echo "Interfaces: $interfaces"

one_interface_up "$interfaces"
until [[ $? -eq 0 ]]
do
	try_to_bring_any_interface_up "$interfaces"
	sleep 1
	one_interface_up "$interfaces"
done
#/etc/systemd/system/bring-interface-up.timer
---
[Unit]
Description=Try to bring up an interface

[Timer]
OnBootSec=30s

Unit=bring-interface-up.service

[Install]
WantedBy=timers.target
#/etc/systemd/system/bring-interface-up.service
---
[Unit]
Description=Try to bring up interface

[Service]
ExecStart=/usr/local/bin/bring-interface-up