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>
Sat, 10 Sep 2022 11:02:36 +0000 (13:02 +0200)
commit18f77ef2d6ee2d3b28f686cbbfff2d7b8c37fb7e
tree6f53c822f5b45d08aaac8b5d1369720cdbdde9ac
parent8ff1d27e4895a597b00cb68b2e1936b186700223
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>
(cherry picked from commit b5675f500daff3ef3f904e53a5566aa7dc09b786)
target/linux/rockchip/armv8/base-files/etc/board.d/02_network