aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rockchip
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-04-17 20:32:57 +0200
committerDavid Bauer <mail@david-bauer.net>2021-04-18 14:41:51 +0200
commiteb85ab9ab6a1dbd81103a2d3243e893de3680bf9 (patch)
tree1f67e29d5ff1bc75dc19dcd34e5e3bfb80bb68b0 /target/linux/rockchip
parent4a5aece2e60d8bda4132eab5470ac25402e2ebdc (diff)
downloadupstream-eb85ab9ab6a1dbd81103a2d3243e893de3680bf9.tar.gz
upstream-eb85ab9ab6a1dbd81103a2d3243e893de3680bf9.tar.bz2
upstream-eb85ab9ab6a1dbd81103a2d3243e893de3680bf9.zip
rockchip: use alternative CID path
Use an alternative path to access the CID of the SD card in MMC0, used for the generation of MAC addresses. With Kernel 5.10, the device name of the MMC controller changed, breaking MAC address generation. The new path is compatible with Kernel 5.4 as well as Kernel 5.10. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/rockchip')
-rw-r--r--target/linux/rockchip/armv8/base-files/etc/board.d/02_network2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
index 99f55513aa..f5e88cc148 100644
--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
@@ -18,7 +18,7 @@ rockchip_setup_interfaces()
nanopi_r2s_generate_mac()
{
- local sd_hash=$(sha256sum /sys/devices/platform/ff500000.dwmmc/mmc_host/mmc0/mmc0:*/cid)
+ local sd_hash=$(sha256sum /sys/class/block/mmcblk0/device/cid)
local mac_base=$(macaddr_canonicalize "$(echo "${sd_hash}" | dd bs=1 count=12 2>/dev/null)")
echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${mac_base}")")"
}