-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rock 3A fails to bring up network on DietPi 9.5 #7108
Comments
Tried the edge kernel image ( |
Probably the same like here (at least same SoC): #6951 Through, our error messages seem to indicate a different driver issue. Does it work on cold boot/power cycle? I just triggered a rebuild, with Linux 6.6.33, just in case it was some intermediate issue: https://github.com/MichaIng/DietPi/actions/runs/9521706157/job/26249731931 Once this has finished, to test it: cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-current-rockchip64.deb
dpkg -i linux-{image,dtb}-current-rockchip64.deb
reboot ... just found a matching report at the Armbian forum, but from March with Linux 6.1: https://forum.armbian.com/topic/35560-lost-network-in-rock-3a-after-upgrading-to-2421/ |
No, cold boot/power cycle doesn't help at all.
I'm not sure what the previous kernel version was before the 9.5 update. Let me check if its in the systemd logs somewhere... Compared to bullseye I see some phy-related devicetree diffs:
This patch looks suspiciously like the reverse of the devicetree diff I see: https://github.com/armbian/build/blob/v24.2.1/patch/kernel/archive/rockchip64-6.1/board-rock3a-gmac1.patch I need to try booting with the older devicetree image or that particular patch applied. |
But this patch is applied for 6.1/legacy builds only, not 6.6. There is no such patch for 6.6: https://github.com/armbian/build/tree/v24.2.1/patch/kernel/archive/rockchip64-6.6 Here is how to downgrade: apt install linux-{image,dtb}-current-rockchip64=24.2.1 This is Linux 6.6.16, and likely matches the version/dtb from the Bullseye image you checked, since our Bullseye and Bookworm images share the same kernel. So we'd need to check for commits done between those version. Hmm, I do not see any in mainline Linux: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts?h=linux-6.6.y With which Bullseye image did you compare it?
So the diff in the |
which contains The system was in my parents basement for a while, so this may have been my first upgrade attempt to a newer version actually... |
Ah okay, a very old one. Then the diff makes sense, regarding the patch. However, exactly that patch was suspected by the guy on the Armbian forum to cause the issue (with Linux 6.1) instead of solving it 😄. There were definitely some versions without the patch which had no Ethernet issues, at least not reported by anyone else. Did the downgrade to v24.2.1 work? |
So with the current bullseye image I'm getting:
where with 6.6.33 and verbose logging I get:
|
Our Bullseye and Bookworm use the same kernel, as I said, so they cannot behave any different. What I meant is downgrading to an older Linux version provided by the Armbian APT repo. You can test this on Bookworm or Bullseye, doesn't matter: apt install linux-{image,dtb}-current-rockchip64=24.2.1 But just to be sure, since I see no ip link EDIT: Ah, I misinterpreted the report at the Armbian forum. In that case, the Linux 6.1 version with the patch worked, and Linux 6.6.16 without the patch did not. So similar to you case (if Linux 6.6.16 after above downgrade still has the same issue). However, it then seems to affect rare cases only, maybe a particular bad board revision or batch 🤔. |
I just tried the downgrade, but still get the error:
For the bullseye image I just downloaded I see a working This was
though this was booted from sdcard as a fresh image. with the half-upgraded current state the eMMC is in it says:
|
You mean that one has no Ethernet issue? This is the exact same kernel used on the Bookworm image.
Our current images (both: Bookworm and Bullseye) are shipped with Hence I am confused that downgrading to the exact same kernel version that worked fine for you already (and worked for months for everyone else as well) does not solve the issue. Just to rule it out, does this have any effect? sed -i '/^[^#].*network-pre.target/s/^/#/' /etc/systemd/system/ifupdown-pre.service.d/dietpi.conf
systemctl daemon-reload
reboot Maybe it is some strange timing issue. |
I think its actually u-boot that is different. The bad boots were all from eMMC (which I was trying to repair) and the good boots are fresh installs from microSD. The full boot log diff shows:
Full boot logs from serial port: |
Copying the newer u-boot from microsd to emmc:
And indeed after a reboot the network is back to working now :) |
I kept a copy of the old u-boot in case you want to try to reproduce using that :)
|
Great debugging, shown that the adapter is missing already in U-Boot stage, indicating a U-Boot issue, not kernel issue. Still strange, that this issue appeared for you after a kernel upgrade. The U-Boot package is upgraded via APT, but not flashed automatically. You can do this via |
I'm assuming it might be something like the older kernel had a workaround for the older u-boot and something got fixed or changed in the newer u-boot so that workaround was dropped in newer kernels. |
Whatever it was, good that you cannot replicate it anymore with current U-Boot and kernel. I'll mark this hence as closed. I'll keep it in mind if others run into the same issue, in which case we can apply a patch to enforce the U-Boot upgrade. |
Thanks for this, I got this issue in Armbian and I solved patching the U-Boot following this issue. |
Creating a bug report/issue
Required Information
DietPi version |
cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=5
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
Distro version |
echo $G_DISTRO_NAME $G_RASPBIAN
bookworm
Kernel version |
uname -a
Linux DietPi 6.6.32-current-rockchip64 #1 SMP PREEMPT Sat May 25 14:22:56 UTC 2024 aarch64 GNU/Linux
SBC model |
echo $G_HW_MODEL_NAME
or (EG: RPi3)ROCK 3A (aarch64)
Power supply used | (EG: 5V 1A RAVpower)
PoE HAT
SD card used | (EG: SanDisk ultra)
Rock Pi EMMC 5.1 16 GB
Additional Information (if applicable)
Relevant kernel error is "__stmmac_open: Cannot attach to PHY":
Steps to reproduce
Expected behaviour
Built-in ethernet connection works
Actual behaviour
rk_gmac-dwmac fails to initialize
The text was updated successfully, but these errors were encountered: