summaryrefslogtreecommitdiff
path: root/UefiPayloadPkg/UniversalPayloadBuild.py
AgeCommit message (Collapse)AuthorFilesLines
5 daysUefiPayloadPkg: Align relocation item with specGua Guo1-1/+1
Currently, FIT Payload data relocation data has some minor error with Universal Payload Specification v0.9.1 section 2.4.3. Signed-off-by: Gua Guo <gua.guo@intel.com>
2024-06-11UefiPayloadPkg: Enable UPL FIT build config from cmdlineDhaval1-1/+3
Provide commandline configuration to select proper platform file. Cc: Gua Guo <gua.guo@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: James Lu <james.lu@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
2024-03-04UefiPayloadPkg: UPL arch backward support ELFGua Guo1-1/+1
After 11ad164bcea6b0ed3628d merge, ELF format API won't meet backward requirement. Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2024-02-23UefiPayloadPkg: Make UPL build script arch agnosticDhaval1-12/+15
Current implementation makes assumptions about arch it will be built for. Need to make it more generic to add follow up support for RISCV. Right now it does not build for RV until relevant dsc file is available. Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
2023-10-27UefiPayloadPkg: Fix incorrect code on Fit function.BruceX Wang1-10/+0
1. Add firmware volume need to check firmware volume exist or not. 2. Remove clang version check dependency. Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: BruceX Wang <brucex.wang@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-09-26UefiPayloadPkg: Add FIT supportBrucex.Wang1-92/+239
Provide Fit format for UniversalPayload, developer can use argument "--Fit" to build UniversalPayload.fit Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: BruceX Wang <brucex.wang@intel.com>
2023-08-28UefiPayloadPkg:Enhance the build processing for UniversalpayloadKasimX Liu1-3/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4532 To Copy the PrebuildUplBinary to Build folder then add/replace Fvs. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
2023-06-07UefiPayloadPkg: Enhance build script for BuildEntryOnlyGua Guo1-2/+3
Currently, have two command for pre-build binary support 1. --BuildEntryOnly: build UPL Entry file 2. --PreBuildUplBinary: build UPL binary based on UPL And these two commands should be exclusived, shouldn't have chance run it in the meantime. Case1: Build UPL entry with CLANGDWARF python UefiPayloadPkg/UniversalPayloadBuild.py --BuildEntryOnly Case2: Use pre-built UPL entry and build other fv by VS2019 python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019 \ --PreBuildUplBinary UniversalPayload.elf Case3: Build UPL Entry with CLANGDWARF and build other fv by VS2019 python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019 Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com>
2023-04-28UefiPayloadPkg: Clang dependency removalBruceX Wang1-125/+107
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4426 Use Python to replace llvm-objcopy in UniversalPayloadBuild.py. 1. AddSection32() and AddSection64(): Make a section named <section> with the contents of <file>. 2. RemoveSection32() and RemoveSection64(): Remove <section>. 3. ReplaceFv (): remove the section before add the section if the file exists. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Signed-off-by: BruceX Wang <brucex.wang@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-04-20UefiPayloadPkg: Move Network modules from Dxe FV to Network FV in elfLinus Wu1-0/+12
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4417 Since UefiPayload had supported multiple FV, move Network.fdf.inc to new firmware volume and add this network FV into elf file. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Signed-off-by: Linus Wu <linusx.wu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
2023-04-07UefiPayloadPkg:Add new build commands for UniversalPayloadKasimX Liu1-36/+42
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4375 add '-pb' command of build bios with exist PreUniversalPayload file. '-e' command of olny build the UniversalPayloadentry file. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
2023-03-30UefiPayloadPkg: Support more input parameterLinus Wu1-1/+44
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4386 Add additional input parameter support --SpecRevision: user input spec version --Revision: user input revision --ProducerId: producer company name 1. UniversalPayloadBuild.py 2. Downgrade spec revision from 0.9 to 0.7 Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Linus Wu <linusx.wu@intel.com>
2022-12-21UefiPayloadPkg: Fixed that The UPL info section is not aligned at 4-byteMarsX Lin1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4196 Align .upld_info with 4-byte boundary by spec Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
2022-12-19UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFVMarsX Lin1-5/+7
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4196 Since UefiPayload had supported multiple fv, move bdsdxe.inf to new firmware volume and modify the script of UniversalPayloadPkgBuild.py to support bdsdxe fv in elf file Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
2022-11-28UefiPayloadPkg: The UPL info section is not aligned at 4-byte boundaryVictorX Hsu1-2/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4153 1.Upgrade spec revision to 0.9 2.Align .upld_info with 4-byte boundary by spec Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: VictorX Hsu <victorx.hsu@intel.com>
2022-06-30UefiPayloadPkg: Align Attribute value with UPL specGua Guo1-0/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3963 Based on UPL spec 2.12.2. Universal Payload Information Section, it defines item "Attribute" on UPLD_INFO_HEADER for Debug build should be "1", and Release build should be "0". Currently, The value of item "Attribute" is always "0" Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: James Lu <james.lu@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-06-24UefiPayloadPkg: Backward support with python 3.6KasimX Liu1-8/+25
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3960 Currently, UniversalPayloadBuild.py don't have support python3.6, we use python3.6 will encounter f"" failure use the change to fix it to support python3.6/3.7/3.8. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
2022-06-21UefiPayloadPkg: UniversalPayloadBuild.py to support --pcd featureGua Guo1-0/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3955 Currently, UPL freezed all PCD and only known UPL hob can hook DXE Drivers behavior, add optional feature on UniversalPayloadBuild.py to have another way to hook PCD value. Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: : Ray Ni <ray.ni@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-05-27UefiPayloadPkg: Align SpecRevision value with UPL specGua Guo1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3933 URL: https://universalpayload.github.io/documentation/ 1. Currently, SpecRevision on USF spec is 0.7. Change to align it. 2. SpecRevision is not be patched into UniversalPayloadInfo.bin due to different structure item name. Change item name from "HeaderRevision" to "SpecRevision" to check the correct value can be patched. Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-05-27UefiPayloadPkg: Align Identifier value with UPL specGua Guo1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3933 URL: https://universalpayload.github.io/documentation/ Currently, Identifier value is "UPLD", it needs to have correct value "PLDH" based on Universal Payload Specification spec section 2.12.2 Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
2022-05-09UefiPayloadPkg: Fix the UPL build failureTan, Dun1-3/+3
Add double quotes to LlvmObjcopyPath. Blank space in LlvmObjcopyPath will cause build failure. This build failure is introduced by 2306555bf908 ( "UefiPayloadPkg: Fix IA32 entry build failure"). Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems>
2022-04-22UefiPayloadPkg: Fix IA32 entry build failureTan, Dun1-6/+12
The ObjCopyFlag and EntryOutputDir need to be modified when building IA32 UniversalPayload Entry Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-04-14UefiPayloadPkg: Fix the build failureGuo Dong1-2/+2
When Quite parameter is not provided, its default value would be "None" instead of "". So update its default value not to impact the build. Cc: Ray Ni <ray.ni@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Guo Dong <guo.dong@intel.com> Acked-by: Dun Tan <dun.tan@intel.com>
2022-04-10UefiPayloadPkg: Add --quiet argument to Universal Payload build scriptGuo Dong1-2/+4
Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-04-10UefiPayloadPkg: Support IA32 BuildGuo Dong1-1/+3
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 <ray.ni@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2021-09-29UefiPayloadPkg: Add ".upld_info" in universal payloadGuo Dong1-3/+39
V2: Use LittleEndianStructure by review comment. From the universal scalable firmware payload requirement V0.75, Payload must have Universal Payload Information Section ".upld_info" So update the build tool to add this section. Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-09-16UefiPayloadPkg: Add script to build UniversalPayload in UefiPayloadPkgTan, Dun1-0/+98
V1: Add script to build UniversalPayload, which can be used after edksetup rebuild The final UPL.elf will be located at root folder of edk2 V2: Revise the ouput directory of generated files and coding style in the script Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Dun Tan <dun.tan@intel.com>