From patchwork Sat Aug 24 13:22:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1152631 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OETvLgLw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46FzqY6S6Qz9s7T for ; Sat, 24 Aug 2019 23:38:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 35F52C21EA7; Sat, 24 Aug 2019 13:29:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 71222C21E35; Sat, 24 Aug 2019 13:27:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 00787C21D56; Sat, 24 Aug 2019 13:27:30 +0000 (UTC) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by lists.denx.de (Postfix) with ESMTPS id 71633C21C6A for ; Sat, 24 Aug 2019 13:27:26 +0000 (UTC) Received: by mail-io1-f43.google.com with SMTP id q22so26699966iog.4 for ; Sat, 24 Aug 2019 06:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1JTb4GG8AoPpTXc2orSGlK2B4Dc4vSqnvt29fVCcdf8=; b=OETvLgLwOOaI0w3SslmABKQ+u2ggBZAuLMPg8Hxw4Dzqs0BenV2FF2KrdL4aeZQ2PV V0iMMvYugCCrZ2urq3w54FA9Biwnio+mKBjCE/sDPVK4W5P8IPNW1gkFE+UtxPCVhMEh hac+ltHcVcJMZXK4BbXgqRzX6KFx2DCfD4x8o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1JTb4GG8AoPpTXc2orSGlK2B4Dc4vSqnvt29fVCcdf8=; b=EIPHE4e3/0q0//ZGWg+ZIqPFng09vJ38NvazP4165fGSl43RXMB0gN57UbAnoAs5Dk DSU2k2GEP51hQMTUR50IVNbymvodbdicDUbOwcnZqkEif8f1dmLVAZ8iENtcINE3V1Sr +xzpsBHFeau8b2uzKAYFwdBRp7AIwo0uLOyCXb0zt//4YKZCK9oIsY8B/Cx/Oo/RfULE NSxKaF3wpzPeFRSfhc7Nff42mAwLJDnCZrTpVAaNwI0/pqGs3aILkuDxbQK9tDcTEwoh O7smXQqGpAitBvL+ewsm8Y61082zn2viFGbnVDiD3uxv9ESFS6lqiZIah6BesCoKaUL8 Uu5w== X-Gm-Message-State: APjAAAUxQC3SePuoES2G35oAbjCOn66JwLIbAzQ036w4tfEL8qyzTKY6 ex9C8KMK9TZ7XHxjMqh2hHpjcl3yK64= X-Google-Smtp-Source: APXvYqzbxrJW6Wzj2KRSZATbHcbBWeSHhWnjYQZPonmieL6+68uZJ7mgs15CNj46r2ErQ0ZRFDW7Sg== X-Received: by 2002:a05:6602:2492:: with SMTP id g18mr13777593ioe.266.1566653245272; Sat, 24 Aug 2019 06:27:25 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id l2sm8881790ioq.83.2019.08.24.06.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2019 06:27:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 24 Aug 2019 07:22:51 -0600 Message-Id: <20190824132315.53130-12-sjg@chromium.org> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog In-Reply-To: <20190824132315.53130-1-sjg@chromium.org> References: <20190824132315.53130-1-sjg@chromium.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 11/34] binman: Fix IFWI output when using an Intel FIT image X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" At present this entry does not work correctly when a FIT image is used as the input. It updates the FIT instead of the output image. The test passed because the FIT image happened to have the right data already. Fix it. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/binman/etype/intel_ifwi.py | 6 +++--- tools/binman/ftest.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/binman/etype/intel_ifwi.py b/tools/binman/etype/intel_ifwi.py index f3745f7a8c..e4da3e498a 100644 --- a/tools/binman/etype/intel_ifwi.py +++ b/tools/binman/etype/intel_ifwi.py @@ -75,10 +75,10 @@ class Entry_intel_ifwi(Entry_blob): self._pathname = outname else: # Provide a different code path here to ensure we have test coverage - inname = self._pathname + outname = self._pathname # Delete OBBP if it is there, then add the required new items. - tools.RunIfwiTool(inname, tools.CMD_DELETE, subpart='OBBP') + tools.RunIfwiTool(outname, tools.CMD_DELETE, subpart='OBBP') for entry in self._ifwi_entries.values(): # First get the input data and put it in a file @@ -89,7 +89,7 @@ class Entry_intel_ifwi(Entry_blob): input_fname = tools.GetOutputFilename('input.%s' % uniq) tools.WriteFile(input_fname, data) - tools.RunIfwiTool(inname, + tools.RunIfwiTool(outname, tools.CMD_REPLACE if entry._ifwi_replace else tools.CMD_ADD, input_fname, entry._ifwi_subpart, entry._ifwi_entry_name) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 080599fee3..bba07e7275 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -2044,7 +2044,7 @@ class TestFunctional(unittest.TestCase): subpart='IBBP', entry_name='IBBL') tpl_data = tools.ReadFile(tpl_fname) - self.assertEqual(tpl_data[:len(U_BOOT_TPL_DATA)], U_BOOT_TPL_DATA) + self.assertEqual(U_BOOT_TPL_DATA, tpl_data[:len(U_BOOT_TPL_DATA)]) def testPackX86RomIfwi(self): """Test that an x86 ROM with Integrated Firmware Image can be created"""