mirror of
https://github.com/armbian/configng.git
synced 2026-01-06 10:37:41 -08:00
dtoverlays: Check which overlay names /boot/boot.scr script can actually load.
We will not provide a selection of options that cannot be loaded by this script.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user