Skip to content
Browse files

Revert "base-files: fwtool: Fix wrong checksum on combined-image with…

… metadata"

This reverts commit 41770ad.

The fwtool_check_image() procedure is used by `sysupgrade --test` which must
not alter the image under test in any way.

Currently, when the LuCI ui or any other sysupgrade wrapper first invokes
sysupgrade --test to verify the compatibility of the image and then calculates
the sha256sum over it, the resulting checksum will differ from the original
image since the test invocation will implicitely strip the metadata trailer.

To properly fix the underlying issue, the combined image checksumming code
must be modified to skip the metadata trailer.

Signed-off-by: Jo-Philipp Wich <>
  • Loading branch information...
jow- committed Dec 2, 2018
1 parent 78ca6a5 commit 9808bd279927bcd2d3a78d19a55229b93bbbcf05
Showing with 1 addition and 1 deletion.
  1. +1 −1 package/base-files/files/lib/upgrade/
@@ -28,7 +28,7 @@ fwtool_check_image() {

. /usr/share/libubox/

if ! fwtool -q -t -i /tmp/sysupgrade.meta "$1"; then
if ! fwtool -q -i /tmp/sysupgrade.meta "$1"; then
echo "Image metadata not found"
[ "$REQUIRE_IMAGE_METADATA" = 1 -a "$FORCE" != 1 ] && {
echo "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"

0 comments on commit 9808bd2

Please sign in to comment.
You can’t perform that action at this time.