From: "alexander.heinisch via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: kasturi.shekar@siemens.com,
Alexander Heinisch <alexander.heinisch@siemens.com>
Subject: [PATCH] isar-installer: Generate textual output only in unattended mode.
Date: Mon, 22 Sep 2025 18:43:59 +0200 [thread overview]
Message-ID: <20250922164359.1322947-1-alexander.heinisch@siemens.com> (raw)
From: Alexander Heinisch <alexander.heinisch@siemens.com>
Dialog renders textual output unreadable, thus, useless.
Thus, logs output via a serial, or piped to a file are useless when combined with dialog.
Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
.../files/usr/bin/deploy-image-wic.sh | 52 ++++++++++---------
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
index 333762f1..779ed34a 100755
--- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
+++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
@@ -157,32 +157,34 @@ version_ge() {
fi
}
-# Get bmap-tools version
-bmap_version=$(bmaptool --version | awk '{ print $NF }')
-
-if version_ge "$bmap_version" "3.6"; then
- # Create a named pipe for progress communication
- progress_pipe="/tmp/progress"
- if ! mkfifo "$progress_pipe"; then
- echo "Error: Failed to create named pipe $progress_pipe"
- exit 1
- fi
-
- # Add psplash pipe to bmap_options
- bmap_options="$bmap_options --psplash-pipe=$progress_pipe"
- quiet_flag="-q"
-
- # Initialize the dialog gauge and update it dynamically
- (
- while true; do
- if read -r line < "$progress_pipe"; then
- percentage=$(echo "$line" | awk '{ print $2 }')
- echo "$percentage"
- fi
- done
- ) | dialog --gauge "Flashing image, please wait..." 10 70 0 &
+if ! $installer_unattended; then
+ # Get bmap-tools version
+ bmap_version=$(bmaptool --version | awk '{ print $NF }')
+
+ if version_ge "$bmap_version" "3.6"; then
+ # Create a named pipe for progress communication
+ progress_pipe="/tmp/progress"
+ if ! mkfifo "$progress_pipe"; then
+ echo "Error: Failed to create named pipe $progress_pipe"
+ exit 1
+ fi
- gauge_pid=$!
+ # Add psplash pipe to bmap_options
+ bmap_options="$bmap_options --psplash-pipe=$progress_pipe"
+ quiet_flag="-q"
+
+ # Initialize the dialog gauge and update it dynamically
+ (
+ while true; do
+ if read -r line < "$progress_pipe"; then
+ percentage=$(echo "$line" | awk '{ print $2 }')
+ echo "$percentage"
+ fi
+ done
+ ) | dialog --gauge "Flashing image, please wait..." 10 70 0 &
+
+ gauge_pid=$!
+ fi
fi
if ! bmaptool $quiet_flag copy $bmap_options "$installer_image_uri" "$installer_target_dev"; then
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250922164359.1322947-1-alexander.heinisch%40siemens.com.
next reply other threads:[~2025-09-22 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 16:43 alexander.heinisch via isar-users [this message]
2025-10-14 14:59 ` Zhihang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250922164359.1322947-1-alexander.heinisch@siemens.com \
--to=isar-users@googlegroups.com \
--cc=alexander.heinisch@siemens.com \
--cc=kasturi.shekar@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox