local rootpart
case $(board_name) in
- bananapi,bpi-r2)
+ bananapi,bpi-r2|\
+ unielec,u7623-02-emmc-512m)
rootpart=$(cat /proc/cmdline)
rootpart="${rootpart##*root=}"
- rootpart="${rootpart%%p3 *}"
- if [ "$rootpart" = "/dev/mmcblk0" -o "$rootpart" = "/dev/mmcblk1" ]; then
- set_recovery_mac_address ${rootpart}p2
- fi
- ;;
- unielec,u7623-02-emmc-512m)
- set_recovery_mac_address /dev/mmcblk0p1
+ rootpart="${rootpart%% *}"
+ case $rootpart in
+ /dev/mmcblk0p2) # Legacy U7623 image
+ set_recovery_mac_address /dev/mmcblk0p1
+ ;;
+ /dev/mmcblk0p3) # U7623 or Banana Pi R2 eMMC
+ set_recovery_mac_address /dev/mmcblk0p2
+ ;;
+ /dev/mmcblk1p3) # Banana Pi R2 SD
+ set_recovery_mac_address /dev/mmcblk1p2
+ ;;
+ esac
;;
esac
}