From patchwork Fri Nov 9 11:27:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 995457 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rY59uNnv"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="ZsZTdFhW"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rylK08Sjz9sCQ for ; Fri, 9 Nov 2018 22:35:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wzBUORlzoXd/hyrMuWEKBfHTU2/SR6/jdax/cmN+t1Q=; b=rY59uNnvhZq5lM 6+HBj7gIliS+BfSpL7Hve0ul14ZCB1ZU9IY9qUFzHvn0M1stZ6WYqR2ygLZ9bmIPPZkv+g6EkxoxT 62qinyjn8QaVotF7r1jBlvLzg0tlcXqvmhxSday399jUsOZUNT/l7BT8ANoAJPcge087PXyoiov9k HwalEgBgB/5dQ9NLJh89QpTwrZTnbQIJnSlUwFoZeyzFWdwr79AMNztMuYUT5FBY2QPYAMeMcmtTN p0CxhP1BSnxbbF4veFul+Vl2YVoCWR8paLm1oFhSyhMA4d+4nEdE1NeWi0Smo0qX+9Na3uf6kBuUP sLFYQn2tn1WumVFranVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gL54l-0001PV-Eg; Fri, 09 Nov 2018 11:35:47 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gL54j-0001PO-Gl for openwrt-devel@bombadil.infradead.org; Fri, 09 Nov 2018 11:35:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tUkTE4epMmQkJzyvrOin5qg/0PzeWzvjm2+VLsXg0II=; b=ZsZTdFhW6ECj8uzx+TUhDpIKtd oxNlQJehz6oQMAVUXjSeHmyAYfBE/rTMTcyxyi5BcFKJDAUW5mpv4gFZ376R7CgL8/8W2imf6QSI/ pWDLzisKGe0h2Mq5aZnIdrleCa6pSv9mMNgxnH0EJp+EhME8iwiAxcWahspe3ak7YMl3ttuFs3D/U LyllrRK8jig1h2kOnm3km6FFPyAvlALRj4GKApB10TespRJthWwcPuD8vPZzCGviASnQijqwDttCn M0/OknZOhhiMKAOrYJQNRFDVIP6yATsNE+kigP3AzTd93FIzZ4K0T/uumDQupoMaCRH+kq5leJXAR BeWNyi/A==; Received: from smtp-out.xnet.cz ([178.217.244.18]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gL54g-0004d3-BW for openwrt-devel@lists.openwrt.org; Fri, 09 Nov 2018 11:35:43 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id DE3514B6D; Fri, 9 Nov 2018 12:35:30 +0100 (CET) Received: from localhost.localdomain (localhost [127.0.0.1]) by meh.true.cz (OpenSMTPD) with ESMTP id ac2e2d63; Fri, 9 Nov 2018 12:35:28 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Fri, 9 Nov 2018 12:27:12 +0100 Message-Id: <1541762832-10250-1-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181109_113542_423720_1148AA71 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH] base-files: fwtool: Fix wrong checksum on combined-image with metadata X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= , =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Petr Štetiar If I create following image: define Device/engenius-m36 IMAGE/sysupgrade.bin := combined-image | append-metadata endef Sysupgrade then errors out: Invalid image. Contents do not match checksum (image:cd285595eaf297370404ae0e2815ec1a calculated:2cf9a2286fb6b01af3ea189128017d44) Image check 'platform_check_image' failed. By removing the metadata from the image I get combined-image checksum working again and sysupgrade works. Signed-off-by: Petr Štetiar --- package/base-files/files/lib/upgrade/fwtool.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh index 3f28fcc..e0e5c96 100644 --- a/package/base-files/files/lib/upgrade/fwtool.sh +++ b/package/base-files/files/lib/upgrade/fwtool.sh @@ -28,7 +28,7 @@ fwtool_check_image() { . /usr/share/libubox/jshn.sh - if ! fwtool -q -i /tmp/sysupgrade.meta "$1"; then + if ! fwtool -q -t -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"