diff --git a/packages/bsp/common/usr/bin/armbian-install b/packages/bsp/common/usr/bin/armbian-install index 9a4a20701b..b3b94336a8 100755 --- a/packages/bsp/common/usr/bin/armbian-install +++ b/packages/bsp/common/usr/bin/armbian-install @@ -834,11 +834,14 @@ main() LANG=C echo -e "$(date): Start ${0##*/}.\n" >> $logfile # find real mmcblk device numbered 0, 1, 2 for eMMC, SD + # On some devices, the eMMC chip does not have a separate boot0(1) partition. + # Use the system interface to determine the SD or eMMC memory type. for ret in $(find /dev -name 'mmcblk[0-2]' -and -type b) do - if [ -b ${ret}boot0 ];then + if [ -b ${ret}boot0 ] || \ + [ "$(cat /sys/block/${ret#/dev/}/device/type 2>/dev/null)" == "MMC" ]; then emmc_dev=$ret - else + elif [ "$(cat /sys/block/${ret#/dev/}/device/type 2>/dev/null)" == "SD" ]; then sd_dev=$ret fi done