rk3399: r4s: Derive local MAC address if EEPROM is missing
PATCH 1/1 rk3399: r4s: Derive local MAC address if EEPROM is missing
Some RK3399 boards, such as newer revisions of NanoPi R4S, do not provide an EEPROM chip containing a globally unique MAC address.
Currently, this means that a randomly generated temporary MAC address may be generated each time the device is rebooted, leading to ARP cache issues and other confusing bugs.
Since RK3399 CPUs provide a built-in unique serial number, we can reliably derive a locally MAC address from it by reading the corresponding bits from the non-secure efuse block.
Enable configuration options that allow deriving a local MAC address from the CPU serial number.
--- configs/nanopi-r4s-rk3399_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
configs/nanopi-r4s-rk3399_defconfig +4 -0
@@ -63,3 +63,7 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_MISC=y +CONFIG_MISC_INIT_R=y +CONFIG_ROCKCHIP_EFUSE=y +CONFIG_ROCKCHIP_OTP=y
Signature · 1 line
2.36.2
Hi Christian,
Sorry for reply late for this patch, could you pls send again with sign-off-by.
for the code change looks OK for me.
Thanks,
- Kever
Quoted 29 lines · Christian Kohlschütter
Some RK3399 boards, such as newer revisions of NanoPi R4S, do not provide an EEPROM chip containing a globally unique MAC address.
Currently, this means that a randomly generated temporary MAC address may be generated each time the device is rebooted, leading to ARP cache issues and other confusing bugs.
Since RK3399 CPUs provide a built-in unique serial number, we can reliably derive a locally MAC address from it by reading the corresponding bits from the non-secure efuse block.
Enable configuration options that allow deriving a local MAC address from the CPU serial number.
--- configs/nanopi-r4s-rk3399_defconfig | 4 ++++ 1 file changed, 4 insertions(+)configs/nanopi-r4s-rk3399_defconfig +4
-0@@ -63,3 +63,7 @@ CONFIG_VIDEO_ROCKCHIP=y CONFIG_DISPLAY_ROCKCHIP_HDMI=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_MISC=y +CONFIG_MISC_INIT_R=y +CONFIG_ROCKCHIP_EFUSE=y +CONFIG_ROCKCHIP_OTP=y