[edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path

Heng Luo posted 3 patches 5 years, 10 months ago
There is a newer version of this series
[edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Heng Luo 5 years, 10 months ago
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2644

Add all pathes of feature domains to package path in build_bios.py.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Heng Luo <heng.luo@intel.com>
---
 Platform/Intel/build_bios.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index 1ef35aca0a..b9ad980510 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -3,7 +3,7 @@
 # Builds BIOS using configuration files and dynamically
 # imported functions from board directory
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 
@@ -120,6 +120,11 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_SILICON"]
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_SILICON_BIN"]
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_FEATURES"]
+    # add all feature domains in WORKSPACE_FEATURES to package path
+    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
+        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
+        if os.path.isdir(filepath):
+            config["PACKAGES_PATH"] += os.pathsep + filepath
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
     config["PACKAGES_PATH"] += os.pathsep + \
         os.path.join(config["WORKSPACE"], "FSP")
-- 
2.24.0.windows.2


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56598): https://edk2.groups.io/g/devel/message/56598
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Ni, Ray 5 years, 10 months ago
> +    # add all feature domains in WORKSPACE_FEATURES to package path
> +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> +        if os.path.isdir(filepath):
> +            config["PACKAGES_PATH"] += os.pathsep + filepath

Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg" folder as well?

Can you please revise the patch to skip adding folders that contains package contents to the PACKAGES_PATH?

Liming,
What's the criteria of a package? Can we treat a folder that contains ".dec" and "dsc" files
as a package directory?

Thanks,
Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56614): https://edk2.groups.io/g/devel/message/56614
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Heng Luo 5 years, 10 months ago
Hi Liming,
I will apply the change below if you agree to  we treat a folder that contains ".dec" and "dsc" files as a package directory:

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index b9ad980510..bb25699ed8 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -16,6 +16,7 @@ imported functions from board directory
 import os
 import re
 import sys
+import glob
 import signal
 import shutil
 import argparse
@@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
     # add all feature domains in WORKSPACE_FEATURES to package path
     for filename in os.listdir(config["WORKSPACE_FEATURES"]):
         filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
-        if os.path.isdir(filepath):
+        # feature domains folder does not contain dec or dsc file
+        if os.path.isdir(filepath) and \
+          not glob.glob(os.path.join(filepath, "*.dec")) and \
+          not glob.glob(os.path.join(filepath, "*.dsc")):
             config["PACKAGES_PATH"] += os.pathsep + filepath
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
     config["PACKAGES_PATH"] += os.pathsep + \

Best Regards
Heng

> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Monday, March 30, 2020 5:01 PM
> To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>;
> Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
> 
> > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > +        if os.path.isdir(filepath):
> > +            config["PACKAGES_PATH"] += os.pathsep + filepath
> 
> Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> folder as well?
> 
> Can you please revise the patch to skip adding folders that contains package
> contents to the PACKAGES_PATH?
> 
> Liming,
> What's the criteria of a package? Can we treat a folder that contains ".dec"
> and "dsc" files as a package directory?
> 
> Thanks,
> Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56700): https://edk2.groups.io/g/devel/message/56700
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Dong, Eric 5 years, 10 months ago
Liming,

Please help to provide comments for this mail. It break the open board now

Thanks,
Eric
From: Luo, Heng
Sent: Tuesday, March 31, 2020 9:25 AM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path

Hi Liming,
I will apply the change below if you agree to  we treat a folder that contains ".dec" and "dsc" files as a package directory:

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index b9ad980510..bb25699ed8 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -16,6 +16,7 @@ imported functions from board directory
 import os
 import re
 import sys
+import glob
 import signal
 import shutil
 import argparse
@@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
     # add all feature domains in WORKSPACE_FEATURES to package path
     for filename in os.listdir(config["WORKSPACE_FEATURES"]):
         filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
-        if os.path.isdir(filepath):
+        # feature domains folder does not contain dec or dsc file
+        if os.path.isdir(filepath) and \
+          not glob.glob(os.path.join(filepath, "*.dec")) and \
+          not glob.glob(os.path.join(filepath, "*.dsc")):
             config["PACKAGES_PATH"] += os.pathsep + filepath
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
     config["PACKAGES_PATH"] += os.pathsep + \

Best Regards
Heng

> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
> Sent: Monday, March 30, 2020 5:01 PM
> To: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Bi, Dandan <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>;
> Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
>
> > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > +        if os.path.isdir(filepath):
> > +            config["PACKAGES_PATH"] += os.pathsep + filepath
>
> Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> folder as well?
>
> Can you please revise the patch to skip adding folders that contains package
> contents to the PACKAGES_PATH?
>
> Liming,
> What's the criteria of a package? Can we treat a folder that contains ".dec"
> and "dsc" files as a package directory?
>
> Thanks,
> Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56711): https://edk2.groups.io/g/devel/message/56711
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Liming Gao 5 years, 10 months ago
Ray:
  Package has dec file in its root directory. Package DSC file is optional.

