From: Jaehoon Chung Date: Wed, 7 Aug 2024 00:38:07 +0000 (+0900) Subject: scripts: sd_fusing: Check the raw_binary_table attribute X-Git-Tag: accepted/tizen/unified/20240808.160409~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=098472c46d682186866ef552362d1049a53baddf;p=platform%2Fkernel%2Fu-boot.git 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 --- 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")