Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45447 )
Change subject: util/rockchip: Port make_idb.py to python3 ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/45447/5/util/rockchip/make_idb.py File util/rockchip/make_idb.py:
https://review.coreboot.org/c/coreboot/+/45447/5/util/rockchip/make_idb.py@5... PS5, Line 59: B b for consistency. Or use "B" consistently throughout this file.
https://review.coreboot.org/c/coreboot/+/45447/5/util/rockchip/make_idb.py@6... PS5, Line 60: buf[:4] = self.bytesToList(chip) If we're modifying it like this, I think we should use bytearray, which simplfies things:
buf = bytearray(sectors * SECTOR_SIZE) buf[:4] = chip buf[4 : 4+data_len] = data
Writing to file also becomes simpler:
fout.write(buf)
https://review.coreboot.org/c/coreboot/+/45447/5/util/rockchip/make_idb.py@1... PS5, Line 133: chip.encode('utf-8') It's better to encode 'chip' inside makeIDB() in my opinion.