diff mbox series

edk2-firmware: fix PlatformStandaloneMmRpmb.dsc build

Message ID 20250114094154.304900-1-mikko.rapeli@linaro.org
State New
Headers show
Series edk2-firmware: fix PlatformStandaloneMmRpmb.dsc build | expand

Commit Message

Mikko Rapeli Jan. 14, 2025, 9:41 a.m. UTC
With backported patch from upstream. Error was:

| build.py...
| /home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/edk2-platforms/Platform/StandaloneMm/PlatformS
tandaloneMmPkg/PlatformStandaloneMmRpmb.dsc(...): error 4000: Instance of library class [HobPrintLib] is not found
|       in [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core/StandaloneMmCor
e.inf] [AARCH64]
|       consumed by module [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core
/StandaloneMmCore.inf]

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc   |  1 +
 .../0001-Platform-StMmRpmb-Fix-build.patch    | 38 +++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch

Comments

Jon Mason Jan. 14, 2025, 2:16 p.m. UTC | #1
On Tue, Jan 14, 2025 at 11:41:54AM +0200, Mikko Rapeli wrote:
> With backported patch from upstream. Error was:
> 
> | build.py...
> | /home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/edk2-platforms/Platform/StandaloneMm/PlatformS
> tandaloneMmPkg/PlatformStandaloneMmRpmb.dsc(...): error 4000: Instance of library class [HobPrintLib] is not found
> |       in [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core/StandaloneMmCor
> e.inf] [AARCH64]
> |       consumed by module [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core
> /StandaloneMmCore.inf]
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>

I'm seeing this patch fail to apply (as part of the edk2 build
process) on every edk2 platform
https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673217
https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673227
https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673281
https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673312
https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673331
https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673346

Thanks,
Jon

> ---
>  meta-arm/recipes-bsp/uefi/edk2-firmware.inc   |  1 +
>  .../0001-Platform-StMmRpmb-Fix-build.patch    | 38 +++++++++++++++++++
>  2 files changed, 39 insertions(+)
>  create mode 100644 meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> 
> diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> index 42668d9d..c10154aa 100644
> --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> @@ -20,6 +20,7 @@ SRCBRANCH_edk2_platforms = "master"
>  SRC_URI = "\
>      ${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \
>      ${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \
> +    file://0001-Platform-StMmRpmb-Fix-build.patch;patchdir=edk2-platforms \
>  "
>  
>  SRCREV_FORMAT         = "edk2_edk2-platforms"
> diff --git a/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> new file mode 100644
> index 00000000..234ccf34
> --- /dev/null
> +++ b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> @@ -0,0 +1,38 @@
> +From ee185eda7b7ec9a0c82827fea197fbb73d971f93 Mon Sep 17 00:00:00 2001
> +From: Ard Biesheuvel <ardb@kernel.org>
> +Date: Thu, 29 Aug 2024 21:21:50 +0200
> +Subject: [PATCH] Platform/StMmRpmb: Fix build
> +
> +Add some missing library class resolutions relating to changes in the
> +core upstream EDK2 repo.
> +
> +Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> +Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> +---
> + .../PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc       | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +Upstream-Status: Backport
> +
> +diff --git a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> +index 653029c52f..54c7a63b41 100644
> +--- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> ++++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> +@@ -41,11 +41,14 @@
> +   ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
> +   FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf
> +   HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
> ++  HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf
> ++  ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
> +   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> +   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> +   MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> +   MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
> +   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> ++  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> +   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> +   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
> +-- 
> +2.43.0
> +
> -- 
> 2.43.0
> 
>
Mikko Rapeli Jan. 14, 2025, 2:43 p.m. UTC | #2
Hi,

On Tue, Jan 14, 2025 at 09:16:15AM -0500, Jon Mason wrote:
> On Tue, Jan 14, 2025 at 11:41:54AM +0200, Mikko Rapeli wrote:
> > With backported patch from upstream. Error was:
> > 
> > | build.py...
> > | /home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/edk2-platforms/Platform/StandaloneMm/PlatformS
> > tandaloneMmPkg/PlatformStandaloneMmRpmb.dsc(...): error 4000: Instance of library class [HobPrintLib] is not found
> > |       in [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core/StandaloneMmCor
> > e.inf] [AARCH64]
> > |       consumed by module [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core
> > /StandaloneMmCore.inf]
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> 
> I'm seeing this patch fail to apply (as part of the edk2 build
> process) on every edk2 platform
> https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673217
> https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673227
> https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673281
> https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673312
> https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673331
> https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673346

Oh, I did not see this. I will try to reproduce. Seems to be line ending
issue. edk2 sources use Windows ones. I hope mailing list patch doesn't change
something...

Cheers,

-Mikko

