diff --git a/tools/modules/system/manage_dtoverlays.sh b/tools/modules/system/manage_dtoverlays.sh index 58149545..f1760918 100644 --- a/tools/modules/system/manage_dtoverlays.sh +++ b/tools/modules/system/manage_dtoverlays.sh @@ -33,6 +33,21 @@ function manage_dtoverlays () { [[ ! -f "${overlayconf}" || ! -d "${overlaydir}" ]] && echo -e "Incompatible OS configuration\nArmbian device tree configuration files not found" | show_message && return 1 + # check /boot/boot.scr scenario ${overlay_prefix}-${overlay_name}.dtbo + # or ${overlay_name}.dtbo only + # scenario: + # 00 - The /boot/boot.scr script cannot load the overlays provided by Armbian. + # 01 - It is possible to load only if the full name of the overlay is written. + # 10 - Loading is possible only if the overlay name is written without a prefix. + # 11 - Both spellings will be loaded. + scenario=$( + awk 'BEGIN{p=0;s=0} + /load.*overlay\/\${overlay_prefix}-\${overlay_file}.dtbo/{p=1} + /load.*overlay\/\${overlay_file}.dtbo/{s=1} + END{print p s} + ' /boot/boot.scr + ) + while true; do local options=() j=0