Attention is currently required from: Benjamin Doron, Lean Sheng Tan, Martin L Roth, Matt DeVillier, Sean Rhodes, Stefan Reinauer.
Nicholas Sudsgaard has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/80883?usp=email )
Change subject: payload/external/edk2: Explicitly define the build arch ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
what issue are you seeing with the arch not specified / what problem does this resolve? Does this wo […]
Without this option, the EDK2 UefiPayloadPkg will not build.
One reason may be that it creates `workspace/Build/UefiPayloadPkg$(BUILD_ARCH)` (literally) instead of `workspace/Build/UefiPayloadPkgX64` when `BUILD_ARCH` is not defined.
Regarding the UniversalPayload, I can get to the `Successfully build Universal Payload` without any issues with this change. I can't seem to get any further (with or without this change) as it throws this error:
``` Loading previous configuration from /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/Conf/BuildEnv.sh Using EDK2 in-source Basetools WORKSPACE: /home/nicholas/Development/coreboot/payloads/external/edk2/workspace EDK_TOOLS_PATH: /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/BaseTools CONF_PATH: /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/Conf Build environment: Linux-6.5.0-21-generic-x86_64-with-glibc2.35 Build start time: 00:56:51, Mar.03 2024
WORKSPACE = /home/nicholas/Development/coreboot/payloads/external/edk2/workspace PACKAGES_PATH = /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd EDK_TOOLS_PATH = /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/BaseTools CONF_PATH = /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/Conf PYTHON_COMMAND = python3
Architecture(s) = IA32 X64 Build target = RELEASE Toolchain = COREBOOT
Processing meta-data Active Platform = /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/UefiPayloadPkg/UefiPayloadPkg.dsc .Active Module = /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/UefiPayloadPkg/ShimLayer/ShimLayer.inf
build.py... /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/UefiPayloadPkg/UefiPayloadPkg.dsc(...): error 4000: Instance of library class [UefiCpuLib] is not found in [/home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/UefiPayloadPkg/ShimLayer/ShimLayer.inf] [IA32] consumed by module [/home/nicholas/Development/coreboot/payloads/external/edk2/workspace/starlabsltd/UefiPayloadPkg/ShimLayer/ShimLayer.inf]
- Failed - Build end time: 00:56:52, Mar.03 2024 Build total time: 00:00:01
make[1]: *** [Makefile:295: /home/nicholas/Development/coreboot/payloads/external/edk2/workspace/Build/UefiPayloadPkgX64/RELEASE_COREBOOT/IA32/UefiPayloadPkg/ShimLayer/ShimLayer/DEBUG/ShimLayer.dll] Error 1 make: *** [payloads/external/Makefile.mk:207: build/ShimmedUniversalPayload.elf] Error 2
``` Doing some light digging it appears that `UefiCpuLib` was removed/merged into `CpuLib` (`git log --grep UefiCpuLib`). I changed all instances of `UefiCpuLib` to `CpuLib` and it appears to compile. One thing to note is that I'm not very familiar with edk2 and may be doing something wrong here.