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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EE79C433FE for ; Thu, 4 Nov 2021 19:31:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 42B1E61212 for ; Thu, 4 Nov 2021 19:31:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 42B1E61212 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B0A2A836AB; Thu, 4 Nov 2021 20:31:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="pWQNYeuc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0B9F836AB; Thu, 4 Nov 2021 20:31:50 +0100 (CET) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 74CB5836A0 for ; Thu, 4 Nov 2021 20:31:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heiko.thiery@gmail.com Received: by mail-lf1-x129.google.com with SMTP id d12so10581414lfv.6 for ; Thu, 04 Nov 2021 12:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VS0giH5jIbCb5lrsCv65Ozuqs4Szl+OhAa6bwkYpQ5c=; b=pWQNYeucSo8+FqnW7b87VTDKp/FOmzPU/s+T+Wx/zOfDMduhjaLeJvipBEY16RFi8p D7pvqGhUNAa2FurAKgn9JB2ChjaL5qGa1DNWFMWV5dyIELiubJBdwv8Kn9Y76gbwuY2l +mTpXzydRprww3CmpEZyv3Ef3Qb2JtYMyyS9nxoVKPW5gtjD32cHos1m+pRFLObKPU9t 6Rc7z+1FTeN3RV79no+s+oVo32neXWGRGugcdjD3znHr278aQ4POIbfIRRzd0VN9r15w Vr32EnaCjF5PXtRy7vG89P5QulwS+j9LxkvUaxBIc0YupqHaTOKTZgoRNWE5WkJL4T7K 3Njg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VS0giH5jIbCb5lrsCv65Ozuqs4Szl+OhAa6bwkYpQ5c=; b=IK+4thQxDV7tsjuu3Cd9KmysQVcxP03N44TDxook18mS4TVNYSz6GWWKMVPjmRFa5b /HbT9kR+GRZPbCJin+HbNB8QD2oxswmR6A3MJTnWfcG1xT0bEOD15AqbIDdNKQvqsUbp YI9eEmpAf3Olm6QiLY9fgJx8eNXNErrGk+hOA4CDEzlMlNwbSoeHu38cnqW33SjkCJ3h gdl9T7DGHENPSVcQfpBxs72NNjPgdazhpUJIZlORrlmkY4EWNJED/D0hq4vubW/vitoZ wbGcl5nHoW6Ij4725myU17wxa9lWrw3AdTnQEQUkRzj3xe+Ls/jxEo/8sZ5yn21T4dt8 BvKA== X-Gm-Message-State: AOAM533Mtr+lMzrAnpKUAklJtcgnp5me1hnCi4aDO4qpId/QvadUPwGj zzyAuCQ1HmQJYQK077Wp+o8Kh3R9j/6BlsjlU4k= X-Google-Smtp-Source: ABdhPJyfvYGR1F7L+FII/dFi+7nhWO99WsO33MUiuqtngsYqZUGo3qAOcKlt2wtLn0iFQG6/19+GfxM1Zm7hx00F8hk= X-Received: by 2002:a05:6512:e9e:: with SMTP id bi30mr22117674lfb.14.1636054306704; Thu, 04 Nov 2021 12:31:46 -0700 (PDT) MIME-Version: 1.0 References: <20211104185231.2927-1-heiko.thiery@gmail.com> <729199.1636053161@gemini.denx.de> In-Reply-To: <729199.1636053161@gemini.denx.de> From: Heiko Thiery Date: Thu, 4 Nov 2021 20:31:34 +0100 Message-ID: Subject: Re: [RFC 0/2] Do not stop with an error when mkimage fails To: Wolfgang Denk Cc: u-boot@lists.denx.de, Stefano Babic , Fabio Estevam , Michael Walle , Simon Glass Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Wolfgang, Am Do., 4. Nov. 2021 um 20:12 Uhr schrieb Wolfgang Denk : > > Dear Heiko, > > In message <20211104185231.2927-1-heiko.thiery@gmail.com> you wrote: > > While converting to binman for an imx8mq board, it has been found that > > building in the u-boot CI fails. This is because an imx8mq requires an > > external binary (signed_hdmi_imx8m.bin). If this file cannot be found > > mkimage fails. To work around the problem the exception is caught, an > > error message is printed and binman continues. > > But how can you continue, when mkimage fails and cannot generate the > needed image? > > In your patch 2/2 we have this: > > + tools.Run('mkimage', '-d', input_fname, *self._args, output_fname) > + except Exception as e: > + tout.Error("mkimage failed: %s" % e) > + > self.SetContents(tools.ReadFile(output_fname)) > > mkimage is supposed to create an output file which name is in > output_fname; if mkimage fails and you continue, the next step is > tools.ReadFile(output_fname) trying to read that file. How is this > possible? # ls -al mkimage* -rw-r--r-- 1 hthiery hthiery 0 Nov 4 20:28 mkimage-out.spl.mkimage -rw-r--r-- 1 hthiery hthiery 180392 Nov 4 20:28 mkimage.spl.mkimage The file (mkimage-out.spl.mkimage) with size 0 seems to be created. I assume mkimage will create that. > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de > "One day," said a dull voice from down below, "I'm going to be back > in form again and you're going to be very sorry you said that. For a > very long time. I might even go so far as to make even more Time just > for you to be sorry in." - Terry Pratchett, _Small Gods_