public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build
@ 2023-09-26  0:47 Nate DeSimone
  2023-11-17 23:48 ` Chiu, Chasel
  0 siblings, 1 reply; 3+ messages in thread
From: Nate DeSimone @ 2023-09-26  0:47 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Isaac Oram, Liming Gao, Eric Dong

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 Platform/Intel/build_bios.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index 9c95cfff76..b396017c8c 100755
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -207,7 +207,22 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
 
     _, _, result, return_code = execute_script(command, config, shell=shell)
     if return_code != 0:
-        build_failed(config)
+        #
+        # If the BaseTools build fails, then run a clean build and retry
+        #
+        clean_command = ["nmake", "-f",
+                         os.path.join(config["BASE_TOOLS_PATH"], "Makefile"),
+                         "clean"]
+        if os.name == "posix":
+            clean_command = ["make", "-C",
+                             os.path.join(config["BASE_TOOLS_PATH"]), "clean"]
+        _, _, result, return_code = execute_script(clean_command, config,
+                                                   shell=shell)
+        if return_code != 0:
+            build_failed(config)
+        _, _, result, return_code = execute_script(command, config, shell=shell)
+        if return_code != 0:
+            build_failed(config)
 
     #
     # build platform silicon tools
-- 
2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109055): https://edk2.groups.io/g/devel/message/109055
Mute This Topic: https://groups.io/mt/101587227/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build
  2023-09-26  0:47 Nate DeSimone
@ 2023-11-17 23:48 ` Chiu, Chasel
  0 siblings, 0 replies; 3+ messages in thread
From: Chiu, Chasel @ 2023-11-17 23:48 UTC (permalink / raw)
  To: Desimone, Nathaniel L, devel@edk2.groups.io
  Cc: Isaac Oram, Gao, Liming, Dong, Eric


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

Thanks,
Chasel



> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Monday, September 25, 2023 5:47 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Isaac Oram
> <isaac.w.oram@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong,
> Eric <eric.dong@intel.com>
> Subject: [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>  Platform/Intel/build_bios.py | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> 9c95cfff76..b396017c8c 100755
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -207,7 +207,22 @@ def pre_build(build_config, build_type="DEBUG",
> silent=False, toolchain=None):
> 
>      _, _, result, return_code = execute_script(command, config, shell=shell)
>      if return_code != 0:
> -        build_failed(config)
> +        #
> +        # If the BaseTools build fails, then run a clean build and retry
> +        #
> +        clean_command = ["nmake", "-f",
> +                         os.path.join(config["BASE_TOOLS_PATH"], "Makefile"),
> +                         "clean"]
> +        if os.name == "posix":
> +            clean_command = ["make", "-C",
> +                             os.path.join(config["BASE_TOOLS_PATH"]), "clean"]
> +        _, _, result, return_code = execute_script(clean_command, config,
> +                                                   shell=shell)
> +        if return_code != 0:
> +            build_failed(config)
> +        _, _, result, return_code = execute_script(command, config, shell=shell)
> +        if return_code != 0:
> +            build_failed(config)
> 
>      #
>      # build platform silicon tools
> --
> 2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111420): https://edk2.groups.io/g/devel/message/111420
Mute This Topic: https://groups.io/mt/101587227/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

* Re: [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build
       [not found] <17884C66565E22C5.16687@groups.io>
@ 2023-11-18  4:02 ` Nate DeSimone
  0 siblings, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2023-11-18  4:02 UTC (permalink / raw)
  To: devel@edk2.groups.io, Desimone, Nathaniel L
  Cc: Chiu, Chasel, Isaac Oram, Gao, Liming, Dong, Eric

Pushed as 787154b

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Monday, September 25, 2023 5:47 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 Platform/Intel/build_bios.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 9c95cfff76..b396017c8c 100755
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -207,7 +207,22 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None):
 
     _, _, result, return_code = execute_script(command, config, shell=shell)
     if return_code != 0:
-        build_failed(config)
+        #
+        # If the BaseTools build fails, then run a clean build and retry
+        #
+        clean_command = ["nmake", "-f",
+                         os.path.join(config["BASE_TOOLS_PATH"], "Makefile"),
+                         "clean"]
+        if os.name == "posix":
+            clean_command = ["make", "-C",
+                             os.path.join(config["BASE_TOOLS_PATH"]), "clean"]
+        _, _, result, return_code = execute_script(clean_command, config,
+                                                   shell=shell)
+        if return_code != 0:
+            build_failed(config)
+        _, _, result, return_code = execute_script(command, config, shell=shell)
+        if return_code != 0:
+            build_failed(config)
 
     #
     # build platform silicon tools
--
2.39.2.windows.1








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111421): https://edk2.groups.io/g/devel/message/111421
Mute This Topic: https://groups.io/mt/101587227/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

end of thread, other threads:[~2023-11-18  4:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <17884C66565E22C5.16687@groups.io>
2023-11-18  4:02 ` [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build Nate DeSimone
2023-09-26  0:47 Nate DeSimone
2023-11-17 23:48 ` Chiu, Chasel

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