]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rk3399: r4s: Derive local MAC address if EEPROM is missing
authorChristian Kohlschütter <christian@kohlschutter.com>
Tue, 27 Sep 2022 15:05:21 +0000 (15:05 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 6 May 2023 09:28:18 +0000 (17:28 +0800)
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

index a41e774b0c4954813a8d87f3b4da4a009eb3d3da..ad36f7ce6766c878561c57955849deb5310ee277 100644 (file)
@@ -78,3 +78,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