public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* PACKAGES_PATH in !include path in Dsc files
@ 2018-10-13  9:00 Pankaj Bansal
  2018-10-16  1:35 ` Gao, Liming
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj Bansal @ 2018-10-13  9:00 UTC (permalink / raw)
  To: Yonghong Zhu, Liming Gao; +Cc: edk2-devel@lists.01.org, Udit Kumar, Varun Sethi

Hello All,

I am trying to add this functionality that we can specify PACKAGES_PATH in !include path in Dsc files just like we can specify WORKSPACE.
I did below changes for it:

--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1530,6 +1530,7 @@ class DscParser(MetaFileParser):
             # Allow using system environment variables  in path after !include
             #
             __IncludeMacros['WORKSPACE'] = GlobalData.gGlobalDefines['WORKSPACE']
+            __IncludeMacros['PACKAGES_PATH'] = GlobalData.gGlobalDefines['PACKAGES_PATH']^M
             if "ECP_SOURCE" in GlobalData.gGlobalDefines:
                 __IncludeMacros['ECP_SOURCE'] = GlobalData.gGlobalDefines['ECP_SOURCE']
             #
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index d74082fc26..61dce3a856 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -197,6 +197,7 @@ def CheckEnvVariable():
     GlobalData.gEcpSource = EcpSourceDir

     GlobalData.gGlobalDefines["WORKSPACE"]  = WorkspaceDir
+    GlobalData.gGlobalDefines["PACKAGES_PATH"]  = PackagesPath^M
     GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir
     GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
     GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir

With these changes the compilation starts OK, but I get this error later on:

GenFds.py...
: error C0DE: Tools code failure
        Please send email to edk2-devel@lists.01.org for help, attaching following call stack trace!

Traceback (most recent call last):
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/GenFds/GenFds.py", line 246, in main
    TargetArchList = set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArchList) & set(ArchList)
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py", line 132, in __getitem__
    Toolchain
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBuildData.py", line 221, in __init__
    self._HandleOverridePath()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBuildData.py", line 282, in _HandleOverridePath
    RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 257, in __getitem__
    self._PostProcess()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1358, in _PostProcess
    Processer[self._ItemType]()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1533, in __ProcessDirective
    __IncludeMacros['PACKAGES_PATH'] = GlobalData.gGlobalDefines['PACKAGES_PATH']
KeyError: 'PACKAGES_PATH'



build.py...
: error 7000: Failed to execute command
        GenFds -f /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf --conf=/home/nxa34148/Desktop/uefi/Conf -o /home/nxa34148/Desktop/uefi/Build/LS1043aRdbPkg/RELEASE_GCC49 -t GCC49 -b RELEASE -p /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc -a AARCH64 -D "EFI_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "EDK_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG=GCC49" -D "TOOLCHAIN=GCC49" -D "FAMILY=GCC" -D "PACKAGES_PATH=/home/nxa34148/Desktop/uefi/edk2-platforms" -D "EDK_TOOLS_PATH=/home/nxa34148/Desktop/uefi/BaseTools" -D "WORKSPACE=/home/nxa34148/Desktop/uefi" -D "ARCH=AARCH64" -D "ECP_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TARGET=RELEASE" [/home/nxa34148/Desktop/uefi]

- Failed -

I am not able to understand the cause of this error.

Can you please help?

Regards,
Pankaj Bansal


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: PACKAGES_PATH in !include path in Dsc files
  2018-10-13  9:00 PACKAGES_PATH in !include path in Dsc files Pankaj Bansal
@ 2018-10-16  1:35 ` Gao, Liming
  2018-10-16  2:40   ` Pankaj Bansal
  0 siblings, 1 reply; 7+ messages in thread
From: Gao, Liming @ 2018-10-16  1:35 UTC (permalink / raw)
  To: Pankaj Bansal, Zhu, Yonghong
  Cc: edk2-devel@lists.01.org, Udit Kumar, Varun Sethi

What's your usage model in DSC?

BaseTools will try to replace $(WORKSPACE) with WORKSPACE and PACKAGES_PATH, and find the first existing file. So, if you want to refer to one file in PACKAGES_PATH directory, you can also use $(WORKSPACE) macro to refer to it.

Thanks
Liming
From: Pankaj Bansal [mailto:pankaj.bansal@nxp.com]
Sent: Saturday, October 13, 2018 5:01 PM
To: Zhu, Yonghong <yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com>
Cc: edk2-devel@lists.01.org; Udit Kumar <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
Subject: PACKAGES_PATH in !include path in Dsc files

Hello All,

I am trying to add this functionality that we can specify PACKAGES_PATH in !include path in Dsc files just like we can specify WORKSPACE.
I did below changes for it:

--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1530,6 +1530,7 @@ class DscParser(MetaFileParser):
             # Allow using system environment variables  in path after !include
             #
             __IncludeMacros['WORKSPACE'] = GlobalData.gGlobalDefines['WORKSPACE']
+            __IncludeMacros['PACKAGES_PATH'] = GlobalData.gGlobalDefines['PACKAGES_PATH']^M
             if "ECP_SOURCE" in GlobalData.gGlobalDefines:
                 __IncludeMacros['ECP_SOURCE'] = GlobalData.gGlobalDefines['ECP_SOURCE']
             #
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index d74082fc26..61dce3a856 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -197,6 +197,7 @@ def CheckEnvVariable():
     GlobalData.gEcpSource = EcpSourceDir

     GlobalData.gGlobalDefines["WORKSPACE"]  = WorkspaceDir
+    GlobalData.gGlobalDefines["PACKAGES_PATH"]  = PackagesPath^M
     GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir
     GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
     GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir

With these changes the compilation starts OK, but I get this error later on:

GenFds.py...
: error C0DE: Tools code failure
        Please send email to edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> for help, attaching following call stack trace!

Traceback (most recent call last):
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/GenFds/GenFds.py", line 246, in main
    TargetArchList = set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArchList) & set(ArchList)
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py", line 132, in __getitem__
    Toolchain
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBuildData.py", line 221, in __init__
    self._HandleOverridePath()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBuildData.py", line 282, in _HandleOverridePath
    RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 257, in __getitem__
    self._PostProcess()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1358, in _PostProcess
    Processer[self._ItemType]()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1533, in __ProcessDirective
    __IncludeMacros['PACKAGES_PATH'] = GlobalData.gGlobalDefines['PACKAGES_PATH']
KeyError: 'PACKAGES_PATH'



build.py...
: error 7000: Failed to execute command
        GenFds -f /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf --conf=/home/nxa34148/Desktop/uefi/Conf -o /home/nxa34148/Desktop/uefi/Build/LS1043aRdbPkg/RELEASE_GCC49 -t GCC49 -b RELEASE -p /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc -a AARCH64 -D "EFI_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "EDK_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG=GCC49" -D "TOOLCHAIN=GCC49" -D "FAMILY=GCC" -D "PACKAGES_PATH=/home/nxa34148/Desktop/uefi/edk2-platforms" -D "EDK_TOOLS_PATH=/home/nxa34148/Desktop/uefi/BaseTools" -D "WORKSPACE=/home/nxa34148/Desktop/uefi" -D "ARCH=AARCH64" -D "ECP_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TARGET=RELEASE" [/home/nxa34148/Desktop/uefi]

- Failed -

I am not able to understand the cause of this error.

Can you please help?

Regards,
Pankaj Bansal


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: PACKAGES_PATH in !include path in Dsc files
  2018-10-16  1:35 ` Gao, Liming
