scripts: sd_fusing: Fix re-reading partition table again
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 14 Aug 2024 07:42:48 +0000 (09:42 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 28 Oct 2024 11:28:47 +0000 (20:28 +0900)
Actually it turned out that any direct write access to the block device
might trigger kernel and udev to re-read partition table, so call
'udevadm settle' always after writing boot image directly to block
device.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3caf4ea6d3b89cb333e38f7b30dcf44685d73335

scripts/tizen/sd_fusing.py

index 22e4816e6d0928645743d8017e0c599640d7e617..917e381a8bd587588d79c1bb8db0ba5b939aff3f 100755 (executable)
@@ -1101,9 +1101,8 @@ def do_fuse_raw(f, name, target, sector):
     proc_dd.communicate()
     logging.info("Done")
 
-    # writing to sector zero might trigger kernel/udev to re-read partition table
-    if sector == 0:
-        wait_for_udev()
+    # direct writing to block device might trigger kernel/udev to re-read partition table
+    wait_for_udev()
 
     #TODO: verification