[edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance

levi.yun posted 1 patch 6 months, 2 weeks ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by levi.yun 6 months, 2 weeks ago
The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver
architecture independent" (https://edk2.groups.io/g/devel/message/109178)
removed ArmPkg/ArmPkg.dec from the Packages section in the
INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf

This change was done as part of making the StandaloneMmCpu driver
architecture independent.

Although this change is correct, it results in a side effect
here some platforms that utilise PCDs declared in ArmPkg.dec are
no longer declared.

An example of this issue can be seen when building
edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc

$ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
build.py...
/mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
  error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
  FDF is not declared in DEC files.

As seen above, removing ArmPkg.dec from the Packages section in the
StandAloneMmCpu Driver Inf file triggers build failure.
Although, ArmPkg.dec is included in other Library Instances,
the build system does not include the declarations from
.dec files defined in Library instances.

The build system only includes the PCD declarations from DEC files
that are specified in INF files for Modules (components).

Therefore, extend the build system to include the Packages from
Library Instances so that the PCD declarations from the respective package
DEC files are included.

This patch can be seen on
    https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library

Signed-off-by: levi.yun <yeoreum.yun@arm.com>
---
 BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c61542f659eb7874 100644
--- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
@@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen):
             PkgSet = set()
             for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, self.ToolChain] for m in Platform.Modules]:
                 PkgSet.update(mb.Packages)
+
+            for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, self.ToolChain] for l in Platform.LibraryInstances]:
+                PkgSet.update(lb.Packages)
+
             for Inf in ModuleList:
                 ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)
                 if ModuleFile in Platform.Modules:
@@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen):
     #
     def CreateAsBuiltInf(self):
         return
-
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109576): https://edk2.groups.io/g/devel/message/109576
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Sami Mujawar 3 months ago
Hi Levi,

Thank you for this patch.
This change looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114572): https://edk2.groups.io/g/devel/message/114572
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Rebecca Cran 6 months ago
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>


-- 

Rebecca Cran


On 10/12/23 11:11, levi.yun wrote:
> The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver
> architecture independent" (https://edk2.groups.io/g/devel/message/109178)
> removed ArmPkg/ArmPkg.dec from the Packages section in the
> INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf
>
> This change was done as part of making the StandaloneMmCpu driver
> architecture independent.
>
> Although this change is correct, it results in a side effect
> here some platforms that utilise PCDs declared in ArmPkg.dec are
> no longer declared.
>
> An example of this issue can be seen when building
> edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
>
> $ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
> build.py...
> /mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
>    error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
>    FDF is not declared in DEC files.
>
> As seen above, removing ArmPkg.dec from the Packages section in the
> StandAloneMmCpu Driver Inf file triggers build failure.
> Although, ArmPkg.dec is included in other Library Instances,
> the build system does not include the declarations from
> .dec files defined in Library instances.
>
> The build system only includes the PCD declarations from DEC files
> that are specified in INF files for Modules (components).
>
> Therefore, extend the build system to include the Packages from
> Library Instances so that the PCD declarations from the respective package
> DEC files are included.
>
> This patch can be seen on
>      https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library
>
> Signed-off-by: levi.yun <yeoreum.yun@arm.com>
> ---
>   BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c61542f659eb7874 100644
> --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> @@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen):
>               PkgSet = set()
>               for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, self.ToolChain] for m in Platform.Modules]:
>                   PkgSet.update(mb.Packages)
> +
> +            for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, self.ToolChain] for l in Platform.LibraryInstances]:
> +                PkgSet.update(lb.Packages)
> +
>               for Inf in ModuleList:
>                   ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)
>                   if ModuleFile in Platform.Modules:
> @@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen):
>       #
>       def CreateAsBuiltInf(self):
>           return
> -
> --
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110063): https://edk2.groups.io/g/devel/message/110063
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Sami Mujawar 3 months ago
Hi Rebecca,

Can you let me know if I can merge this patch, please?

Regards,

Sami Mujawar


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114568): https://edk2.groups.io/g/devel/message/114568
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Sami Mujawar 3 months ago
Hi Rebecca,

I have created a pull request at https://github.com/samimujawar/edk2/pull/new/REVIEW_2986_basetools_pcd_declare_lib_instance_v1

Regards,

Sami Mujawar

From: <devel@edk2.groups.io> on behalf of "Sami Mujawar via groups.io" <sami.mujawar=arm.com@groups.io>
Reply to: "devel@edk2.groups.io" <devel@edk2.groups.io>, Sami Mujawar <Sami.Mujawar@arm.com>
Date: Friday, 26 January 2024 at 09:36
To: Rebecca Cran <rebecca@bsdio.com>, "devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance

