Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
util/rockchip: port make_idb.py to python3
converted with 2to3 and manually changed shebang to reflect python3. Tested by calling the script on the command line.
Change-Id: I0e399c491ab07cd3e7fda24231cf3f7611b341e3 Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M util/rockchip/make_idb.py 1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/42319/1
diff --git a/util/rockchip/make_idb.py b/util/rockchip/make_idb.py index 12cd130..4f04676 100755 --- a/util/rockchip/make_idb.py +++ b/util/rockchip/make_idb.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-2-Clause
import struct @@ -7,10 +7,10 @@
class IDBTool: def __init__(self): - print "Initialize IDBTool" + print("Initialize IDBTool")
def p_rc4(self, buf, length): - key = (124,78,3,4,85,5,9,7,45,44,123,56,23,13,23,17) + key = (124, 78, 3, 4, 85, 5, 9, 7, 45, 44, 123, 56, 23, 13, 23, 17) K = key * 16 S = [i for i in range(256)]
@@ -79,7 +79,7 @@ fout.write(''.join(idblock)) fout.write(''.join(blank))
- for s in xrange(0, sectors * SECTOR_SIZE, PAGE_ALIGN * SECTOR_SIZE): + for s in range(0, sectors * SECTOR_SIZE, PAGE_ALIGN * SECTOR_SIZE): fout.write(''.join(buf[s : s + PAGE_ALIGN * SECTOR_SIZE])) fout.write(''.join(blank)) else: @@ -90,11 +90,11 @@ sys.exit("Failed to write data to : " + to_file) finally: fout.close() - print "DONE" + print("DONE")
def usage(): - print "Usage: make_idb.py [--chip=RKXX] [--enable-rc4] [--enable-align] [--to=out] --from=in" - print " --chip: default is RK32" + print("Usage: make_idb.py [--chip=RKXX] [--enable-rc4] [--enable-align] [--to=out] --from=in") + print(" --chip: default is RK32")
if __name__ == '__main__': rc4_flag = align_flag = False
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42319/1/util/rockchip/make_idb.py File util/rockchip/make_idb.py:
https://review.coreboot.org/c/coreboot/+/42319/1/util/rockchip/make_idb.py@4... PS1, Line 49: pages = (sectors - 1) / PAGE_ALIGN + 1 I think all these divisions need to use // (I'm surprised 2to3 doesn't do that automatically).
Hello build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42319
to look at the new patch set (#2).
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
util/rockchip: port make_idb.py to python3
converted with 2to3 and manually changed shebang to reflect python3. Tested by calling the script on the command line.
Change-Id: I0e399c491ab07cd3e7fda24231cf3f7611b341e3 Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M util/rockchip/make_idb.py 1 file changed, 9 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/42319/2
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
Patch Set 1:
Thanks for the tip, Julius.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
Patch Set 2: Code-Review+2
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
Patch Set 2: Code-Review+2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
Patch Set 2:
recommend to replace this by CB:45447 because this one may fail in handling bytes.
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/42319 )
Change subject: util/rockchip: port make_idb.py to python3 ......................................................................
Abandoned