mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
grub-with-dtb: accept GRUB_FDT_FILE if BOOT_FDT_FILE is unset
- some boards have u-boot auto-detect the board variant, and thus we unset `BOOT_FDT_FILE` - but grub needs to know... - so introduce a `GRUB_FDT_FILE` that is checked in case `BOOT_FDT_FILE` is not set - this way we can keep u-boot autodetecting and grub happy - preserve BOOT_FDT_FILE into GRUB_FDT_FILE for `nanopct6`/`nanopct6-lts`
This commit is contained in:
@@ -15,8 +15,8 @@ enable_extension "grub"
|
||||
|
||||
# Ensure config is sufficient for operation
|
||||
function extension_prepare_config__prepare_grub_with_dtb() {
|
||||
# Make sure BOOT_FDT_FILE is set and not empty
|
||||
[[ -n "${BOOT_FDT_FILE}" ]] || exit_with_error "BOOT_FDT_FILE is not set, required for grub-with-dtb"
|
||||
# Make sure BOOT_FDT_FILE, or GRUB_FDT_FILE is set and not empty
|
||||
[[ -n "${BOOT_FDT_FILE:-"${GRUB_FDT_FILE}"}" ]] || exit_with_error "BOOT_FDT_FILE/GRUB_FDT_FILE is not set, required for grub-with-dtb"
|
||||
|
||||
display_alert "Extension: ${EXTENSION}: Initializing config" "${BOARD}" "info"
|
||||
}
|
||||
@@ -30,7 +30,7 @@ function post_family_tweaks_bsp__add_grub_with_dtb_config_file() {
|
||||
display_alert "Extension: ${EXTENSION}: Adding grub-with-dtb config file" "${BOARD}" "info"
|
||||
# maybe add this to conffiles?
|
||||
cat <<- EOD > "${destination}"/etc/armbian-grub-with-dtb
|
||||
BOOT_FDT_FILE="${BOOT_FDT_FILE}"
|
||||
BOOT_FDT_FILE="${BOOT_FDT_FILE:-"${GRUB_FDT_FILE}"}"
|
||||
EOD
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user