> Thanks,
> Jon
> 
> > ---
> >  meta-arm/recipes-bsp/uefi/edk2-firmware.inc   |  1 +
> >  .../0001-Platform-StMmRpmb-Fix-build.patch    | 38 +++++++++++++++++++
> >  2 files changed, 39 insertions(+)
> >  create mode 100644 meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> > 
> > diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> > index 42668d9d..c10154aa 100644
> > --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> > +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> > @@ -20,6 +20,7 @@ SRCBRANCH_edk2_platforms = "master"
> >  SRC_URI = "\
> >      ${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \
> >      ${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \
> > +    file://0001-Platform-StMmRpmb-Fix-build.patch;patchdir=edk2-platforms \
> >  "
> >  
> >  SRCREV_FORMAT         = "edk2_edk2-platforms"
> > diff --git a/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> > new file mode 100644
> > index 00000000..234ccf34
> > --- /dev/null
> > +++ b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> > @@ -0,0 +1,38 @@
> > +From ee185eda7b7ec9a0c82827fea197fbb73d971f93 Mon Sep 17 00:00:00 2001
> > +From: Ard Biesheuvel <ardb@kernel.org>
> > +Date: Thu, 29 Aug 2024 21:21:50 +0200
> > +Subject: [PATCH] Platform/StMmRpmb: Fix build
> > +
> > +Add some missing library class resolutions relating to changes in the
> > +core upstream EDK2 repo.
> > +
> > +Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> > +Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > +---
> > + .../PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc       | 3 +++
> > + 1 file changed, 3 insertions(+)
> > +
> > +Upstream-Status: Backport
> > +
> > +diff --git a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> > +index 653029c52f..54c7a63b41 100644
> > +--- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> > ++++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> > +@@ -41,11 +41,14 @@
> > +   ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
> > +   FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf
> > +   HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
> > ++  HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf
> > ++  ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
> > +   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> > +   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> > +   MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> > +   MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
> > +   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> > ++  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> > +   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> > +   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> > +   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
> > +-- 
> > +2.43.0
> > +
> > -- 
> > 2.43.0
> > 
> >
Jon Mason Jan. 14, 2025, 3:20 p.m. UTC | #3
On Tue, Jan 14, 2025 at 9:43 AM Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
>
> Hi,
>
> On Tue, Jan 14, 2025 at 09:16:15AM -0500, Jon Mason wrote:
> > On Tue, Jan 14, 2025 at 11:41:54AM +0200, Mikko Rapeli wrote:
> > > With backported patch from upstream. Error was:
> > >
> > > | build.py...
> > > | /home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/edk2-platforms/Platform/StandaloneMm/PlatformS
> > > tandaloneMmPkg/PlatformStandaloneMmRpmb.dsc(...): error 4000: Instance of library class [HobPrintLib] is not found
> > > |       in [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core/StandaloneMmCor
> > > e.inf] [AARCH64]
> > > |       consumed by module [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core
> > > /StandaloneMmCore.inf]
> > >
> > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> >
> > I'm seeing this patch fail to apply (as part of the edk2 build
> > process) on every edk2 platform
> > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673217
> > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673227
> > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673281
> > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673312
> > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673331
> > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673346
>
> Oh, I did not see this. I will try to reproduce. Seems to be line ending
> issue. edk2 sources use Windows ones. I hope mailing list patch doesn't change
> something...

Talking to Ross, and he reminded me that email messes up edk2 patches
(specifically).  Do you have a git tree with this patch that I can
cherry-pick from?

Thanks,
Jon

> Cheers,
>
> -Mikko
>
> > Thanks,
> > Jon
> >
> > > ---
> > >  meta-arm/recipes-bsp/uefi/edk2-firmware.inc   |  1 +
> > >  .../0001-Platform-StMmRpmb-Fix-build.patch    | 38 +++++++++++++++++++
> > >  2 files changed, 39 insertions(+)
> > >  create mode 100644 meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> > >
> > > diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> > > index 42668d9d..c10154aa 100644
> > > --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> > > +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
> > > @@ -20,6 +20,7 @@ SRCBRANCH_edk2_platforms = "master"
> > >  SRC_URI = "\
> > >      ${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \
> > >      ${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \
> > > +    file://0001-Platform-StMmRpmb-Fix-build.patch;patchdir=edk2-platforms \
> > >  "
> > >
> > >  SRCREV_FORMAT         = "edk2_edk2-platforms"
> > > diff --git a/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> > > new file mode 100644
> > > index 00000000..234ccf34
> > > --- /dev/null
> > > +++ b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
> > > @@ -0,0 +1,38 @@
> > > +From ee185eda7b7ec9a0c82827fea197fbb73d971f93 Mon Sep 17 00:00:00 2001
> > > +From: Ard Biesheuvel <ardb@kernel.org>
> > > +Date: Thu, 29 Aug 2024 21:21:50 +0200
> > > +Subject: [PATCH] Platform/StMmRpmb: Fix build
> > > +
> > > +Add some missing library class resolutions relating to changes in the
> > > +core upstream EDK2 repo.
> > > +
> > > +Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> > > +Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > > +---
> > > + .../PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc       | 3 +++
> > > + 1 file changed, 3 insertions(+)
> > > +
> > > +Upstream-Status: Backport
> > > +
> > > +diff --git a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> > > +index 653029c52f..54c7a63b41 100644
> > > +--- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> > > ++++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
> > > +@@ -41,11 +41,14 @@
> > > +   ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
> > > +   FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf
> > > +   HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
> > > ++  HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf
> > > ++  ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
> > > +   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> > > +   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> > > +   MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> > > +   MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
> > > +   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> > > ++  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> > > +   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> > > +   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> > > +   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
> > > +--
> > > +2.43.0
> > > +
> > > --
> > > 2.43.0
> > >
> > >
Mikko Rapeli Jan. 15, 2025, 9:02 a.m. UTC | #4
Hi,