Thanks
Liming
-----Original Message-----
From: Luo, Heng <heng.luo@intel.com> 
Sent: 2020年3月31日 9:25
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path

Hi Liming,
I will apply the change below if you agree to  we treat a folder that contains ".dec" and "dsc" files as a package directory:

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index b9ad980510..bb25699ed8 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -16,6 +16,7 @@ imported functions from board directory  import os  import re  import sys
+import glob
 import signal
 import shutil
 import argparse
@@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
     # add all feature domains in WORKSPACE_FEATURES to package path
     for filename in os.listdir(config["WORKSPACE_FEATURES"]):
         filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
-        if os.path.isdir(filepath):
+        # feature domains folder does not contain dec or dsc file
+        if os.path.isdir(filepath) and \
+          not glob.glob(os.path.join(filepath, "*.dec")) and \
+          not glob.glob(os.path.join(filepath, "*.dsc")):
             config["PACKAGES_PATH"] += os.pathsep + filepath
     config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
     config["PACKAGES_PATH"] += os.pathsep + \

Best Regards
Heng

> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Monday, March 30, 2020 5:01 PM
> To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming 
> <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature 
> domains to package path
> 
> > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > +        if os.path.isdir(filepath):
> > +            config["PACKAGES_PATH"] += os.pathsep + filepath
> 
> Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> folder as well?
> 
> Can you please revise the patch to skip adding folders that contains 
> package contents to the PACKAGES_PATH?
> 
> Liming,
> What's the criteria of a package? Can we treat a folder that contains ".dec"
> and "dsc" files as a package directory?
> 
> Thanks,
> Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56712): https://edk2.groups.io/g/devel/message/56712
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Heng Luo 5 years, 10 months ago
OK, it means we just need to check dec file

Best Regards
Heng

> -----Original Message-----
> From: Gao, Liming <liming.gao@intel.com>
> Sent: Tuesday, March 31, 2020 10:52 AM
> To: Luo, Heng <heng.luo@intel.com>; Ni, Ray <ray.ni@intel.com>;
> devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
> 
> Ray:
>   Package has dec file in its root directory. Package DSC file is optional.
> 
> Thanks
> Liming
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: 2020年3月31日 9:25
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>;
> Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
> 
> Hi Liming,
> I will apply the change below if you agree to  we treat a folder that contains
> ".dec" and "dsc" files as a package directory:
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> b9ad980510..bb25699ed8 100644
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -16,6 +16,7 @@ imported functions from board directory  import os
> import re  import sys
> +import glob
>  import signal
>  import shutil
>  import argparse
> @@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG",
> silent=False, toolchain=None):
>      # add all feature domains in WORKSPACE_FEATURES to package path
>      for filename in os.listdir(config["WORKSPACE_FEATURES"]):
>          filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> -        if os.path.isdir(filepath):
> +        # feature domains folder does not contain dec or dsc file
> +        if os.path.isdir(filepath) and \
> +          not glob.glob(os.path.join(filepath, "*.dec")) and \
> +          not glob.glob(os.path.join(filepath, "*.dsc")):
>              config["PACKAGES_PATH"] += os.pathsep + filepath
>      config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
>      config["PACKAGES_PATH"] += os.pathsep + \
> 
> Best Regards
> Heng
> 
> > -----Original Message-----
> > From: Ni, Ray <ray.ni@intel.com>
> > Sent: Monday, March 30, 2020 5:01 PM
> > To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
> > Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming
> > <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> > Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature
> > domains to package path
> >
> > > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > > +        if os.path.isdir(filepath):
> > > +            config["PACKAGES_PATH"] += os.pathsep + filepath
> >
> > Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> > folder as well?
> >
> > Can you please revise the patch to skip adding folders that contains
> > package contents to the PACKAGES_PATH?
> >
> > Liming,
> > What's the criteria of a package? Can we treat a folder that contains ".dec"
> > and "dsc" files as a package directory?
> >
> > Thanks,
> > Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56713): https://edk2.groups.io/g/devel/message/56713
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Ni, Ray 5 years, 10 months ago
Liming,
Where can I find the rule?

Thanks,
Ray

