diff options
Diffstat (limited to 'target/linux/rockchip')
-rw-r--r-- | target/linux/rockchip/armv8/base-files/etc/board.d/02_network | 13 |
1 files changed, 2 insertions, 11 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 b0e6479947..816045a480 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 @@ -17,15 +17,6 @@ rockchip_setup_interfaces() esac } -generate_mac_from_mmc_cid() -{ - local mmc_dev=$1 - - local sd_hash=$(sha256sum /sys/class/block/$mmc_dev/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}")")" -} - nanopi_r4s_get_mac() { local interface=$1 @@ -38,7 +29,7 @@ nanopi_r4s_get_mac() address=$(macaddr_setbit_la "$address") fi else - address=$(generate_mac_from_mmc_cid mmcblk1) + address=$(macaddr_generate_from_mmc_cid mmcblk1) if [ "$interface" = "lan" ]; then address=$(macaddr_add "$address" 1) fi @@ -56,7 +47,7 @@ rockchip_setup_macs() case "$board" in friendlyarm,nanopi-r2s) - wan_mac=$(generate_mac_from_mmc_cid mmcblk0) + wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0) lan_mac=$(macaddr_add "$wan_mac" 1) ;; friendlyarm,nanopi-r4s) |