From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1BC36C433EF for ; Sat, 22 Jan 2022 01:44:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15EA3839EB; Sat, 22 Jan 2022 02:44:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="O9DF0re0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 609D583A27; Sat, 22 Jan 2022 02:44:30 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0167C839EB for ; Sat, 22 Jan 2022 02:44:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 72777B82077; Sat, 22 Jan 2022 01:44:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F18E4C340E1; Sat, 22 Jan 2022 01:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642815866; bh=Xy6ZDZvbgCW1Y0V73pVJA3t0XhzMyCeGDAUcbMPsQ+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O9DF0re0MuTc+UDBKETZxWa00uz37zb23oIQBQobuJsVL1vgQEDxBk7WR5jObedmi x7YysmfBFQToMZd19ryfWrdfXeVNPNmkECvPN7L4h/PA4zKNdwukGHf9HEE++66WYy 4TnTswUWWHp+uNL0MTiz1oC5/1iMmGKnx0RU6DK8NinEQH6gJYZOehp55zIPlzVsex lurewDbEtVpZnZ9rkrNQhNCGoyCDzhzNansO7TqtMDtSJ1aki7VCSfn184ECd70n1j I9957BCbWTfnt4RIIWg/oM2F6ftP79CJhup4LFMwEA9c0hOSr7nLcQ/fKTwdLQ0Djg GI5BQlVx76zsA== Received: by pali.im (Postfix) id D75C1857; Sat, 22 Jan 2022 02:44:22 +0100 (CET) Date: Sat, 22 Jan 2022 02:44:22 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Simon Glass , Alexandru Gagniuc , Yann Dirson , Stefan Roese , Marek =?utf-8?B?QmVow7pu?= , u-boot@lists.denx.de Subject: Re: [PATCH v2] tools: mkimage: Call verify_header after writing image to disk Message-ID: <20220122014422.4hir3y4a6ipqic42@pali> References: <20220114173443.9877-1-pali@kernel.org> <20220121212133.GA2826984@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220121212133.GA2826984@bill-the-cat> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Friday 21 January 2022 16:21:33 Tom Rini wrote: > On Fri, Jan 14, 2022 at 06:34:43PM +0100, Pali Rohár wrote: > > > If image backend provides verify_header callback then call it after writing > > image to disk. This ensures that written image is correct. > > > > Signed-off-by: Pali Rohár > > Reviewed-by: Stefan Roese > > Reviewed-by: Simon Glass > > --- > > tools/mkimage.c | 41 +++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 41 insertions(+) > > This breaks a number of platforms such as ls1021atwr_sdcard_qspi and > it's not clear to me why exactly. Maybe they were already broken and this patch just detected it? Or verify_header callback for particular image type is reject valid image? Do you have some pointers to failed build logs?