mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-21 14:53:35 +08:00
rpi-update: Warn if initramfs is configured
This commit is contained in:
22
rpi-update
22
rpi-update
@@ -339,6 +339,27 @@ function check_partition {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_initramfs {
|
||||||
|
local INITRAMFS=""
|
||||||
|
if command -v vcgencmd > /dev/null; then
|
||||||
|
INITRAMFS="$(echo =$(vcgencmd get_config ramfsfile) | cut -d'=' -f3)"
|
||||||
|
fi
|
||||||
|
if [ "$INITRAMFS" == "" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [[ ${SKIP_WARNING} -ne 0 ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "Updating a system with initramfs configured is not supported by rpi-update"
|
||||||
|
echo "This could result in a system that will not boot."
|
||||||
|
read -p "Would you like to proceed? (y/N)" -n 1 -r -s
|
||||||
|
echo ""
|
||||||
|
if ! [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function update_firmware {
|
function update_firmware {
|
||||||
echo " *** Updating firmware"
|
echo " *** Updating firmware"
|
||||||
rm -rf "${FW_PATH}/"start*.elf
|
rm -rf "${FW_PATH}/"start*.elf
|
||||||
@@ -446,6 +467,7 @@ function do_update {
|
|||||||
if [[ ${WANT_PI4} -eq 1 ]]; then
|
if [[ ${WANT_PI4} -eq 1 ]]; then
|
||||||
check_partition
|
check_partition
|
||||||
fi
|
fi
|
||||||
|
check_initramfs
|
||||||
check_eeprom_version
|
check_eeprom_version
|
||||||
show_notice
|
show_notice
|
||||||
download_rev
|
download_rev
|
||||||
|
|||||||
Reference in New Issue
Block a user