> -----Original Message-----
> From: Gao, Liming <liming.gao@intel.com>
> Sent: Tuesday, March 31, 2020 10:52 AM
> To: Luo, Heng <heng.luo@intel.com>; Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
> 
> Ray:
>   Package has dec file in its root directory. Package DSC file is optional.
> 
> Thanks
> Liming
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: 2020年3月31日 9:25
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
> 
> Hi Liming,
> I will apply the change below if you agree to  we treat a folder that contains ".dec" and "dsc" files as a package directory:
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index b9ad980510..bb25699ed8 100644
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -16,6 +16,7 @@ imported functions from board directory  import os  import re  import sys
> +import glob
>  import signal
>  import shutil
>  import argparse
> @@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
>      # add all feature domains in WORKSPACE_FEATURES to package path
>      for filename in os.listdir(config["WORKSPACE_FEATURES"]):
>          filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> -        if os.path.isdir(filepath):
> +        # feature domains folder does not contain dec or dsc file
> +        if os.path.isdir(filepath) and \
> +          not glob.glob(os.path.join(filepath, "*.dec")) and \
> +          not glob.glob(os.path.join(filepath, "*.dsc")):
>              config["PACKAGES_PATH"] += os.pathsep + filepath
>      config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
>      config["PACKAGES_PATH"] += os.pathsep + \
> 
> Best Regards
> Heng
> 
> > -----Original Message-----
> > From: Ni, Ray <ray.ni@intel.com>
> > Sent: Monday, March 30, 2020 5:01 PM
> > To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
> > Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming
> > <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> > Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature
> > domains to package path
> >
> > > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > > +        if os.path.isdir(filepath):
> > > +            config["PACKAGES_PATH"] += os.pathsep + filepath
> >
> > Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> > folder as well?
> >
> > Can you please revise the patch to skip adding folders that contains
> > package contents to the PACKAGES_PATH?
> >
> > Liming,
> > What's the criteria of a package? Can we treat a folder that contains ".dec"
> > and "dsc" files as a package directory?
> >
> > Thanks,
> > Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56719): https://edk2.groups.io/g/devel/message/56719
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Liming Gao 5 years, 10 months ago
EDKII DEC spec https://github.com/tianocore-docs/edk2-DecSpecification/tree/release/1.27/2_dec_file_overview 

DEC File Overview

An EDK II Package (directory) is a directory that contains an EDK II package declaration (DEC) file. Only one DEC file is permitted per directory. EDK II Packages cannot be nested within other EDK II Packages.

Thanks
Liming
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com> 
Sent: 2020年3月31日 13:03
To: Gao, Liming <liming.gao@intel.com>; Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to package path

Liming,
Where can I find the rule?

Thanks,
Ray

> -----Original Message-----
> From: Gao, Liming <liming.gao@intel.com>
> Sent: Tuesday, March 31, 2020 10:52 AM
> To: Luo, Heng <heng.luo@intel.com>; Ni, Ray <ray.ni@intel.com>; 
> devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature 
> domains to package path
> 
> Ray:
>   Package has dec file in its root directory. Package DSC file is optional.
> 
> Thanks
> Liming
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: 2020年3月31日 9:25
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming 
> <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature 
> domains to package path
> 
> Hi Liming,
> I will apply the change below if you agree to  we treat a folder that contains ".dec" and "dsc" files as a package directory:
> 
> diff --git a/Platform/Intel/build_bios.py 
> b/Platform/Intel/build_bios.py index b9ad980510..bb25699ed8 100644
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -16,6 +16,7 @@ imported functions from board directory  import os  
> import re  import sys
> +import glob
>  import signal
>  import shutil
>  import argparse
> @@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
>      # add all feature domains in WORKSPACE_FEATURES to package path
>      for filename in os.listdir(config["WORKSPACE_FEATURES"]):
>          filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> -        if os.path.isdir(filepath):
> +        # feature domains folder does not contain dec or dsc file
> +        if os.path.isdir(filepath) and \
> +          not glob.glob(os.path.join(filepath, "*.dec")) and \
> +          not glob.glob(os.path.join(filepath, "*.dsc")):
>              config["PACKAGES_PATH"] += os.pathsep + filepath
>      config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
>      config["PACKAGES_PATH"] += os.pathsep + \
> 
> Best Regards
> Heng
> 
> > -----Original Message-----
> > From: Ni, Ray <ray.ni@intel.com>
> > Sent: Monday, March 30, 2020 5:01 PM
> > To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
> > Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming 
> > <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> > Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature 
> > domains to package path
> >
> > > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > > +        if os.path.isdir(filepath):
> > > +            config["PACKAGES_PATH"] += os.pathsep + filepath
> >
> > Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> > folder as well?
> >
> > Can you please revise the patch to skip adding folders that contains 
> > package contents to the PACKAGES_PATH?
> >
> > Liming,
> > What's the criteria of a package? Can we treat a folder that contains ".dec"
> > and "dsc" files as a package directory?
> >
> > Thanks,
> > Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56721): https://edk2.groups.io/g/devel/message/56721
Mute This Topic: https://groups.io/mt/72646657/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-