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

Heng Luo posted 3 patches 5 years, 10 months ago
[edk2-devel] [Patch V2 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>
---

Notes:
    v2:
      - Skip adding folders that contains package contents to the PACKAGES_PATH. [Ray Ni]

 Platform/Intel/build_bios.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index 1ef35aca0a..8f855f63eb 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
 #
 
@@ -16,6 +16,7 @@ imported functions from board directory
 import os
 import re
 import sys
+import glob
 import signal
 import shutil
 import argparse
@@ -120,6 +121,13 @@ 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)
+        # feature domains folder does not contain dec file
+        if os.path.isdir(filepath) and \
+          not glob.glob(os.path.join(filepath, "*.dec")):
+            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 (#56716): https://edk2.groups.io/g/devel/message/56716
Mute This Topic: https://groups.io/mt/72670486/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch V2 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Dong, Eric 5 years, 10 months ago
Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Luo, Heng
> Sent: Tuesday, March 31, 2020 11:49 AM
> To: devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>;
> Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [Patch V2 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
> 
> 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>
> ---
> 
> Notes:
>     v2:
>       - Skip adding folders that contains package contents to the
> PACKAGES_PATH. [Ray Ni]
> 
>  Platform/Intel/build_bios.py | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> 1ef35aca0a..8f855f63eb 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  #
> 
> @@ -16,6 +16,7 @@ imported functions from board directory  import os
> import re  import sys
> +import glob
>  import signal
>  import shutil
>  import argparse
> @@ -120,6 +121,13 @@ 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)
> +        # feature domains folder does not contain dec file
> +        if os.path.isdir(filepath) and \
> +          not glob.glob(os.path.join(filepath, "*.dec")):
> +            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 (#56811): https://edk2.groups.io/g/devel/message/56811
Mute This Topic: https://groups.io/mt/72670486/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch V2 1/3] Platform/Intel: Add all pathes of feature domains to package path
Posted by Ni, Ray 5 years, 10 months ago
Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: Tuesday, March 31, 2020 11:49 AM
> To: devel@edk2.groups.io
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni, Ray
> <ray.ni@intel.com>
> Subject: [Patch V2 1/3] Platform/Intel: Add all pathes of feature domains to package path
> 
> 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>
> ---
> 
> Notes:
>     v2:
>       - Skip adding folders that contains package contents to the PACKAGES_PATH. [Ray Ni]
> 
>  Platform/Intel/build_bios.py | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
> index 1ef35aca0a..8f855f63eb 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
>  #
> 
> @@ -16,6 +16,7 @@ imported functions from board directory
>  import os
>  import re
>  import sys
> +import glob
>  import signal
>  import shutil
>  import argparse
> @@ -120,6 +121,13 @@ 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)
> +        # feature domains folder does not contain dec file
> +        if os.path.isdir(filepath) and \
> +          not glob.glob(os.path.join(filepath, "*.dec")):
> +            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 (#56816): https://edk2.groups.io/g/devel/message/56816
Mute This Topic: https://groups.io/mt/72670486/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-