rpi-eeprom-update: Change BOOTFS .elf check to a warning

If no .elf files are found in the boot partition then raise a warning
instead of an error. This normally indicates a system configuration
error but allow the usage of this tool in non-standard setups.
This commit is contained in:
Tim Gover
2020-05-21 17:16:34 +01:00
parent 5c7dfdf3b7
commit 21bd52daa0

View File

@@ -440,7 +440,11 @@ findBootFS()
# If BOOTFS is not a directory or doesn't contain any .elf files then # If BOOTFS is not a directory or doesn't contain any .elf files then
# it's probably not the boot partition. # it's probably not the boot partition.
[ -d "${BOOTFS}" ] || die "BOOTFS: \"${BOOTFS}\" is not a directory" [ -d "${BOOTFS}" ] || die "BOOTFS: \"${BOOTFS}\" is not a directory"
[ "$(find "${BOOTFS}/" -name "*.elf" | wc -l)" -gt 0 ] || die "BOOTFS: \"${BOOTFS}\" contains no .elf files" if [ "$(find "${BOOTFS}/" -name "*.elf" | wc -l)" -gt 0 ]; then
echo "BOOTFS ${BOOTFS}"
else
echo "WARNING: BOOTFS: \"${BOOTFS}\" contains no .elf files. Please check boot directory"
fi
} }
getVL805CurrentVersion() getVL805CurrentVersion()