@ 2018-10-16  2:40   ` Pankaj Bansal
  2018-10-16  3:11     ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj Bansal @ 2018-10-16  2:40 UTC (permalink / raw)
  To: Gao, Liming, Zhu, Yonghong, Ard Biesheuvel, Leif Lindholm,
	Michael D Kinney
  Cc: edk2-devel@lists.01.org, Udit Kumar, Varun Sethi

+edk2-platforms maintainers in To list

Thank you Liming for replying.

Our entire code is in edk2-platforms (https://github.com/tianocore/edk2-platforms) which is denoted by PACKAGES_PATH.
The PACKAGES_PATH directory can be anywhere in WORKSPACE depending on the sync directory defined by user.
i.e. it can be $(WORKSPACE)/edk2-platforms or $(WORKSPACE)/<any directory name that user can define during git sync>
As our dsc files are relative to PACKAGES_PATH, I want to specify their path in dsc file like this:

!include $(PACKAGES_PATH)/Silicon/NXP/<Silicon Name>.dsc

Using $(WORKSPACE), I cannot specify above path, as it can be at place other than $(WORKSPACE)/edk2-platforms

Regards,
Pankaj Bansal

From: Gao, Liming [mailto:liming.gao@intel.com]
Sent: Tuesday, October 16, 2018 7:06 AM
To: Pankaj Bansal <pankaj.bansal@nxp.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Cc: edk2-devel@lists.01.org; Udit Kumar <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
Subject: RE: PACKAGES_PATH in !include path in Dsc files

What's your usage model in DSC?

BaseTools will try to replace $(WORKSPACE) with WORKSPACE and PACKAGES_PATH, and find the first existing file. So, if you want to refer to one file in PACKAGES_PATH directory, you can also use $(WORKSPACE) macro to refer to it.

Thanks
Liming
From: Pankaj Bansal [mailto:pankaj.bansal@nxp.com]
Sent: Saturday, October 13, 2018 5:01 PM
To: Zhu, Yonghong <yonghong.zhu@intel.com<mailto:yonghong.zhu@intel.com>>; Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>
Cc: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Udit Kumar <udit.kumar@nxp.com<mailto:udit.kumar@nxp.com>>; Varun Sethi <V.Sethi@nxp.com<mailto:V.Sethi@nxp.com>>
Subject: PACKAGES_PATH in !include path in Dsc files

Hello All,

I am trying to add this functionality that we can specify PACKAGES_PATH in !include path in Dsc files just like we can specify WORKSPACE.
I did below changes for it:

--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1530,6 +1530,7 @@ class DscParser(MetaFileParser):
             # Allow using system environment variables  in path after !include
             #
             __IncludeMacros['WORKSPACE'] = GlobalData.gGlobalDefines['WORKSPACE']
+            __IncludeMacros['PACKAGES_PATH'] = GlobalData.gGlobalDefines['PACKAGES_PATH']^M
             if "ECP_SOURCE" in GlobalData.gGlobalDefines:
                 __IncludeMacros['ECP_SOURCE'] = GlobalData.gGlobalDefines['ECP_SOURCE']
             #
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index d74082fc26..61dce3a856 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -197,6 +197,7 @@ def CheckEnvVariable():
     GlobalData.gEcpSource = EcpSourceDir

     GlobalData.gGlobalDefines["WORKSPACE"]  = WorkspaceDir
+    GlobalData.gGlobalDefines["PACKAGES_PATH"]  = PackagesPath^M
     GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir
     GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir
     GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir

With these changes the compilation starts OK, but I get this error later on:

GenFds.py...
: error C0DE: Tools code failure
        Please send email to edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org> for help, attaching following call stack trace!

Traceback (most recent call last):
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/GenFds/GenFds.py", line 246, in main
    TargetArchList = set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArchList) & set(ArchList)
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py", line 132, in __getitem__
    Toolchain
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBuildData.py", line 221, in __init__
    self._HandleOverridePath()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/DscBuildData.py", line 282, in _HandleOverridePath
    RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 257, in __getitem__
    self._PostProcess()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1358, in _PostProcess
    Processer[self._ItemType]()
  File "/home/nxa34148/Desktop/uefi/BaseTools/Source/Python/Workspace/MetaFileParser.py", line 1533, in __ProcessDirective
    __IncludeMacros['PACKAGES_PATH'] = GlobalData.gGlobalDefines['PACKAGES_PATH']
KeyError: 'PACKAGES_PATH'



build.py...
: error 7000: Failed to execute command
        GenFds -f /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf --conf=/home/nxa34148/Desktop/uefi/Conf -o /home/nxa34148/Desktop/uefi/Build/LS1043aRdbPkg/RELEASE_GCC49 -t GCC49 -b RELEASE -p /home/nxa34148/Desktop/uefi/edk2-platforms/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc -a AARCH64 -D "EFI_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "EDK_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG=GCC49" -D "TOOLCHAIN=GCC49" -D "FAMILY=GCC" -D "PACKAGES_PATH=/home/nxa34148/Desktop/uefi/edk2-platforms" -D "EDK_TOOLS_PATH=/home/nxa34148/Desktop/uefi/BaseTools" -D "WORKSPACE=/home/nxa34148/Desktop/uefi" -D "ARCH=AARCH64" -D "ECP_SOURCE=/home/nxa34148/Desktop/uefi/EdkCompatibilityPkg" -D "TARGET=RELEASE" [/home/nxa34148/Desktop/uefi]

- Failed -

I am not able to understand the cause of this error.

Can you please help?

Regards,
Pankaj Bansal


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: PACKAGES_PATH in !include path in Dsc files
  2018-10-16  2:40   ` Pankaj Bansal
