From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.5600.1627029652424878703 for ; Fri, 23 Jul 2021 01:40:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ashraf.ali.s@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10053"; a="191431308" X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="191431308" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 01:40:51 -0700 X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="502434013" Received: from basfe001.gar.corp.intel.com ([10.66.244.207]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 01:40:48 -0700 From: "Ashraf Ali S" To: devel@edk2.groups.io Cc: Ashraf Ali S , Ray Ni , Rahul Kumar , Debkumar De , Harry Han , Catharine West , Sangeetha V Subject: [PATCH v2 1/2] UefiCpuPkg: ResetVector Tool Support for Python 3 Date: Fri, 23 Jul 2021 14:10:22 +0530 Message-Id: <20210723084023.22157-1-ashraf.ali.s@intel.com> X-Mailer: git-send-email 2.30.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3506 Build Scrips for Reset Vector currently based on Python 2 which is already EOL, needs to modify the build script based on Python 3 Cc: Ray Ni Cc: Rahul Kumar Cc: Debkumar De Cc: Harry Han Cc: Catharine West Cc: Sangeetha V Signed-off-by: Ashraf Ali S --- UefiCpuPkg/ResetVector/Vtf0/Build.py | 6 +++--- UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/ResetVector/Vtf0/Build.py b/UefiCpuPkg/ResetVector/Vtf0/Build.py index 343c53b5ff..55f4edd87b 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Build.py +++ b/UefiCpuPkg/ResetVector/Vtf0/Build.py @@ -1,7 +1,7 @@ ## @file # Automate the process of building the various reset vector types # -# Copyright (c) 2009, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -33,7 +33,7 @@ for arch in ('ia32', 'x64'): 'Vtf0.nasmb', ) ret = RunCommand(commandLine) - print '\tASM\t' + output + print('\tASM\t' + output) if ret != 0: sys.exit(ret) commandLine = ( @@ -41,7 +41,7 @@ for arch in ('ia32', 'x64'): 'Tools/FixupForRawSection.py', output, ) - print '\tFIXUP\t' + output + print('\tFIXUP\t' + output) ret = RunCommand(commandLine) if ret != 0: sys.exit(ret) diff --git a/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py b/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py index c77438a0ce..de771eba22 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py +++ b/UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py @@ -1,7 +1,7 @@ ## @file # Apply fixup to VTF binary image for FFS Raw section # -# Copyright (c) 2008, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -15,6 +15,6 @@ c = ((len(d) + 4 + 7) & ~7) - 4 if c > len(d): c -= len(d) f = open(sys.argv[1], 'wb') - f.write('\x90' * c) + f.write(b'\x90' * c) f.write(d) f.close() -- 2.30.2.windows.1