From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.9895.1648575690296802413 for ; Tue, 29 Mar 2022 10:41:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=eDoBDZ81; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: guo.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648575690; x=1680111690; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=z7x57r8K9EwnnVNYd3ifu0eupjKyJb1GadSq1znXoJg=; b=eDoBDZ81YuuJDWdIXo2NC2+NuRrswjvOJZbCIfGLJH6vVtPgiqIqiD3H Il9Q8nKXUGOXU0/lN/9MVLq0WoI6ld0o3u9cmtX69yOMZxv7aKE/bJ0X+ 3NqQenWyBXhS68lNrZOmE8nkFqwf+dTg6vrIUElhk+jW6cEKTyAjLvWz5 GlUCYR+jj0Q5l+eOhDnaegA/cVKMkhukKc13SU5IpHsmOvNTTABvF5A3S YwSOteSq7YFJ86bb1FIW6JM0vimnINBVvUWDkX8dCjSvT5iTyIZ2FNitm T0/w7pZpngFEQyVQWgpBdqXwbSkFnFwlwYFJO6SvWtOGnXtCFEynxeN9H g==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="258149663" X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="258149663" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 10:41:29 -0700 X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="564811381" Received: from gdong1-mobl1.amr.corp.intel.com ([10.212.6.251]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 10:41:28 -0700 From: "Guo Dong" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Benjamin You , Sean Rhodes Subject: [edk2-devel][PATCH] UefiPayloadPkg: Support IA32 Build Date: Tue, 29 Mar 2022 10:41:12 -0700 Message-Id: <20220329174112.885-1-guo.dong@intel.com> X-Mailer: git-send-email 2.35.1.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Guo Dong The payload entry module should support to build as IA32 image beside X64 image so that it could work with 32bit bootloaders. This patch adds a option build parameter for arch selection. Cc: Ray Ni Cc: Benjamin You Cc: Sean Rhodes Signed-off-by: Guo Dong --- UefiPayloadPkg/UniversalPayloadBuild.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/Unive= rsalPayloadBuild.py index e624ec5874..ac965766c7 100644 --- a/UefiPayloadPkg/UniversalPayloadBuild.py +++ b/UefiPayloadPkg/UniversalPayloadBuild.py @@ -53,6 +53,7 @@ def RunCommand(cmd): def BuildUniversalPayload(Args, MacroList):=0D BuildTarget =3D Args.Target=0D ToolChain =3D Args.ToolChain=0D + BuildArch =3D "X64" if Args.Arch =3D=3D 'X64' else "IA32 -a X64"=0D ElfToolChain =3D 'CLANGDWARF'=0D =0D EntryModuleInf =3D os.path.normpath("UefiPayloadPkg/UefiPayloadEntry/U= niversalPayloadEntry.inf")=0D @@ -87,7 +88,7 @@ def BuildUniversalPayload(Args, MacroList): #=0D # Building Universal Payload entry.=0D #=0D - BuildModule =3D f"build -p {DscPath} -b {BuildTarget} -a X64 -m {Entry= ModuleInf} -t {ElfToolChain} -y {ModuleReportPath}"=0D + BuildModule =3D f"build -p {DscPath} -b {BuildTarget} -a {BuildArch} -= m {EntryModuleInf} -t {ElfToolChain} -y {ModuleReportPath}"=0D BuildModule +=3D Defines=0D RunCommand(BuildModule)=0D =0D @@ -116,6 +117,7 @@ def main(): parser =3D argparse.ArgumentParser(description=3D'For building Univers= al Payload')=0D parser.add_argument('-t', '--ToolChain')=0D parser.add_argument('-b', '--Target', default=3D'DEBUG')=0D + parser.add_argument('-a', '--Arch', choices=3D['IA32', 'X64'], help=3D= 'Specify the ARCH for payload entry module. Default build X64 image.', defa= ult =3D'X64')=0D parser.add_argument("-D", "--Macro", action=3D"append", default=3D["UN= IVERSAL_PAYLOAD=3DTRUE"])=0D parser.add_argument('-i', '--ImageId', type=3Dstr, help=3D'Specify pay= load ID (16 bytes maximal).', default =3D'UEFI')=0D MacroList =3D {}=0D --=20 2.35.1.windows.2