public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: "Yang, Jie" <jie.yang@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <gaoliming@byosoft.com.cn>,
	"Chen, Christine" <yuwei.chen@intel.com>
Subject: Re: [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is not BFV issue
Date: Thu, 26 May 2022 01:56:43 +0000	[thread overview]
Message-ID: <PH7PR11MB5863DBA7C20BA1103BBBE439C9D99@PH7PR11MB5863.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220519082137.2330-1-jie.yang@intel.com>

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Yang, Jie <jie.yang@intel.com> 
Sent: Thursday, May 19, 2022 4:22 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Yang, Jie <jie.yang@intel.com>
Subject: [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is not BFV issue

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 <jie.yang@intel.com>

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 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 @@
   The main entry of BFM tool. - Copyright (c) 2011-2019, Intel Corporation. All rights reserved.<BR>+ Copyright (c) 2011-2022, Intel Corporation. All rights reserved.<BR>  SPDX-License-Identifier: BSD-2-Clause-Patent  **/@@ -310,7 +310,10 @@ BfmImageAdd (
   do {     if ((FvGuidExisted && mFvGuidIsSet && FvInFd->IsInputFvFlag) || ((!FvGuidExisted || (!mFvGuidIsSet)) && FvInFd->IsBfvFlag)) { -      if (FvInFd->IsBfvFlag) {+      if (FvInFd->IsBfvFlag && !FvGuidExisted) {+        //+        // No target FV is set, find the last BFV to insert Binary+        //         FvInFdTmp = FdData->Fv;         while (FvInFdTmp != NULL) {           if (FvInFdTmp->IsBfvFlag) {-- 
2.26.2.windows.1


      reply	other threads:[~2022-05-26  1:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  8:21 [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is not BFV issue Yang Jie
2022-05-26  1:56 ` Bob Feng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH7PR11MB5863DBA7C20BA1103BBBE439C9D99@PH7PR11MB5863.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox