From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.15388.1651265510926329291 for ; Fri, 29 Apr 2022 13:51:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=fgMIgI7Q; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651265511; x=1682801511; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GFYpqlz2z3g8feZVt0/RA36EmEldvVoSXxaLvwujEyc=; b=fgMIgI7Q+zOrom5OC+S+WFLqxBhZwnnL3hg+n9bwXIUyfZwGC3DEMJEW lYXw1cp4/td1eZoWVAzBpg5Nn2iq3OONwCT2OG5sNDbNQEUYc6qlA1Q6U daoU9k7iuZFsB5HIAN+jhscO0sWEq+oyd2CkRjoxBKn1mfRrMg4yHQ3jY b6hHxF4s3Mq1mNnLYhHpWumsNCPhJxZZoyO6HqpbvM61F2iLNQohY4POP 3jZ87LJCYQZWBil0uJziD5i4LafMqhC1Ngy1wlWoh/wVlYBs5b5EcfcGo +y0nUthA+S0N2f8JIPEFheWwsSdbfYdE9ecobJrWhtA/jxitZNYemsROv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10332"; a="353199433" X-IronPort-AV: E=Sophos;i="5.91,186,1647327600"; d="scan'208";a="353199433" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 13:51:36 -0700 X-IronPort-AV: E=Sophos;i="5.91,186,1647327600"; d="scan'208";a="582391717" Received: from iworam-desk.amr.corp.intel.com ([10.24.80.243]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 13:51:36 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Nate DeSimone , Chasel Chiu Subject: [PATCH 1/1] WhitleyOpenBoardPkg/Build: Fix GCC build issues Date: Fri, 29 Apr 2022 13:51:24 -0700 Message-Id: <20220429205124.1530-1-isaac.w.oram@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Chasel Chiu Signed-off-by: Isaac Oram --- .../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