extlinux: add DEFAULT_OVERLAYS support

This commit is contained in:
Muhammed Efe Cetin 2024-06-14 18:06:43 +03:00 committed by Igor
parent 8d7d6f44c7
commit f28bb4e5ae

View File

@ -146,6 +146,15 @@ function install_distribution_agnostic() {
else
echo " fdtdir ${bootpart_prefix}dtb/" >> "$SDCARD/boot/extlinux/extlinux.conf"
fi
if [[ -n $DEFAULT_OVERLAYS ]]; then
DEFAULT_OVERLAYS=(${DEFAULT_OVERLAYS//,/ })
DEFAULT_OVERLAYS=("${DEFAULT_OVERLAYS[@]/%/".dtbo"}")
DEFAULT_OVERLAYS=("${DEFAULT_OVERLAYS[@]/#/"${bootpart_prefix}dtb/${BOOT_FDT_FILE%%/*}/overlay/${OVERLAY_PREFIX}-"}")
display_alert "Adding to extlinux.conf" "fdtoverlays=${DEFAULT_OVERLAYS[@]}" "debug"
echo " fdtoverlays ${DEFAULT_OVERLAYS[@]}" >> "$SDCARD/boot/extlinux/extlinux.conf"
fi
else # ... not extlinux ...
if [[ -n "${BOOTSCRIPT}" ]]; then # @TODO: && "${BOOTCONFIG}" != "none"