From nobody Mon May 6 17:58:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+89902+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+89902+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1652948523; cv=none; d=zohomail.com; s=zohoarc; b=Hnm1P4Ydb01q5oyTy12mmQezT9seJPwvgrPGycY286pL4UEzl4CaUH2hTMVEXJ+QFugZy4fNBLNNLZhDaHWEeBWQEg65aZzGWLpMwroWP91GulMRVdO4mCPpksapb5tTlLye+pYvnuOP6ZaueTLEHNil3Wac/zP4UaGcF0x6qlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652948523; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=BhG3CZiOgAMrioLdTeAGjcmeBJGacfGj5Jz6yzlvlmU=; b=NEwu3hiuRJ7xqrZ8HQeDJK0E1Y4u6BimzyDa9tIs3VOmZ0oLP9g28uHN7yEXwcpod674JHd3YgHep/oAAY6AFTmo0nBAAq7DxbFxCHTyrd6guMXc3YGTsCxEqrQN82FxQVl1szgUbW5R7PJwWvW1HTtbkavcX64C0OYSz9CGRb0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+89902+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1652948523399117.65458484579256; Thu, 19 May 2022 01:22:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id uPCAYY1788612x3OUGyBcVe4; Thu, 19 May 2022 01:22:03 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.5089.1652948520951221834 for ; Thu, 19 May 2022 01:22:01 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="271786542" X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="271786542" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 01:22:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="742794150" X-Received: from desktop-yang.ccr.corp.intel.com ([10.239.158.131]) by orsmga005.jf.intel.com with ESMTP; 19 May 2022 01:21:58 -0700 From: "Yang Jie" To: devel@edk2.groups.io Cc: bob.c.feng@intel.com, gaoliming@byosoft.com.cn, yuwei.chen@intel.com, "jie.yang" Subject: [edk2-devel] [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is not BFV issue Date: Thu, 19 May 2022 16:21:37 +0800 Message-Id: <20220519082137.2330-1-jie.yang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jie.yang@intel.com X-Gm-Message-State: noWpwGiKHeDFRbtH2t72nl7Kx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1652948523; bh=SNC4+URuphP2emIZsYXxTfU2P9JT3DM0MXOQj4o6FZQ=; h=Cc:Date:From:Reply-To:Subject:To; b=A8PD2Yj5CA4YJY3xpgpJ9Z03nODLAhJ7rkmSssSfy3K4u6gGg+xORbZBgEyt+1t64CY PCsYW52nGVMs+XukY8KOG7gy9Tq8ymyJtvHS03WLy8D21BCWzbUxAAQOpmgPlBhrzDD0C ibNKO8FmFj3PGJTeIoykloEKg5PDfNiiXds= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1652948524095100001 Content-Type: text/plain; charset="utf-8" FCE tool provides "-g" parameter to indicate which FV to insert binaries. Current code logic has some defects when this FV is not the last BFV, this patch is to fix this issue and enhance this tool. Signed-off-by: jie.yang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Reviewed-by: Bob Feng --- BaseTools/Source/C/BfmLib/BinFileManager.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/BfmLib/BinFileManager.c b/BaseTools/Source/= C/BfmLib/BinFileManager.c index 69521044b8..42953bfce5 100644 --- a/BaseTools/Source/C/BfmLib/BinFileManager.c +++ b/BaseTools/Source/C/BfmLib/BinFileManager.c @@ -2,7 +2,7 @@ =20 The main entry of BFM tool. =20 - Copyright (c) 2011-2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2011-2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -310,7 +310,10 @@ BfmImageAdd ( do { if ((FvGuidExisted && mFvGuidIsSet && FvInFd->IsInputFvFlag) || ((!FvG= uidExisted || (!mFvGuidIsSet)) && FvInFd->IsBfvFlag)) { =20 - if (FvInFd->IsBfvFlag) { + if (FvInFd->IsBfvFlag && !FvGuidExisted) { + // + // No target FV is set, find the last BFV to insert Binary + // FvInFdTmp =3D FdData->Fv; while (FvInFdTmp !=3D NULL) { if (FvInFdTmp->IsBfvFlag) { --=20 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#89902): https://edk2.groups.io/g/devel/message/89902 Mute This Topic: https://groups.io/mt/91204554/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-