Hi Rebecca,

Can you let me know if I can merge this patch, please?

Regards,

Sami Mujawar

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114573): https://edk2.groups.io/g/devel/message/114573
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Michael D Kinney 3 months ago
Please make sure this change is also applied to the edk2-basetools repo.

Mike

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sami Mujawar
Sent: Friday, January 26, 2024 2:13 AM
To: devel@edk2.groups.io; Sami Mujawar <Sami.Mujawar@arm.com>; Rebecca Cran <rebecca@bsdio.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance

Hi Rebecca,

I have created a pull request at https://github.com/samimujawar/edk2/pull/new/REVIEW_2986_basetools_pcd_declare_lib_instance_v1

Regards,

Sami Mujawar

From: <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> on behalf of "Sami Mujawar via groups.io" <sami.mujawar=arm.com@groups.io<mailto:sami.mujawar=arm.com@groups.io>>
Reply to: "devel@edk2.groups.io<mailto:devel@edk2.groups.io>" <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>, Sami Mujawar <Sami.Mujawar@arm.com<mailto:Sami.Mujawar@arm.com>>
Date: Friday, 26 January 2024 at 09:36
To: Rebecca Cran <rebecca@bsdio.com<mailto:rebecca@bsdio.com>>, "devel@edk2.groups.io<mailto:devel@edk2.groups.io>" <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Subject: Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance

Hi Rebecca,

Can you let me know if I can merge this patch, please?

Regards,

Sami Mujawar
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114624): https://edk2.groups.io/g/devel/message/114624
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by PierreGondois 6 months, 2 weeks ago
Hello,
FYIW:
Tested-by: Pierre Gondois <pierre.gondois@arm.com>

On 10/12/23 19:11, levi.yun wrote:
> The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver
> architecture independent" (https://edk2.groups.io/g/devel/message/109178)
> removed ArmPkg/ArmPkg.dec from the Packages section in the
> INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf
> 
> This change was done as part of making the StandaloneMmCpu driver
> architecture independent.
> 
> Although this change is correct, it results in a side effect
> here some platforms that utilise PCDs declared in ArmPkg.dec are
> no longer declared.
> 
> An example of this issue can be seen when building
> edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
> 
> $ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
> build.py...
> /mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
>    error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
>    FDF is not declared in DEC files.
> 
> As seen above, removing ArmPkg.dec from the Packages section in the
> StandAloneMmCpu Driver Inf file triggers build failure.
> Although, ArmPkg.dec is included in other Library Instances,
> the build system does not include the declarations from
> .dec files defined in Library instances.
> 
> The build system only includes the PCD declarations from DEC files
> that are specified in INF files for Modules (components).
> 
> Therefore, extend the build system to include the Packages from
> Library Instances so that the PCD declarations from the respective package
> DEC files are included.
> 
> This patch can be seen on
>      https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library
> 
> Signed-off-by: levi.yun <yeoreum.yun@arm.com>
> ---
>   BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c61542f659eb7874 100644
> --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> @@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen):
>               PkgSet = set()
>               for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, self.ToolChain] for m in Platform.Modules]:
>                   PkgSet.update(mb.Packages)
> +
> +            for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, self.ToolChain] for l in Platform.LibraryInstances]:
> +                PkgSet.update(lb.Packages)
> +
>               for Inf in ModuleList:
>                   ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)
>                   if ModuleFile in Platform.Modules:
> @@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen):
>       #
>       def CreateAsBuiltInf(self):
>           return
> -
> --
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109666): https://edk2.groups.io/g/devel/message/109666
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Sami Mujawar 6 months, 2 weeks ago
Adding Tuan.

Regards,

Sami Mujawar

On 12/10/2023, 18:12, "levi.yun" <yeoreum.yun@arm.com <mailto:yeoreum.yun@arm.com>> wrote:


The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver
architecture independent" (https://edk2.groups.io/g/devel/message/109178 <https://edk2.groups.io/g/devel/message/109178>)
removed ArmPkg/ArmPkg.dec from the Packages section in the
INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf


This change was done as part of making the StandaloneMmCpu driver
architecture independent.


Although this change is correct, it results in a side effect
here some platforms that utilise PCDs declared in ArmPkg.dec are
no longer declared.


An example of this issue can be seen when building
edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc


$ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
build.py...
/mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
FDF is not declared in DEC files.


As seen above, removing ArmPkg.dec from the Packages section in the
StandAloneMmCpu Driver Inf file triggers build failure.
Although, ArmPkg.dec is included in other Library Instances,
the build system does not include the declarations from
.dec files defined in Library instances.


