summaryrefslogtreecommitdiff
path: root/util/exynos
diff options
context:
space:
mode:
Diffstat (limited to 'util/exynos')
-rw-r--r--util/exynos/description.md2
-rwxr-xr-xutil/exynos/fixed_cksum.py4
-rwxr-xr-xutil/exynos/variable_cksum.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/util/exynos/description.md b/util/exynos/description.md
index 26cd20d3a4..c039c913f3 100644
--- a/util/exynos/description.md
+++ b/util/exynos/description.md
@@ -1 +1 @@
-Computes and fills Exynos ROM checksum (for BL1 or BL2). `Python2`
+Computes and fills Exynos ROM checksum (for BL1 or BL2). `Python3`
diff --git a/util/exynos/fixed_cksum.py b/util/exynos/fixed_cksum.py
index c6a9ddae61..0ae7e4f6f8 100755
--- a/util/exynos/fixed_cksum.py
+++ b/util/exynos/fixed_cksum.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -28,7 +28,7 @@ def main(argv):
checksum_size = struct.calcsize(checksum_format)
data_size = size - checksum_size
assert len(data) <= data_size
- checksum = struct.pack(checksum_format, sum(map(ord, data)))
+ checksum = struct.pack(checksum_format, sum(data))
out_file.write(data + bytearray(data_size - len(data)) + checksum)
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)