]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: ResetVector Tool Support for Python 3
authorAshraf Ali S <ashraf.ali.s@intel.com>
Fri, 23 Jul 2021 08:25:30 +0000 (13:55 +0530)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 9 Sep 2021 13:16:48 +0000 (13:16 +0000)
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

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Harry Han <harry.han@intel.com>
Cc: Catharine West <catharine.west@intel.com>
Cc: Sangeetha V <sangeetha.v@intel.com>
Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
UefiCpuPkg/ResetVector/Vtf0/Build.py
UefiCpuPkg/ResetVector/Vtf0/Tools/FixupForRawSection.py

index 343c53b5ff30bd5a919027674c1bed1fec26bdf5..55f4edd87be1c86bd40dee4bbf50cb08a6b80cfe 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Automate the process of building the various reset vector types\r
 #\r
-#  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
@@ -33,7 +33,7 @@ for arch in ('ia32', 'x64'):
             'Vtf0.nasmb',\r
             )\r
         ret = RunCommand(commandLine)\r
-        print '\tASM\t' + output\r
+        print('\tASM\t' + output)\r
         if ret != 0: sys.exit(ret)\r
 \r
         commandLine = (\r
@@ -41,7 +41,7 @@ for arch in ('ia32', 'x64'):
             'Tools/FixupForRawSection.py',\r
             output,\r
             )\r
-        print '\tFIXUP\t' + output\r
+        print('\tFIXUP\t' + output)\r
         ret = RunCommand(commandLine)\r
         if ret != 0: sys.exit(ret)\r
 \r
index c77438a0ceaf3a9084168556076f67bbdeaab561..de771eba22777f2ba51080308fd00f1c011c85b9 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Apply fixup to VTF binary image for FFS Raw section\r
 #\r
-#  Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2008 - 2021, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
@@ -15,6 +15,6 @@ c = ((len(d) + 4 + 7) & ~7) - 4
 if c > len(d):\r
     c -= len(d)\r
     f = open(sys.argv[1], 'wb')\r
-    f.write('\x90' * c)\r
+    f.write(b'\x90' * c)\r
     f.write(d)\r
     f.close()\r