public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues
@ 2022-04-29 20:51 Oram, Isaac W
  2022-05-02 20:54 ` Nate DeSimone
  0 siblings, 1 reply; 3+ messages in thread
From: Oram, Isaac W @ 2022-04-29 20:51 UTC (permalink / raw)
  To: devel; +Cc: Nate DeSimone, Chasel Chiu

Fix build warning in PlatformInfo.c.
Fix script invocation issues in build_board.py for AML
content build in WilsonCityRvp and JunctionCity.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../WhitleyOpenBoardPkg/JunctionCity/build_board.py   | 11 ++++++++---
 .../Platform/Pei/PlatformInfo/PlatformInfo.c          |  4 ++--
 .../WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py  | 11 ++++++++---
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 72d0c5089a..ccf7a8c55a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -62,7 +62,8 @@ def pre_build_ex(config, functions):
 
     execute_script = functions.get("execute_script")
 
-    command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+    # AML offset arch is X64, not sure if it matters.
+    command = ["build", "-a", "X64", "-t", config["TOOL_CHAIN_TAG"], "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
 
     if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
         ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
@@ -79,7 +80,11 @@ def pre_build_ex(config, functions):
     command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
     command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
 
-    _, _, _, code = execute_script(command, config)
+    shell = True
+    if os.name == "posix":  # linux
+        shell = False
+
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files")
@@ -109,7 +114,7 @@ def pre_build_ex(config, functions):
                os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
 
     # execute the command
-    _, _, _, code = execute_script(command, config)
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files")
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c b/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
index 0065819d83..439ce357f1 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
@@ -413,8 +413,8 @@ PdrGetPlatformInfo (
     return Status;
   }
 
-  if ((PlatformInfoHob->BoardId >= TypePlatformMin) && (PlatformInfoHob->BoardId <= TypePlatformMax) ||
-      (PlatformInfoHob->BoardId >= TypePlatformVendorMin) && (PlatformInfoHob->BoardId <= TypePlatformVendorMax)) {
+  if (((PlatformInfoHob->BoardId >= TypePlatformMin) && (PlatformInfoHob->BoardId <= TypePlatformMax)) ||
+      ((PlatformInfoHob->BoardId >= TypePlatformVendorMin) && (PlatformInfoHob->BoardId <= TypePlatformVendorMax))) {
     //
     // Valid Platform Identified
     //
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
index 5f625f5f92..e2d32d3e13 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
@@ -60,7 +60,8 @@ def pre_build_ex(config, functions):
 
     execute_script = functions.get("execute_script")
 
-    command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+    # AML offset arch is X64, not sure if it matters.
+    command = ["build", "-a", "X64", "-t", config["TOOL_CHAIN_TAG"], "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
 
     if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
         ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ")
@@ -77,7 +78,11 @@ def pre_build_ex(config, functions):
     command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
     command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
 
-    _, _, _, code = execute_script(command, config)
+    shell = True
+    if os.name == "posix":  # linux
+        shell = False
+
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files")
@@ -107,7 +112,7 @@ def pre_build_ex(config, functions):
                os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
 
     # execute the command
-    _, _, _, code = execute_script(command, config)
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files")
-- 
2.27.0.windows.1


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

* Re: [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues
  2022-04-29 20:51 [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues Oram, Isaac W
@ 2022-05-02 20:54 ` Nate DeSimone
  2022-05-02 21:33   ` Oram, Isaac W
  0 siblings, 1 reply; 3+ messages in thread
From: Nate DeSimone @ 2022-05-02 20:54 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io; +Cc: Chiu, Chasel

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Friday, April 29, 2022 1:51 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>
Subject: [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues

Fix build warning in PlatformInfo.c.
Fix script invocation issues in build_board.py for AML content build in WilsonCityRvp and JunctionCity.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../WhitleyOpenBoardPkg/JunctionCity/build_board.py   | 11 ++++++++---
 .../Platform/Pei/PlatformInfo/PlatformInfo.c          |  4 ++--
 .../WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py  | 11 ++++++++---
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 72d0c5089a..ccf7a8c55a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -62,7 +62,8 @@ def pre_build_ex(config, functions):
 
     execute_script = functions.get("execute_script")
 
-    command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+    # AML offset arch is X64, not sure if it matters.
+    command = ["build", "-a", "X64", "-t", config["TOOL_CHAIN_TAG"], 
+ "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
 
     if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
         ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ") @@ -79,7 +80,11 @@ def pre_build_ex(config, functions):
     command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
     command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
 
-    _, _, _, code = execute_script(command, config)
+    shell = True
+    if os.name == "posix":  # linux
+        shell = False
+
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files") @@ -109,7 +114,7 @@ def pre_build_ex(config, functions):
                os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
 
     # execute the command
-    _, _, _, code = execute_script(command, config)
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files") diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c b/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
index 0065819d83..439ce357f1 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/Platf
+++ ormInfo.c
@@ -413,8 +413,8 @@ PdrGetPlatformInfo (
     return Status;
   }
 
-  if ((PlatformInfoHob->BoardId >= TypePlatformMin) && (PlatformInfoHob->BoardId <= TypePlatformMax) ||
-      (PlatformInfoHob->BoardId >= TypePlatformVendorMin) && (PlatformInfoHob->BoardId <= TypePlatformVendorMax)) {
+  if (((PlatformInfoHob->BoardId >= TypePlatformMin) && (PlatformInfoHob->BoardId <= TypePlatformMax)) ||
+      ((PlatformInfoHob->BoardId >= TypePlatformVendorMin) && 
+ (PlatformInfoHob->BoardId <= TypePlatformVendorMax))) {
     //
     // Valid Platform Identified
     //
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
index 5f625f5f92..e2d32d3e13 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
@@ -60,7 +60,8 @@ def pre_build_ex(config, functions):
 
     execute_script = functions.get("execute_script")
 
-    command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+    # AML offset arch is X64, not sure if it matters.
+    command = ["build", "-a", "X64", "-t", config["TOOL_CHAIN_TAG"], 
+ "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
 
     if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
         ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ") @@ -77,7 +78,11 @@ def pre_build_ex(config, functions):
     command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
     command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
 
-    _, _, _, code = execute_script(command, config)
+    shell = True
+    if os.name == "posix":  # linux
+        shell = False
+
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files") @@ -107,7 +112,7 @@ def pre_build_ex(config, functions):
                os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
 
     # execute the command
-    _, _, _, code = execute_script(command, config)
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files")
--
2.27.0.windows.1


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

* Re: [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues
  2022-05-02 20:54 ` Nate DeSimone
