-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Orange Pi 5 | MAC address changes on reboot #6663
Comments
Does it help to add |
@MichaIng adding the value doesn't change anything on my Opi5 demo system
|
And pre-up /bin/ip l set dev eth0 address 8a:33:ce:b3:b0:b9 |
Creating
has worked for me, which is of course essentially equivalent to what @MichaIng has proposed above. |
Ah, For others: Note that |
But |
Jep, and as well |
I have the same problem with the orange pi 3b wiil this likely be fixed in the future. Does the above fix work also the same for my orange pi 3b ? |
First of all, on my Orange Pi 5, the MAC address is static: root@DietPi:~# ip l
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether b6:88:86:ed:09:3c brd ff:ff:ff:ff:ff:ff
altname end1
root@DietPi:~# reboot
root@DietPi:~# ip l
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether b6:88:86:ed:09:3c brd ff:ff:ff:ff:ff:ff
altname end1
root@DietPi:~# uname -a
Linux DietPi 5.10.160-legacy-rk35xx #1 SMP Fri Feb 2 07:51:33 UTC 2024 aarch64 GNU/Linux
root@DietPi:~# cat /proc/device-tree/model
Orange Pi 5
root@DietPi:~# dmesg | grep random
[ 7.861660] random: crng init done @thuehlinger @Joulinar is yours still getting a new one every (re)boot? I do not own an Orange Pi 3B, but on the Orange Pi 5 Plus, the MAC addresses of both Ethernet addresses are static as well. Orange Pi 3B however has a different chip (RK3566 vs RK3588) and uses a kernel build based on mainline Linux (just with a device tree based on Orange Pi's one), instead of Rockchip's legacy kernel sources. So the situation is quite different. Mainline Linux does not provide any Orange Pi 3B device tree, hence that one is based on the one from Xunlong, and indeed they are identical mostly, definitely in everything related to Ethernet:
Btw, Armbian took that board out of (community) support, due to reports where Ethernet was not working at all (for some, for others it works), pointing to a Xunlong/Orange Pi information that the SBC was taken out of sale for investigation hardware-related Ethernet issues, likely resulting in a new revision. So I do not expect any development done any time soon: armbian/build#6587 However, just to have a look, and the option to test some device tree changes which fixed such on other SBCs, two things:
|
I can confirm that with the current kernal (now the one you are building now),
For me the issue appeared after I had flashed the SPI bootloader using the option in |
So then the bootloader (MMC vs SPI) seems to make the difference. I use an SD card, hence MMC bootloader. There is no way to switch to the SPI bootloader, is it? I'll try to just erase the MMC one from the SD card, so I must try with SPI. |
- DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: #6663 (comment)
Tested with (recent) SPI bootloader now, by erasing the MMC one:
root@DietPi:~# dmesg | grep random
[ 8.502687] random: crng init done
[ 11.248191] systemd[1]: Starting systemd-random-seed.service - Load/Save Random Seed... And my MAC address is still the same. Just to be sure, retested with a cold boot, and still the same MAC. So seems that the U-Boot upgrade fixed it. Please verify your end. |
Thanks for the advanced option fix, works like a charm! I have flashed the most recent SPI bootloader and indeed, it fixes my random MAC address issue as well. MAC address is now static again. Thanks! |
Okay great. I wonder whether it's worth to flash it automatically on next DietPi update, or at least offer it or inform about it. Based on |
Forcing the user to flash their bootloader is maybe a bit intrusive and dangerous, but offering it as an option could be a viable way. After all, the original bootloader shipped with OrangePi distributions did allow to correctly read out the static MAC. It was just me eager to update it on an ealier DietPi distribution that broke it. |
- Orange Pi 5 | Older U-Boot builds caused the Ethernet MAC address to be random and change on every boot. Recent U-Boot builds solve this, but they are not flashed automatically on package upgrades. We hence inform users and offer to flash the latest U-Boot image during the DietPi update. Many thanks to @thuehlinger for reporting and testing the case: #6663
Required Information
bullseye
Linux orange 5.10.160-legacy-rk35xx #1 SMP Mon Aug 28 01:21:24 UTC 2023 aarch64 GNU/Linux
Orange Pi 5 (aarch64)
Steps to reproduce
dietpi-config
sudo dmesg | grep random
->[ 4.414068] rk_gmac-dwmac fe1c0000.ethernet: rk_get_eth_addr: generate random eth mac address: 02:63:3b:54:c3:54
Expected behaviour
The MAC address should be the same, as it was the case when originally installing DietPi (older version), using the uBoot loader contained in the supplier-provided custom Ubuntu image (by OrangePi). Without the MAC address being the same on every reboot, I cannot assign a static IP address using DHCP on my home network router.
Actual behaviour
The MAC address gets randomly assigned on every reboot.
Extra details
This might be the same issue a reported here: Joshua-Riek/ubuntu-rockchip#274, with the solution being to revert this change orangepi-xunlong/u-boot-orangepi@1f70ac3.
The text was updated successfully, but these errors were encountered: