From d74ace7328dbd426236139971a5063f4422f89d7 Mon Sep 17 00:00:00 2001 From: maxnet Date: Sat, 11 Mar 2017 14:59:56 +0100 Subject: [PATCH] Imply SKIP_KERNEL=1 when custom kernel file name is set (#235) Skip installation of kernel and .dtb files if the user has a custom kernel. Prevents users ending up with a bricked system that hangs on rainbow screen, because the 4.9.x .dtb files do not work with a 4.4.x custom kernel. Signed-off-by: Floris Bos --- rpi-update | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpi-update b/rpi-update index 3f2ecf5..7ec6c62 100755 --- a/rpi-update +++ b/rpi-update @@ -42,6 +42,10 @@ FW_REV=${1:-""} FW_REVFILE="${FW_PATH}/.firmware_revision" [ "${RPI_UPDATE_UNSUPPORTED}" -ne 0 ] && echo -e "You appear to be trying to update firmware on an incompatible distribution. To force update, run the following:\nsudo -E RPI_UPDATE_UNSUPPORTED=0 rpi-update" && exit 1 +if command -v vcgencmd > /dev/null; then + vcgencmd get_config str | grep -qE "^kernel=" && echo -e "You appear to be using a custom kernel file.\nSkipping installation of new kernel, as bundled dtb files may be incompatible with your kernel." && SKIP_KERNEL=1 +fi + function update_self() { echo " *** Performing self-update" _tempFileName="$0.tmp"