rockchip: ensure NanoPi R4S has unique MAC address
authorDavid Bauer <mail@david-bauer.net>
Fri, 9 Sep 2022 23:01:57 +0000 (01:01 +0200)
committerDavid Bauer <mail@david-bauer.net>
Fri, 9 Sep 2022 23:54:40 +0000 (01:54 +0200)
commitb5675f500daff3ef3f904e53a5566aa7dc09b786
treea8a4aeebfea62fe31796a9e9b92f93c91025410f
parent2ca56028645c305d3d6b2a64b4bc8bbb5aaeebef
rockchip: ensure NanoPi R4S has unique MAC address

Ensure the MAC address for all NanoPi R4S boards is assigned unique for
each board.

FriendlyElec ship two versions of the R4S: The standard as well as the
enterprise edition with only the enterprise edition including the EEPROM
chip that stores the unique MAC address.

In order to assign both board types unique MAC addresses, fall back on
the same method used for the NanoPi R2S in case the EEPROM chip is not
present by generating the board MAC from the SD card CID.

[0] https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R4S#Differences_Between_R4S_Standard_Version_.26_R4S_Enterprise_Version

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/rockchip/armv8/base-files/etc/board.d/02_network