@ 2018-10-16  3:11     ` Ard Biesheuvel
  2018-10-16  5:23       ` Pankaj Bansal
  0 siblings, 1 reply; 7+ messages in thread
From: Ard Biesheuvel @ 2018-10-16  3:11 UTC (permalink / raw)
  To: Pankaj Bansal
  Cc: Gao, Liming, Zhu, Yonghong, Leif Lindholm, Michael D Kinney,
	edk2-devel@lists.01.org, Udit Kumar, Varun Sethi

On 16 October 2018 at 10:40, Pankaj Bansal <pankaj.bansal@nxp.com> wrote:
> +edk2-platforms maintainers in To list
>
>
>
> Thank you Liming for replying.
>
>
>
> Our entire code is in edk2-platforms
> (https://github.com/tianocore/edk2-platforms) which is denoted by
> PACKAGES_PATH.
>
> The PACKAGES_PATH directory can be anywhere in WORKSPACE depending on the
> sync directory defined by user.
>
> i.e. it can be $(WORKSPACE)/edk2-platforms or $(WORKSPACE)/<any directory
> name that user can define during git sync>
>
> As our dsc files are relative to PACKAGES_PATH, I want to specify their path
> in dsc file like this:
>
>
>
> !include $(PACKAGES_PATH)/Silicon/NXP/<Silicon Name>.dsc
>
>
>
> Using $(WORKSPACE), I cannot specify above path, as it can be at place other
> than $(WORKSPACE)/edk2-platforms
>

But why do you need to !include things in the first place?

Can you explain how you are trying to organize the files, and which
file includes which?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PACKAGES_PATH in !include path in Dsc files
  2018-10-16  3:11     ` Ard Biesheuvel
@ 2018-10-16  5:23       ` Pankaj Bansal
  2018-10-16  5:28         ` Gao, Liming
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj Bansal @ 2018-10-16  5:23 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Gao, Liming, Zhu, Yonghong, Leif Lindholm, Michael D Kinney,
	edk2-devel@lists.01.org, Udit Kumar, Varun Sethi



> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: Tuesday, October 16, 2018 8:41 AM
> To: Pankaj Bansal <pankaj.bansal@nxp.com>
> Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong
> <yonghong.zhu@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; Michael
> D Kinney <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit Kumar
> <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
> Subject: Re: PACKAGES_PATH in !include path in Dsc files
> 
> On 16 October 2018 at 10:40, Pankaj Bansal <pankaj.bansal@nxp.com> wrote:
> > +edk2-platforms maintainers in To list
> >
> >
> >
> > Thank you Liming for replying.
> >
> >
> >
> > Our entire code is in edk2-platforms
> > (https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> > thub.com%2Ftianocore%2Fedk2-
> platforms&amp;data=02%7C01%7Cpankaj.bansal%40nxp.com%7C552da3f22b5
> 84b7fac6008d63315ec8b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0
> %7C636752566592695047&amp;sdata=JJWbAcZkj%2FtFaZC0bWONPb7ulCcj1L2
> 4VKwCDGDx9OE%3D&amp;reserved=0) which is denoted by PACKAGES_PATH.
> >
> > The PACKAGES_PATH directory can be anywhere in WORKSPACE depending on
> > the sync directory defined by user.
> >
> > i.e. it can be $(WORKSPACE)/edk2-platforms or $(WORKSPACE)/<any
> > directory name that user can define during git sync>
> >
> > As our dsc files are relative to PACKAGES_PATH, I want to specify
> > their path in dsc file like this:
> >
> >
> >
> > !include $(PACKAGES_PATH)/Silicon/NXP/<Silicon Name>.dsc
> >
> >
> >
> > Using $(WORKSPACE), I cannot specify above path, as it can be at place
> > other than $(WORKSPACE)/edk2-platforms
> >
> 
> But why do you need to !include things in the first place?
> 
> Can you explain how you are trying to organize the files, and which file includes
> which?

I am trying to keep Silicon (SOC) specific dsc file in Silicon/NXP/<Chassis Name>/<Silicon Name>
This silicon can be used in multiple Boards (Platforms).
All these Platforms are present in Platform/NXP/<Platform Name>
fd/fv binaries would be created for each platform.
The chassis dsc file has description of components/PCDs that are specific to chassis to which the silicon belongs. It would be same for all silicons that belong to same chassis.
The Silicon dsc file has description of components/PCDs that are specific to silicon and would be same for all platforms that use this silicon. It would include chassis dsc file
The Platform dsc file would include the silicon dsc file.

___________________________________
| Platform (in Platform/NXP)                        |
|    _____________________________      |
|   | Silicon (in Silicon/NXP/<Chassis>) |     |
|   |   _______________________        |     |
|   |  | Chassis  (in Silicon/NXP)     |       |    |
|   |  |______________________|       |     |
|   |____________________________|     |
|_________________________________|

Regards,
Pankaj Bansal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PACKAGES_PATH in !include path in Dsc files
  2018-10-16  5:23       ` Pankaj Bansal
@ 2018-10-16  5:28         ` Gao, Liming
  2018-10-16  6:00           ` Pankaj Bansal
  0 siblings, 1 reply; 7+ messages in thread
From: Gao, Liming @ 2018-10-16  5:28 UTC (permalink / raw)
  To: Pankaj Bansal, Ard Biesheuvel
  Cc: Zhu, Yonghong, Leif Lindholm, Kinney, Michael D,
	edk2-devel@lists.01.org, Udit Kumar, Varun Sethi

Hi, 
  You can directly include it. BaseTools will search it from WORKSPACE and PACKAGES_PATH. So, you only need to set edk2-platforms directory into PACKAGES_PATH env. 

!include Silicon/NXP/<Silicon Name>.dsc

Thanks
Liming
>-----Original Message-----
>From: Pankaj Bansal [mailto:pankaj.bansal@nxp.com]
>Sent: Tuesday, October 16, 2018 1:24 PM
>To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong
><yonghong.zhu@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; Kinney,
>Michael D <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit
>Kumar <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
>Subject: RE: PACKAGES_PATH in !include path in Dsc files
>
>
>
>> -----Original Message-----
>> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
>> Sent: Tuesday, October 16, 2018 8:41 AM
>> To: Pankaj Bansal <pankaj.bansal@nxp.com>
>> Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong
>> <yonghong.zhu@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>;
>Michael
>> D Kinney <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit
>Kumar
>> <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
>> Subject: Re: PACKAGES_PATH in !include path in Dsc files
>>
>> On 16 October 2018 at 10:40, Pankaj Bansal <pankaj.bansal@nxp.com>
>wrote:
>> > +edk2-platforms maintainers in To list
>> >
>> >
>> >
>> > Thank you Liming for replying.
>> >
>> >
>> >
>> > Our entire code is in edk2-platforms
>> >
>(https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
>> > thub.com%2Ftianocore%2Fedk2-
>>
>platforms&amp;data=02%7C01%7Cpankaj.bansal%40nxp.com%7C552da3f22b
>5
>> 84b7fac6008d63315ec8b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0
>> %7C636752566592695047&amp;sdata=JJWbAcZkj%2FtFaZC0bWONPb7ulCcj1
>L2
>> 4VKwCDGDx9OE%3D&amp;reserved=0) which is denoted by
>PACKAGES_PATH.
>> >
>> > The PACKAGES_PATH directory can be anywhere in WORKSPACE
>depending on
>> > the sync directory defined by user.
>> >
>> > i.e. it can be $(WORKSPACE)/edk2-platforms or $(WORKSPACE)/<any
>> > directory name that user can define during git sync>
>> >
>> > As our dsc files are relative to PACKAGES_PATH, I want to specify
>> > their path in dsc file like this:
>> >
>> >
>> >
>> > !include $(PACKAGES_PATH)/Silicon/NXP/<Silicon Name>.dsc
>> >
>> >
>> >
>> > Using $(WORKSPACE), I cannot specify above path, as it can be at place
>> > other than $(WORKSPACE)/edk2-platforms
>> >
>>
>> But why do you need to !include things in the first place?
>>
>> Can you explain how you are trying to organize the files, and which file
>includes
>> which?
>
>I am trying to keep Silicon (SOC) specific dsc file in Silicon/NXP/<Chassis
>Name>/<Silicon Name>
>This silicon can be used in multiple Boards (Platforms).
>All these Platforms are present in Platform/NXP/<Platform Name>
>fd/fv binaries would be created for each platform.
>The chassis dsc file has description of components/PCDs that are specific to
>chassis to which the silicon belongs. It would be same for all silicons that
>belong to same chassis.
>The Silicon dsc file has description of components/PCDs that are specific to
>silicon and would be same for all platforms that use this silicon. It would
>include chassis dsc file
>The Platform dsc file would include the silicon dsc file.
>
>___________________________________
>| Platform (in Platform/NXP)                        |
>|    _____________________________      |
>|   | Silicon (in Silicon/NXP/<Chassis>) |     |
>|   |   _______________________        |     |
>|   |  | Chassis  (in Silicon/NXP)     |       |    |
>|   |  |______________________|       |     |
>|   |____________________________|     |
>|_________________________________|
>
>Regards,
>Pankaj Bansal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PACKAGES_PATH in !include path in Dsc files
  2018-10-16  5:28         ` Gao, Liming
@ 2018-10-16  6:00           ` Pankaj Bansal
  0 siblings, 0 replies; 7+ messages in thread
From: Pankaj Bansal @ 2018-10-16  6:00 UTC (permalink / raw)
  To: Gao, Liming, Ard Biesheuvel
  Cc: Zhu, Yonghong, Leif Lindholm, Kinney, Michael D,
	edk2-devel@lists.01.org, Udit Kumar, Varun Sethi

> -----Original Message-----
> From: Gao, Liming [mailto:liming.gao@intel.com]
> Sent: Tuesday, October 16, 2018 10:58 AM
> To: Pankaj Bansal <pankaj.bansal@nxp.com>; Ard Biesheuvel
> <ard.biesheuvel@linaro.org>
> Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Leif Lindholm
> <leif.lindholm@linaro.org>; Kinney, Michael D <michael.d.kinney@intel.com>;
> edk2-devel@lists.01.org; Udit Kumar <udit.kumar@nxp.com>; Varun Sethi
> <V.Sethi@nxp.com>
> Subject: RE: PACKAGES_PATH in !include path in Dsc files
> 
> Hi,
>   You can directly include it. BaseTools will search it from WORKSPACE and
> PACKAGES_PATH. So, you only need to set edk2-platforms directory into
> PACKAGES_PATH env.
> 
> !include Silicon/NXP/<Silicon Name>.dsc


Thanks You Liming Gao.
It worked for me.

> 
> Thanks
> Liming
> >-----Original Message-----
> >From: Pankaj Bansal [mailto:pankaj.bansal@nxp.com]
> >Sent: Tuesday, October 16, 2018 1:24 PM
> >To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong
> ><yonghong.zhu@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>;
> >Kinney, Michael D <michael.d.kinney@intel.com>;
> >edk2-devel@lists.01.org; Udit Kumar <udit.kumar@nxp.com>; Varun Sethi
> ><V.Sethi@nxp.com>
> >Subject: RE: PACKAGES_PATH in !include path in Dsc files
> >
> >
> >
> >> -----Original Message-----
> >> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> >> Sent: Tuesday, October 16, 2018 8:41 AM
> >> To: Pankaj Bansal <pankaj.bansal@nxp.com>
> >> Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong
> >> <yonghong.zhu@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>;
> >Michael
> >> D Kinney <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit
> >Kumar
> >> <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
> >> Subject: Re: PACKAGES_PATH in !include path in Dsc files
> >>
> >> On 16 October 2018 at 10:40, Pankaj Bansal <pankaj.bansal@nxp.com>
> >wrote:
> >> > +edk2-platforms maintainers in To list
> >> >
> >> >
> >> >
> >> > Thank you Liming for replying.
> >> >
> >> >
> >> >
> >> > Our entire code is in edk2-platforms
> >> >
> >(https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
> >> > thub.com%2Ftianocore%2Fedk2-
> >>
> >platforms&amp;data=02%7C01%7Cpankaj.bansal%40nxp.com%7C552da3f22b
> >5
> >>
> 84b7fac6008d63315ec8b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0
> >>
> %7C636752566592695047&amp;sdata=JJWbAcZkj%2FtFaZC0bWONPb7ulCcj1
> >L2
> >> 4VKwCDGDx9OE%3D&amp;reserved=0) which is denoted by
> >PACKAGES_PATH.
> >> >
> >> > The PACKAGES_PATH directory can be anywhere in WORKSPACE
> >depending on
> >> > the sync directory defined by user.
> >> >
> >> > i.e. it can be $(WORKSPACE)/edk2-platforms or $(WORKSPACE)/<any
> >> > directory name that user can define during git sync>
> >> >
> >> > As our dsc files are relative to PACKAGES_PATH, I want to specify
> >> > their path in dsc file like this:
> >> >
> >> >
> >> >
> >> > !include $(PACKAGES_PATH)/Silicon/NXP/<Silicon Name>.dsc
> >> >
> >> >
> >> >
> >> > Using $(WORKSPACE), I cannot specify above path, as it can be at
> >> > place other than $(WORKSPACE)/edk2-platforms
> >> >
> >>
> >> But why do you need to !include things in the first place?
> >>
> >> Can you explain how you are trying to organize the files, and which
> >> file
> >includes
> >> which?
> >
> >I am trying to keep Silicon (SOC) specific dsc file in
> >Silicon/NXP/<Chassis
> >Name>/<Silicon Name>
> >This silicon can be used in multiple Boards (Platforms).
> >All these Platforms are present in Platform/NXP/<Platform Name> fd/fv
> >binaries would be created for each platform.
> >The chassis dsc file has description of components/PCDs that are
> >specific to chassis to which the silicon belongs. It would be same for
> >all silicons that belong to same chassis.
> >The Silicon dsc file has description of components/PCDs that are
> >specific to silicon and would be same for all platforms that use this
> >silicon. It would include chassis dsc file The Platform dsc file would
> >include the silicon dsc file.
> >
> >___________________________________
> >| Platform (in Platform/NXP)                        |
> >|    _____________________________      |
> >|   | Silicon (in Silicon/NXP/<Chassis>) |     |
> >|   |   _______________________        |     |
> >|   |  | Chassis  (in Silicon/NXP)     |       |    |
> >|   |  |______________________|       |     |
> >|   |____________________________|     |
> >|_________________________________|
> >
> >Regards,
> >Pankaj Bansal

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-16  6:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13  9:00 PACKAGES_PATH in !include path in Dsc files Pankaj Bansal
2018-10-16  1:35 ` Gao, Liming
2018-10-16  2:40   ` Pankaj Bansal
2018-10-16  3:11     ` Ard Biesheuvel
2018-10-16  5:23       ` Pankaj Bansal
2018-10-16  5:28         ` Gao, Liming
2018-10-16  6:00           ` Pankaj Bansal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox