aboutsummaryrefslogtreecommitdiff
path: root/util/exynos/variable_cksum.py
diff options
context:
space:
mode:
authorYilin Yang <kerker@google.com>2020-09-17 09:14:11 +0800
committerHung-Te Lin <hungte@chromium.org>2020-09-18 08:00:39 +0000
commit1502494cbac65282f5344b2b0b7ca5ea03cd0c76 (patch)
tree4ef5d42d60ff0d184b5b2086ef4d93e45930aaf4 /util/exynos/variable_cksum.py
parentf944e619dd2739d268fc7eaea85d8acdf91bbfb8 (diff)
util/exynos: Port *_cksum.py to python3
BUG=chromium:1023662 TEST=1. Create a tiny file `in.txt` as input 2. Run `fixed_cksum.py in.txt out.txt 20` with py2 and py3 version, the output is the same 3. Run `variable_cksum.py in.txt out.txt` with py2 and py3 version, the output is the same Signed-off-by: Yilin Yang <kerker@google.com> Change-Id: I9428269dfb826a3a95fffef9ea3f7c1a7107ef84 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45460 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'util/exynos/variable_cksum.py')
-rwxr-xr-xutil/exynos/variable_cksum.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/exynos/variable_cksum.py b/util/exynos/variable_cksum.py
index 62a76cc045..4321f8e53c 100755
--- a/util/exynos/variable_cksum.py
+++ b/util/exynos/variable_cksum.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -27,7 +27,7 @@ def main(argv):
data = in_file.read()
header = struct.pack(header_format,
struct.calcsize(header_format) + len(data),
- sum(map(ord, data)),
+ sum(data),
0, 0)
out_file.write(header + data)