rpi-update icon indicating copy to clipboard operation
rpi-update copied to clipboard

rpi-update rpi-6.5.y breaks with FW_REV: *** Invalid hash given

Open by opened this issue 1 year ago • 7 comments

Since the most recent commit, rpi-update rpi-6.5.y (for example) breaks with the error message FW_REV: *** Invalid hash given

Thank you for looking into this!

by avatar Oct 10 '23 20:10 by

https://api.github.com/repos/raspberrypi/linux/actions/artifacts (used by rpi-update) defaults to only returning the most recent 30 entries.

https://api.github.com/repos/raspberrypi/linux/actions/artifacts?per_page=100 returns the 100 most recent, but actually rpi-6.5.y has fallen off that at the moment.

You can iterate over the pages with https://api.github.com/repos/raspberrypi/linux/actions/artifacts?per_page=100&page=1 (incrementing page), but that may be trickier to integrate into the script.

I've kicked off the CI build again to bring it back to the top of the list.

6by9 avatar Oct 12 '23 16:10 6by9

Seems still unsolved for Pi5 Used a fresh Bookwork uSD, ran 'sudo rpi-update' which completed without error, reboot, checked the kernel - still shows the original 6.1.54 Retried rpi-update -> shows I'm on the most recent version, forced an update, reboot -> same situation as before

pi@Pi5-book:~ $ uname -a Linux Pi5-book 6.1.0-rpi4-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux pi@Pi5-book:~ $ sudo rpi-update rpi-6.5.y *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom FW_REV: *** Your firmware is already up to date (delete /boot/firmware/.firmware_revision to force an update anyway) pi@Pi5-book:~ $ sudo rm /boot/firmware/.firmware_revision pi@Pi5-book:~ $ sudo rpi-update rpi-6.5.y *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom FW_REV: *** We're running for the first time *** Backing up files (this will take a few minutes) *** Remove old firmware backup *** Backing up firmware *** Remove old modules backup *** Backing up modules 6.1.0-rpi4-rpi-2712 WANT_32BIT:0 WANT_64BIT:1 WANT_PI4:1 WANT_PI5:1 *** Downloading specific artifact revision (this will take a few minutes) curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcmrpi | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 24.0M 0 24.0M 0 0 2040k 0 --:--:-- 0:00:12 --:--:-- 2550k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2709 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 24.7M 0 24.7M 0 0 2054k 0 --:--:-- 0:00:12 --:--:-- 2554k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2711 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 25.3M 0 25.3M 0 0 2065k 0 --:--:-- 0:00:12 --:--:-- 2642k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2711_arm64 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 26.8M 0 26.8M 0 0 1967k 0 --:--:-- 0:00:13 --:--:-- 2412k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2712 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 26.9M 0 26.9M 0 0 2107k 0 --:--:-- 0:00:13 --:--:-- 2499k *** Updating kernel modules *** depmod 6.5.7-v8+ *** depmod 6.5.7-v8_16k+ *** As requested, not updating VideoCore libraries *** As requested, not updating SDK *** Running ldconfig *** Storing current firmware revision *** Deleting downloaded files *** Syncing changes to disk *** If no errors appeared, your firmware was successfully updated to 435d59f6faabd23b3e624af304205116107b32a8 *** A reboot is needed to activate the new firmware pi@Pi5-book:~ $ uname -a Linux Pi5-book 6.1.0-rpi4-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux

Note that no FW hash apt is given for CM4/Pi5 DUT when trying to update to 6.5 FW_REV: On a CM4 DUT where 'sudo rpi-update' is used it shows here i.e. FW_REV:12833d1bee03c4ac58dc4addf411944a189f1dfd

Updating a CM4 is working fine though

pi@CM4-1-book:~ $ uname -a Linux CM4-1-book 6.5.7-v8+ #1 SMP PREEMPT Thu Oct 12 16:52:39 UTC 2023 aarch64 GNU/Linux

aBUGSworstnightmare-rpi avatar Oct 13 '23 04:10 aBUGSworstnightmare-rpi

That all looks fine. The FW_REV output is reporting the contents of .firmware_revision. Deleting the file makes rpi-update think it is being run for the first time, so it installs the version asked for. Once it's finished the installation it tells you to reboot to activate the new firmware (it means the kernel as well), then your output confirms that you haven't rebooted yet.

pelwell avatar Oct 13 '23 08:10 pelwell

Hi Phil, yes, WORKING on CM4 NON-WORKING on Pi5

This is a Pi5 DUT (pls note Pi5-book hostname)

