diff --git a/packages/bsp/common/usr/bin/armbian-install b/packages/bsp/common/usr/bin/armbian-install index b197fcd5f..939400ce9 100755 --- a/packages/bsp/common/usr/bin/armbian-install +++ b/packages/bsp/common/usr/bin/armbian-install @@ -929,6 +929,14 @@ main() $(type -t write_uboot_platform_mtd) == function ]] && options+=(7 'Install/Update the bootloader on MTD Flash') fi + # show flasher if there are available block devices + if command -v armbian-config >/dev/null && [ -x "$(command -v armbian-config)" ]; then + armbian-config --api module_images status >/dev/null + if [[ $? -eq 0 ]]; then + options+=("8" "Download and flash clean image") + fi + fi + [[ ${#options[@]} -eq 0 || "$root_uuid" == "$emmcuuid" || "$root_uuid" == "/dev/nand2" ]] && \ dialog --ok-label 'Cancel' --title ' Warning ' --backtitle "$backtitle" --colors --no-collapse --msgbox '\n\Z1There are no targets. Please check your drives.\Zn' 7 52 cmd=(dialog --title 'Choose an option:' --backtitle "$backtitle" --menu "\nCurrent root: $root_uuid \n $rootchip (${root_partition_device})\n" 14 75 7) @@ -1012,6 +1020,10 @@ main() write_uboot_to_mtd_flash "$DIR" "$mtdcheck" return ;; + 8) + armbian-config --cmd FLASH1 + return + ;; *) title='UEFI install to internal drive'