The build system only includes the PCD declarations from DEC files
that are specified in INF files for Modules (components).


Therefore, extend the build system to include the Packages from
Library Instances so that the PCD declarations from the respective package
DEC files are included.


This patch can be seen on
https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library <https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library>


Signed-off-by: levi.yun <yeoreum.yun@arm.com <mailto:yeoreum.yun@arm.com>>
---
BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)


diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c61542f659eb7874 100644
--- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
@@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen):
PkgSet = set()
for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, self.ToolChain] for m in Platform.Modules]:
PkgSet.update(mb.Packages)
+
+ for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, self.ToolChain] for l in Platform.LibraryInstances]:
+ PkgSet.update(lb.Packages)
+
for Inf in ModuleList:
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)
if ModuleFile in Platform.Modules:
@@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen):
#
def CreateAsBuiltInf(self):
return
-
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109583): https://edk2.groups.io/g/devel/message/109583
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] Basetools: Include PCD declarations from Library Instance
Posted by Sami Mujawar 6 months, 1 week ago
Dear Basetool Maintainers,

Is it possible to provide feedback for this patch, please? 
This patch fixes an issue that is blocking the patch series at https://edk2.groups.io/g/devel/message/109178 from being merged.

Regards,

Sami Mujawar

On 13/10/2023, 08:36, "Sami Mujawar" <Sami.Mujawar@arm.com <mailto:Sami.Mujawar@arm.com>> wrote:


Adding Tuan.


Regards,


Sami Mujawar


On 12/10/2023, 18:12, "levi.yun" <yeoreum.yun@arm.com <mailto:yeoreum.yun@arm.com> <mailto:yeoreum.yun@arm.com <mailto:yeoreum.yun@arm.com>>> wrote:




The patch "[PATCH v3 1/2] StandaloneMmPkg: Make StandaloneMmCpu driver
architecture independent" (https://edk2.groups.io/g/devel/message/109178 <https://edk2.groups.io/g/devel/message/109178> <https://edk2.groups.io/g/devel/message/109178> <https://edk2.groups.io/g/devel/message/109178&gt;>)
removed ArmPkg/ArmPkg.dec from the Packages section in the
INF file: StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf




This change was done as part of making the StandaloneMmCpu driver
architecture independent.




Although this change is correct, it results in a side effect
here some platforms that utilise PCDs declared in ArmPkg.dec are
no longer declared.




An example of this issue can be seen when building
edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc




$ build -a AARCH64 -t GCC -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc
build.py...
/mnt/source/edk2-platforms/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf(23):
error F001: PCD (gArmTokenSpaceGuid.PcdFdBaseAddress) used in
FDF is not declared in DEC files.




As seen above, removing ArmPkg.dec from the Packages section in the
StandAloneMmCpu Driver Inf file triggers build failure.
Although, ArmPkg.dec is included in other Library Instances,
the build system does not include the declarations from
.dec files defined in Library instances.




The build system only includes the PCD declarations from DEC files
that are specified in INF files for Modules (components).




Therefore, extend the build system to include the Packages from
Library Instances so that the PCD declarations from the respective package
DEC files are included.




This patch can be seen on
https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library <https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library> <https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library> <https://github.com/LeviYeoReum/edk2/tree/levi/2848_dec_check_on_library&gt;>




Signed-off-by: levi.yun <yeoreum.yun@arm.com <mailto:yeoreum.yun@arm.com> <mailto:yeoreum.yun@arm.com <mailto:yeoreum.yun@arm.com>>>
---
BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)




diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
index f86c749c08c3bb2837a88b5872101bc69e8bf7a0..f52ef42045da52c3d4f20277c61542f659eb7874 100644
--- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
@@ -439,6 +439,10 @@ class WorkspaceAutoGen(AutoGen):
PkgSet = set()
for mb in [self.BuildDatabase[m, Arch, self.BuildTarget, self.ToolChain] for m in Platform.Modules]:
PkgSet.update(mb.Packages)
+
+ for lb in [self.BuildDatabase[l, Arch, self.BuildTarget, self.ToolChain] for l in Platform.LibraryInstances]:
+ PkgSet.update(lb.Packages)
+
for Inf in ModuleList:
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)
if ModuleFile in Platform.Modules:
@@ -968,4 +972,3 @@ class WorkspaceAutoGen(AutoGen):
#
def CreateAsBuiltInf(self):
return
-
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")











-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109903): https://edk2.groups.io/g/devel/message/109903
Mute This Topic: https://groups.io/mt/101922917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-