summaryrefslogtreecommitdiffstats
path: root/src/build/parsAndCutElf.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/build/parsAndCutElf.py')
-rwxr-xr-xsrc/build/parsAndCutElf.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/build/parsAndCutElf.py b/src/build/parsAndCutElf.py
index f6a71b9e..624d3261 100755
--- a/src/build/parsAndCutElf.py
+++ b/src/build/parsAndCutElf.py
@@ -23,6 +23,7 @@
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
+from __future__ import print_function
import os
import subprocess
import re
@@ -36,7 +37,7 @@ def parserElf(argv):
outdir = argv[2]
img = argv[3]
except:
- print "Missing argument : arg[0] ddlevel; arg[1] output directory; arg[2] img (seeprom/pibmem)"
+ print("Missing argument : arg[0] ddlevel; arg[1] output directory; arg[2] img (seeprom/pibmem)")
exit(-1)
SBE_OUT = outdir+"/sbe_"+img+"_"+ddlevel+".out"
SBE_BIN = outdir+"/sbe_"+img+"_"+ddlevel+".bin"
@@ -53,7 +54,7 @@ def parserElf(argv):
if( (line.find(firstSection) != -1) ):
tokens = line.split();
startSize = int( tokens[5], 16 )
- print startSize
+ print(startSize)
break;
# Get the location of sbe end
@@ -64,7 +65,7 @@ def parserElf(argv):
endSize = int( tokens[0], 16 );
break;
- print endSize;
+ print(endSize)
if( (startSize == 0) or (endSize == 0)):
exit(-1)
@@ -72,7 +73,7 @@ def parserElf(argv):
cmd1 = "dd skip=" + str(startSize) + " count=" + str(endSize) + " if="+SBE_OUT+" of="+SBE_BIN+" bs=1"
rc = os.system(cmd1)
if ( rc ):
- print "ERROR running %s: %d "%( cmd1, rc )
+ print("ERROR running %s: %d "%( cmd1, rc ))
exit(-1)
parserElf(sys.argv)
OpenPOWER on IntegriCloud