summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2024-08-07 09:38:07 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2024-08-07 10:01:18 +0900
commit098472c46d682186866ef552362d1049a53baddf (patch)
tree46d1e62f8c0dba1500c2342fc04d126d73a61722
parent51a197ce2ea249ed96b9e4990a118e921e56cdbc (diff)
downloadu-boot-098472c46d682186866ef552362d1049a53baddf.tar.gz
u-boot-098472c46d682186866ef552362d1049a53baddf.tar.bz2
u-boot-098472c46d682186866ef552362d1049a53baddf.zip
scripts: sd_fusing: Check the raw_binary_table attribute
If there is no raw_binary_table, it doesn't work fine with below message. RPI4/VF2 don't have raw_binary_table attribute. AttributeError: 'Rpi4' object has no attribute 'raw_binary_table' Change-Id: I379a87d9731fe82a3a32f54b38eb533b1ca4f885 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rwxr-xr-xscripts/tizen/sd_fusing.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py
index ba05029f0f..a40cbb7ed8 100755
--- a/scripts/tizen/sd_fusing.py
+++ b/scripts/tizen/sd_fusing.py
@@ -15,7 +15,7 @@ import sys
import tarfile
import tempfile
-__version__ = "1.1.8"
+__version__ = "1.1.9"
Format = False
Device = ""
@@ -176,10 +176,13 @@ class SdFusingTarget:
return [self.binaries.get(binary, None)]
def get_raw_binary_sector(self, binary):
- for entry in self.raw_binary_table:
- if entry['binaries'] == binary:
- return entry['start_sector'];
- return None
+ if hasattr(self, "raw_binary_table"):
+ for entry in self.raw_binary_table:
+ if entry['binaries'] == binary:
+ return entry['start_sector'];
+ return None
+ else:
+ return None
def ensure_parttable(self):
logging.notice(f"Verifying that partition table on {Device} matches target specification")