From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id BB3A2AC1B9A for ; Fri, 27 Oct 2023 23:17:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=N2hgtEznKy44M+/VLoDR6WV6xTXgO//al1U+db+MHlo=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698448655; v=1; b=Roo3KqAQoLa8HtI2fHRfZZMgFD/jnX5KdNhZhuEB3UtRoFA+/gFOfbJ04eG0Nw2Ghelei3kB 2dp0NEvF25Kym/p++CmJ9cYrKUkC3WcfosOFgUQb7KyiwoJizec7++p60vjVHHq3L3RZ6qebwUS hGl08gLWBC4I46zqHRW8daQA= X-Received: by 127.0.0.2 with SMTP id EpCzYY7687511xqlPOyWQQnu; Fri, 27 Oct 2023 16:17:35 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.31655.1698448654813535103 for ; Fri, 27 Oct 2023 16:17:34 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="386751588" X-IronPort-AV: E=Sophos;i="6.03,257,1694761200"; d="scan'208";a="386751588" X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 16:17:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="753258626" X-IronPort-AV: E=Sophos;i="6.03,257,1694761200"; d="scan'208";a="753258626" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Oct 2023 16:17:18 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 27 Oct 2023 16:17:17 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 27 Oct 2023 16:17:17 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 27 Oct 2023 16:17:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNd+Z1CCB69+voOvzEc3dM2enPtm+gtyP5kWBn0I5oBlEm22EeWrvlfRMIFDHQcZOFchN/445joQ7BqM6zT6PaYEkE+szr+31OXLlPrZFCixziQ/QDjMv5TEuLilo3SeLkCVnYt9SVS0888GuNc4S+3aPhO2fzBtJ81a+/OTXoDlUndYnLsw9jQlG8xHBlOkG1zVq83gwP32AeJz1+BFL3rd2MaspL3mywMT1LcQGMiJgNvTUM4kuy+kEM1qLbJTlwy5qWN3O5wLX1nbGvktPX9rL3/deG5409pou5tVm9dhSYThDMjVVEr79ftW802+ikK28/1S1vKWo8DJut61LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3tfEK17lscPCof+5GnnwGQGUY5Gs0XaBwLPxBXpHGsI=; b=cils1yHVLZrUMrbeeyEOJQEzKfYpTpFW/Lx1NMsECAiTCyZqEIJ5kwXRyYoAvXcZwmVLZkLkwuec5wjjUZ1gi5Xo7Z79XparAFCsgZde/TRgO8Yz+kOzwwSpY7h7JvJ3cBaobtS1AFVTgQblCArQo9Bzoqug6CBJhkx/ce4DDU/VktLT3atr01XhZ8otFzyQ1AYacAqmLsdVRg05Qw8KEmxMuMrFpGxP4apT6empdN5NBb37+wYb8x33LCDiGQi1r1/Je/kIdVMRLKZZl6iS3uQ+MYatOuxsQY7UJAOJAvjzZluBEF5YDjahq6mZfhNOgOSV2m7NaquDAQJvJE+V9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from BL1PR11MB5478.namprd11.prod.outlook.com (2603:10b6:208:31d::12) by MW4PR11MB7149.namprd11.prod.outlook.com (2603:10b6:303:221::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Fri, 27 Oct 2023 23:17:15 +0000 X-Received: from BL1PR11MB5478.namprd11.prod.outlook.com ([fe80::2ee8:c1a9:3605:ee7a]) by BL1PR11MB5478.namprd11.prod.outlook.com ([fe80::2ee8:c1a9:3605:ee7a%4]) with mapi id 15.20.6933.022; Fri, 27 Oct 2023 23:17:15 +0000 From: "Guo, Gua" To: "Wang, BruceX" , "devel@edk2.groups.io" CC: "Dong, Guo" , "Rhodes, Sean" , "Lu, James" Subject: Re: [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function. Thread-Topic: [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function. Thread-Index: AQHaCSseKwahAFa/8UWswOyC+C70C7BeRPDw Date: Fri, 27 Oct 2023 23:17:15 +0000 Message-ID: References: <20231027231235.2043-1-brucex.wang@intel.com> <20231027231235.2043-2-brucex.wang@intel.com> In-Reply-To: <20231027231235.2043-2-brucex.wang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BL1PR11MB5478:EE_|MW4PR11MB7149:EE_ x-ms-office365-filtering-correlation-id: 653abe61-b367-40a4-1d34-08dbd742db52 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: KpiusMNZ1wEI6rrFyGsAGoXmyAet1Kzi59OW1X1nVcPZFoDwSJ+fvPCFPa+WFEvOQIxHsv/ejhjhukanNjgDrYh/XuKChi6Njbsp19e2hI4NYNAAISNFhdczlkRK+tg7guYj49+OXQR5YSbxg8QQQzaKLR3UnUiak9o/5umNECy8wZU1hPolhG33xrUFNeoyTd4TxYHNP1KTPGDdyWRqU3lzzW8ONnDw20T+03FG2/n0eYlHOJQZRpdGOYMU4DB51PLbW71M/KK0XAOmvISMSgnJvgcHw+pVREHlNmyRiM/j1M+sFGXj4s+KgmqM6VdgYxs+feiR5xgBE9ZSiZ95yoew3rFNpvitUGMYkU6wiGbuVdToJ/rqKmvUWvLBXaasSz8bI+GRhM8zhLqBIv2kzo820YWdScFhSMgSwlFnb6V3iH2cZOdQywO+m+QaVPNeSacvG1iwZPf9knjND3y5/xI2RpunkzNLga3GqRMCuZI74CdpGPlHr1E7MaHkIEWsQdzUPtL8/BEPRM5mwh7+Tic2el5n6ytBA6CLc1GMXoinX9hi47zhJMaFyZvWVe07bpdXpPpCJpos/mDOrU+q/SLQVSSHcmS4J7zz+rXuhynUQ6w3JCD3SdAliinVz/be x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?E/WT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ip5U19SZitD7E4vGCdf/Z5dKc?= =?us-ascii?Q?EM1GdT/DJUrINJB0ELOxddTK3QMh5AevucYcUuwiJEcYHJ2AJbiFtt3psXUc?= =?us-ascii?Q?OUWqNcLCX6XMgVe6vI7QQxiBFJSuanOXqsNRtxE/nuu+QSPtJXD/PLIQkBIY?= =?us-ascii?Q?k4PEhQ5FSAEfJRp9ztlITwm+wc/oYad2Mr+Tdn/htwwUX1CgMRUZ+ygh+0ME?= =?us-ascii?Q?8zdfmwluaqB7R1xx8VGIfy46OqyldCLwNCjWWMGEtuHwMC/ht83AuMXLkMDp?= =?us-ascii?Q?JS1SEv3JxVuQiZQ+A0wHm3U8Y4363aYufM77OVUtnZflKW9HfKbfHSGpzPmn?= =?us-ascii?Q?3XpPlJ87Ovz1iZXNVS61g30UvOrCXRWzEZfFkdyllWx+6m+y5ajjxWrwntbp?= =?us-ascii?Q?gbCnVOBD1zd3YSkORRN+weE8M0mfUfhtXusN7bdmJk17JFElUoeEmf7IG4z7?= =?us-ascii?Q?L7Wh5qOUB/PUFDj+UtwLzSMbVhI7T5U4rPPBrPCnljoIIbmuGh2Omt6dRRpN?= =?us-ascii?Q?vB+RDp5p0gGw3AhYrmscBlEvEauY7JF+SGrbYuzfM9PCU0pWOS/0+9iU0MnT?= =?us-ascii?Q?t/bKpLU9eY1AJct/yrcB03KcO8wMmI43v+k+pqePPrZWF4gm1JRqxMEt4JEY?= =?us-ascii?Q?BbIoVdDMcRumB7TxFliSPgOxKKw0Sb4BSEMkfz5ViLVLlbodJKIddIcrnXwa?= =?us-ascii?Q?SLHtepkPxnad9IwTHdCrCXPGiTlGY5WdLXXhvumQ?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5478.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 653abe61-b367-40a4-1d34-08dbd742db52 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2023 23:17:15.0359 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2AiEENpV6i/gigkDZ3HAPXoaA1tnE1oPp/kRgt0277rmcXnuJ6BMin/OUsCWE3KelxHJnYNDzEB5xpoPnGCGhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB7149 X-OriginatorOrg: intel.com Precedence: Bulk 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,gua.guo@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: D8YY2bgBL2p0xNIw2qO0XCoBx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Roo3KqAQ; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Gua Guo -----Original Message----- From: Wang, BruceX =20 Sent: Saturday, October 28, 2023 7:13 AM To: devel@edk2.groups.io Cc: Wang, BruceX ; Dong, Guo ; R= hodes, Sean ; Lu, James ; Guo, G= ua Subject: [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function. From: BruceX Wang 1. Add firmware volume need to check firmware volume exist or not. 2. Remove clang version check dependency. Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: BruceX Wang --- UefiPayloadPkg/Tools/MkFitImage.py | 7 ++++++- UefiPayloadPkg/UniversalPayloadBuild.py | 10 ---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/UefiPayloadPkg/Tools/MkFitImage.py b/UefiPayloadPkg/Tools/MkFi= tImage.py index 82ab933d6d..41a259960b 100644 --- a/UefiPayloadPkg/Tools/MkFitImage.py +++ b/UefiPayloadPkg/Tools/MkFitImage.py @@ -10,6 +10,7 @@ from os.path import exists import libfdt from ctypes import * import time +import os =20 class FIT_IMAGE_INFO_HEADER: """Class for user setting data to use MakeFitImage() @@ -139,6 +140,8 @@ def BuildFitImage(Fdt, InfoHeader): ImageNode =3D libfdt.fdt_add_subnode(Fdt, 0, 'images') for Item in reversed (MultiImage): Name, Path, BuildFvNode, Description, BinaryData, DataOffset =3D I= tem + if os.path.exists (Item[1]) =3D=3D False: + continue FvNode =3D libfdt.fdt_add_subnode(Fdt, ImageNode, Name) BuildFvNode (Fdt, InfoHeader, FvNode, DataOffset, len(BinaryData),= Description) =20 @@ -149,7 +152,9 @@ def BuildFitImage(Fdt, InfoHeader): DtbFile.truncate() DtbFile.write(Fdt) for Item in MultiImage: - _, _, _, _, BinaryData, _ =3D Item + _, FilePath, _, _, BinaryData, _ =3D Item + if os.path.exists (Item[1]) =3D=3D False: + continue DtbFile.write(BinaryData) DtbFile.close() =20 diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/Unive= rsalPayloadBuild.py index 6f57fa6df6..046c62e21c 100644 --- a/UefiPayloadPkg/UniversalPayloadBuild.py +++ b/UefiPayloadPkg/UniversalPayloadBuild.py @@ -146,16 +146,6 @@ def BuildUniversalPayload(Args): ModuleReportPath =3D os.path.join(BuildDir, "UefiUniversalPayloadEntry= .txt") UpldInfoFile =3D os.path.join(BuildDir, "UniversalPayloadInfo.bin") =20 - if "CLANG_BIN" in os.environ: - LlvmObjcopyPath =3D os.path.join(os.environ["CLANG_BIN"], "llvm-ob= jcopy") - else: - LlvmObjcopyPath =3D "llvm-objcopy" - try: - RunCommand('"%s" --version'%LlvmObjcopyPath) - except: - print("- Failed - Please check if LLVM is installed or if CLANG_BI= N is set correctly") - sys.exit(1) - Pcds =3D "" if (Args.pcd !=3D None): for PcdItem in Args.pcd: --=20 2.39.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 (#110233): https://edk2.groups.io/g/devel/message/110233 Mute This Topic: https://groups.io/mt/102232380/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-