[OpenWrt-Devel] Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"

Petr Štetiar ynezz at true.cz
Sun Dec 29 17:21:23 EST 2019


Petr Novák via openwrt-devel <openwrt-devel at lists.openwrt.org> [2019-12-29 11:49:36]:

Hi,

thanks for reporting it and sorry for the breakage.

> Reading partition table from bootdisk...
> Reading partition table from image...
> Saving config files...
> Commencing upgrade. Closing all shell sessions.
> {
> 	"error": {
> 		"message": "Firmware image couldn't be validated"
> 	}
> }
> Command failed: Unknown error

Although I dont own RPi4 (or anything else with Cortex-A72), I've just tried to
reproduce it on x86/64 QEMU as it should be poor man's "similar enough" target
(64-bit/little endian), but I've failed to reproduce it with following steps:

 1. I've copied target/linux/brcm2708/base-files/lib/upgrade/platform.sh to
    target/linux/x86/base-files/lib/upgrade/platform.sh in order to get same
    sysupgrade functionality of rpi-4 on x86/64
 2. build image and run it in QEMU
 3. inside QEMU I did following:

  ... snip ...
  OpenWrt SNAPSHOT, r11829+1-e3e939d8e624 (that +1 commit is my local CI staging tree build commit[1])
  ... snip ...

  root at OpenWrt:/# sysupgrade http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz
  Downloading 'http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz'
  Connecting to 176.9.48.73:80
  Writing to '/tmp/sysupgrade.img'
  /tmp/sysupgrade.img  100% |*******************************| 12067k  0:00:00 ETA
  Download completed (12357027 bytes)
  Device qemu-standard-pc-i440fx-piix-1996 not supported by this image
  Supported devices: raspberrypi,4-model-b
  Reading partition table from bootdisk...
  zcat: write error: Broken pipe
  zcat: write: Broken pipe
  Reading partition table from image...
  Partition layout has changed. Full image will be written.
  Image check failed.

  root at OpenWrt:/# cat /tmp/sysupgrade.meta 
  {  "metadata_version": "1.0", "supported_devices":["raspberrypi,4-model-b"], "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r11829-e3e939d8e6", "target": "brcm2708/bcm2711", "board": "rpi-4" } }

  root at OpenWrt:/# sha256sum /tmp/sysupgrade.img
  5f809879b0d9a0791cd9329997c944a1048cd6b5f0cf59aa5fc34b5381fefb1c  /tmp/sysupgrade.img

  root at OpenWrt:/# echo raspberrypi,4-model-b > /tmp/sysinfo/board_name 
 
  root at OpenWrt:/# sysupgrade /tmp/sysupgrade.img
  Reading partition table from bootdisk...
  zcat: write error: Broken pipe
  zcat: write: Broken pipe
  Reading partition table from image...
  Partition layout has changed. Full image will be written.
  Saving config files...
  Commencing upgrade. Closing all shell sessions.
  Failed to parse JSON: 4
  killall: telnetd: no process killed
  Sending TERM to remaining processes ... ubusd askfirst urngd logd netifd odhcpd ntpd dnsmasq 
  Sending KILL to remaining processes ...
  ... snip ...

  (BTW I've fix[2] for that "harmless" `Failed to parse JSON: 4` error message in my procd repo.)

So perhaps this is something Cortex-A72 related?

1. https://gitlab.com/ynezz/openwrt/commit/f0c4d73a9c36a54a36af019bd3b3e5aeb1bffcf4
2. https://gitlab.com/ynezz/openwrt-procd/commit/ff03f3ed9b6af8b209dae63f24790664c94bd916

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list