@ 2022-05-02 21:33   ` Oram, Isaac W
  0 siblings, 0 replies; 3+ messages in thread
From: Oram, Isaac W @ 2022-05-02 21:33 UTC (permalink / raw)
  To: Desimone, Nathaniel L, devel@edk2.groups.io; +Cc: Chiu, Chasel

Pushed as 38855c561f..6b05b8acd6

-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com> 
Sent: Monday, May 2, 2022 1:54 PM
To: Oram, Isaac W <isaac.w.oram@intel.com>; devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>
Subject: RE: [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Friday, April 29, 2022 1:51 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>
Subject: [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues

Fix build warning in PlatformInfo.c.
Fix script invocation issues in build_board.py for AML content build in WilsonCityRvp and JunctionCity.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../WhitleyOpenBoardPkg/JunctionCity/build_board.py   | 11 ++++++++---
 .../Platform/Pei/PlatformInfo/PlatformInfo.c          |  4 ++--
 .../WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py  | 11 ++++++++---
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index 72d0c5089a..ccf7a8c55a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -62,7 +62,8 @@ def pre_build_ex(config, functions):
 
     execute_script = functions.get("execute_script")
 
-    command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+    # AML offset arch is X64, not sure if it matters.
+    command = ["build", "-a", "X64", "-t", config["TOOL_CHAIN_TAG"], 
+ "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
 
     if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
         ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ") @@ -79,7 +80,11 @@ def pre_build_ex(config, functions):
     command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
     command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
 
-    _, _, _, code = execute_script(command, config)
+    shell = True
+    if os.name == "posix":  # linux
+        shell = False
+
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files") @@ -109,7 +114,7 @@ def pre_build_ex(config, functions):
                os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
 
     # execute the command
-    _, _, _, code = execute_script(command, config)
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files") diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c b/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
index 0065819d83..439ce357f1 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/PlatformInfo.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Platform/Pei/PlatformInfo/Platf
+++ ormInfo.c
@@ -413,8 +413,8 @@ PdrGetPlatformInfo (
     return Status;
   }
 
-  if ((PlatformInfoHob->BoardId >= TypePlatformMin) && (PlatformInfoHob->BoardId <= TypePlatformMax) ||
-      (PlatformInfoHob->BoardId >= TypePlatformVendorMin) && (PlatformInfoHob->BoardId <= TypePlatformVendorMax)) {
+  if (((PlatformInfoHob->BoardId >= TypePlatformMin) && (PlatformInfoHob->BoardId <= TypePlatformMax)) ||
+      ((PlatformInfoHob->BoardId >= TypePlatformVendorMin) && 
+ (PlatformInfoHob->BoardId <= TypePlatformVendorMax))) {
     //
     // Valid Platform Identified
     //
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
index 5f625f5f92..e2d32d3e13 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
@@ -60,7 +60,8 @@ def pre_build_ex(config, functions):
 
     execute_script = functions.get("execute_script")
 
-    command = ["build", "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
+    # AML offset arch is X64, not sure if it matters.
+    command = ["build", "-a", "X64", "-t", config["TOOL_CHAIN_TAG"], 
+ "-D", "MAX_SOCKET=" + config["MAX_SOCKET"]]
 
     if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
         ext_build_flags = config["EXT_BUILD_FLAGS"].split(" ") @@ -77,7 +78,11 @@ def pre_build_ex(config, functions):
     command.append(os.path.join(config["WORKSPACE"], "PreBuildReport.txt"))
     command.append("--log=" + os.path.join(config["WORKSPACE"], "PreBuild.log"))
 
-    _, _, _, code = execute_script(command, config)
+    shell = True
+    if os.name == "posix":  # linux
+        shell = False
+
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files") @@ -107,7 +112,7 @@ def pre_build_ex(config, functions):
                os.path.join(config["BUILD_X64"], aml_offsets_split[0], aml_offsets_split[1], aml_offsets_split[1], "OUTPUT", os.path.dirname(relative_dsdt_file_path), dsdt_file_root_ext[0] + ".offset.h")]
 
     # execute the command
-    _, _, _, code = execute_script(command, config)
+    _, _, _, code = execute_script(command, config, shell=shell)
     if code != 0:
         print(" ".join(command))
         print("Error re-generating PlatformOffset header files")
--
2.27.0.windows.1


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

end of thread, other threads:[~2022-05-02 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-29 20:51 [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues Oram, Isaac W
2022-05-02 20:54 ` Nate DeSimone
2022-05-02 21:33   ` Oram, Isaac W

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