pi@Pi5-book:~ $ sudo rpi-update rpi-6.5.y *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom FW_REV: WANT_32BIT:0 WANT_64BIT:1 WANT_PI4:1 WANT_PI5:1 *** Downloading specific artifact revision (this will take a few minutes) curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcmrpi | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 24.0M 0 24.0M 0 0 2767k 0 --:--:-- 0:00:08 --:--:-- 3913k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2709 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 24.7M 0 24.7M 0 0 2833k 0 --:--:-- 0:00:08 --:--:-- 4093k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2711 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 25.3M 0 25.3M 0 0 3168k 0 --:--:-- 0:00:08 --:--:-- 4456k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2711_arm64 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 26.8M 0 26.8M 0 0 2875k 0 --:--:-- 0:00:09 --:--:-- 3940k curl -L https://builds.raspberrypi.com/github/linux/435d59f6faabd23b3e624af304205116107b32a8/bcm2712 | zcat | tar xf - -C //root/.rpi-firmware --strip-components=2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 26.9M 0 26.9M 0 0 3104k 0 --:--:-- 0:00:08 --:--:-- 4016k *** Updating kernel modules *** depmod 6.5.7-v8+ *** depmod 6.5.7-v8_16k+ *** As requested, not updating VideoCore libraries *** As requested, not updating SDK *** Running ldconfig *** Storing current firmware revision *** Deleting downloaded files *** Syncing changes to disk *** If no errors appeared, your firmware was successfully updated to 435d59f6faabd23b3e624af304205116107b32a8 *** A reboot is needed to activate the new firmware pi@Pi5-book:~ $ uname -a Linux Pi5-book 6.1.57-v8_16k+ #1688 SMP PREEMPT Thu Oct 12 15:17:08 BST 2023 aarch64 GNU/Linux

Now rebooting, and after the reboot Pi5 is still on 6.1.57

pi@Pi5-book:~ $ uname -a Linux Pi5-book 6.1.57-v8_16k+ #1688 SMP PREEMPT Thu Oct 12 15:17:08 BST 2023 aarch64 GNU/Linux

Not looking good to me. As said, CM4 (tested on 2 different devices) were fine.

aBUGSworstnightmare-rpi avatar Oct 13 '23 09:10 aBUGSworstnightmare-rpi

Oh. The super-easy addition of the bcm2712 auto-build got the wrong kernel name (my bad) - kernel2712.img is not the same as kernel_2712.img.

Try now.

pelwell avatar Oct 13 '23 10:10 pelwell

My Pi5 was busy as I've tried to compile/install a kernel from source -> failed again

.. INSTALL /lib/modules/6.5.7-v8_16k+/kernel/net/vmw_vsock/vmw_vsock_virtio_transport_common.ko XZ /lib/modules/6.5.7-v8_16k+/kernel/net/vmw_vsock/vmw_vsock_virtio_transport_common.ko.xz INSTALL /lib/modules/6.5.7-v8_16k+/kernel/net/vmw_vsock/vsock_loopback.ko XZ /lib/modules/6.5.7-v8_16k+/kernel/net/vmw_vsock/vsock_loopback.ko.xz INSTALL /lib/modules/6.5.7-v8_16k+/kernel/net/nsh/nsh.ko XZ /lib/modules/6.5.7-v8_16k+/kernel/net/nsh/nsh.ko.xz DEPMOD /lib/modules/6.5.7-v8_16k+ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/dts/broadcom/.dtb /boot/ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/dts/overlays/.dtb* /boot/overlays/ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/Image /boot/$KERNEL.img pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/dts/broadcom/.dtb /boot/firmware/ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/dts/overlays/.dtb* /boot/firmware/overlays/ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/ pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/Image.gz /boot/firmware/$KERNEL.img cp: cannot stat 'arch/arm64/boot/Image.gz': No such file or director pi@Pi5-book:~/linux $ sudo cp arch/arm64/boot/Image /boot/firmware/$KERNEL.img pi@Pi5-book:~/linux $

But after the reboot still pi@Pi5-book:~ $ uname -a Linux Pi5-book 6.1.57-v8_16k+ #1688 SMP PREEMPT Thu Oct 12 15:17:08 BST 2023 aarch64 GNU/Linux

Running sudo rpi-update rpi-6.5.y again

brought me finally to

pi@Pi5-book:~ $ uname -a Linux Pi5-book 6.5.7-v8_16k+ #1 SMP PREEMPT Thu Oct 12 16:52:15 UTC 2023 aarch64 GNU/Linux

Still unclear to me why I'm unable to install a custom kernel (to 6.5.7) when on 6.1.57

aBUGSworstnightmare-rpi avatar Oct 13 '23 10:10 aBUGSworstnightmare-rpi

Still unclear to me why I'm unable to install a custom kernel (to 6.5.7) when on 6.1.57

Unrelated to this issue. Please don't go off topic.

6by9 avatar Oct 13 '23 11:10 6by9