From 11eff058c2b847b5e09fdad7060ebcaf31e86c80 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Wed, 14 Aug 2024 09:42:48 +0200 Subject: [PATCH] scripts: sd_fusing: Fix re-reading partition table again 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 Change-Id: I3caf4ea6d3b89cb333e38f7b30dcf44685d73335 --- sd_fusing.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sd_fusing.py b/sd_fusing.py index 22e4816..917e381 100755 --- a/sd_fusing.py +++ b/sd_fusing.py @@ -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 -- 2.34.1