Enable direct flashing method in armbian-install menu

https://github.com/armbian/configng/pull/705
This commit is contained in:
Igor Pecovnik
2025-12-04 16:19:11 +01:00
committed by Rolf Leggewie
parent 6142670754
commit c68d4c62d4

View File

@@ -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'