[PATCH] ubi: extend support for LED activity

yegorslists at googlemail.com yegorslists at googlemail.com
Thu Oct 2 13:35:50 CEST 2025


From: Yegor Yefremov <yegorslists at googlemail.com>

Add LED activity for ubi_dev_scan() and ubi_volume_read() routines.

Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
 cmd/ubi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmd/ubi.c b/cmd/ubi.c
index 56d7da82629..93de6f3aea2 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -549,6 +549,7 @@ int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size)
 	}
 	len = size > tbuf_size ? tbuf_size : size;
 
+	led_activity_blink();
 	tmp = offp;
 	off = do_div(tmp, vol->usable_leb_size);
 	lnum = tmp;
@@ -582,6 +583,7 @@ int ubi_volume_read(char *volume, char *buf, loff_t offset, size_t size)
 		env_set_hex("filesize", len_read);
 
 	free(tbuf);
+	led_activity_off();
 	return err;
 }
 
@@ -600,7 +602,9 @@ static int ubi_dev_scan(struct mtd_info *info, const char *vid_header_offset)
 	if (err)
 		return -err;
 
+	led_activity_blink();
 	err = ubi_init();
+	led_activity_off();
 	if (err)
 		return -err;
 
-- 
2.34.1



More information about the U-Boot mailing list