On Tue, Jan 14, 2025 at 10:20:09AM -0500, Jon Mason via lists.yoctoproject.org wrote:
> On Tue, Jan 14, 2025 at 9:43 AM Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
> > On Tue, Jan 14, 2025 at 09:16:15AM -0500, Jon Mason wrote:
> > > On Tue, Jan 14, 2025 at 11:41:54AM +0200, Mikko Rapeli wrote:
> > > > With backported patch from upstream. Error was:
> > > >
> > > > | build.py...
> > > > | /home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/edk2-platforms/Platform/StandaloneMm/PlatformS
> > > > tandaloneMmPkg/PlatformStandaloneMmRpmb.dsc(...): error 4000: Instance of library class [HobPrintLib] is not found
> > > > |       in [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core/StandaloneMmCor
> > > > e.inf] [AARCH64]
> > > > |       consumed by module [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core
> > > > /StandaloneMmCore.inf]
> > > >
> > > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > >
> > > I'm seeing this patch fail to apply (as part of the edk2 build
> > > process) on every edk2 platform
> > > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673217
> > > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673227
> > > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673281
> > > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673312
> > > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673331
> > > https://gitlab.com/jonmason00/meta-arm/-/jobs/8844673346
> >
> > Oh, I did not see this. I will try to reproduce. Seems to be line ending
> > issue. edk2 sources use Windows ones. I hope mailing list patch doesn't change
> > something...
> 
> Talking to Ross, and he reminded me that email messes up edk2 patches
> (specifically).  Do you have a git tree with this patch that I can
> cherry-pick from?

Yes, git repo https://gitlab.com/mikko.rapeli/meta-arm.git and branch
edk2-firmware_rpmb_fix has commit 8a3cef62ad33fdc91f6be84331cae1171211feb5

Cheers,

-Mikko
Jon Mason Jan. 20, 2025, 3:42 a.m. UTC | #5
On Tue, 14 Jan 2025 11:41:54 +0200, Mikko Rapeli wrote:
> With backported patch from upstream. Error was:
> 
> | build.py...
> | /home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/edk2-platforms/Platform/StandaloneMm/PlatformS
> tandaloneMmPkg/PlatformStandaloneMmRpmb.dsc(...): error 4000: Instance of library class [HobPrintLib] is not found
> |       in [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core/StandaloneMmCor
> e.inf] [AARCH64]
> |       consumed by module [/home/builder/src/base/repo/build/tmp_rockpi4b/work/rockpi4b-poky-linux/edk2-firmware/202408/edk2/StandaloneMmPkg/Core
> /StandaloneMmCore.inf]
> 
> [...]

Applied, thanks!

[1/1] edk2-firmware: fix PlatformStandaloneMmRpmb.dsc build
      commit: eb9a1ec43baaa076f7e02b0bd8879b683dffc75b

Best regards,
diff mbox series

Patch

diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
index 42668d9d..c10154aa 100644
--- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
+++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
@@ -20,6 +20,7 @@  SRCBRANCH_edk2_platforms = "master"
 SRC_URI = "\
     ${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \
     ${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \
+    file://0001-Platform-StMmRpmb-Fix-build.patch;patchdir=edk2-platforms \
 "
 
 SRCREV_FORMAT         = "edk2_edk2-platforms"
diff --git a/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
new file mode 100644
index 00000000..234ccf34
--- /dev/null
+++ b/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
@@ -0,0 +1,38 @@ 
+From ee185eda7b7ec9a0c82827fea197fbb73d971f93 Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb@kernel.org>
+Date: Thu, 29 Aug 2024 21:21:50 +0200
+Subject: [PATCH] Platform/StMmRpmb: Fix build
+
+Add some missing library class resolutions relating to changes in the
+core upstream EDK2 repo.
+
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
+---
+ .../PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc       | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Upstream-Status: Backport
+
+diff --git a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
+index 653029c52f..54c7a63b41 100644
+--- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
++++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc
+@@ -41,11 +41,14 @@
+   ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
+   FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf
+   HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
++  HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf
++  ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
+   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
+   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+   MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
+   MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf
+   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
++  PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
+   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
+-- 
+2.43.0
+