gen_hashed_bin.py: open file in binary mode

By default Python tries to open files in text mode. This is
okay for python2, because it uses 8-bit encoding.
But python3 tries to decode file as utf-8 encoded and fails,
because it is a binary file.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/scripts/gen_hashed_bin.py b/scripts/gen_hashed_bin.py
index 25a9596..67b2b04 100755
--- a/scripts/gen_hashed_bin.py
+++ b/scripts/gen_hashed_bin.py
@@ -67,7 +67,7 @@
 def append_hashes(outf, in_fname):
     page_size = 4 * 1024
 
-    inf = open(in_fname, 'r')
+    inf = open(in_fname, 'rb')
     while True:
         page = inf.read(page_size)
         if len(page) == page_size: