From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 13 Mar 2025 14:32:50 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f61.google.com (mail-wr1-f61.google.com [209.85.221.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52DDWnaY026270 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 13 Mar 2025 14:32:49 +0100 Received: by mail-wr1-f61.google.com with SMTP id ffacd0b85a97d-3913f97d115sf489880f8f.0 for ; Thu, 13 Mar 2025 06:32:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1741872764; cv=pass; d=google.com; s=arc-20240605; b=IcQh1tiFOacBR8YSFEWGxvdiJemFlnTHyxXEzzkLOY2d3/3E9G+BY2sSaTcfvkmqFD z1ybwvyqqMfRyhpcoRCItNPKNCF839pJ5g3HgJSlUmuN4E+1h3w0tDwTVFlCZT2pJUP8 zx5UeWqOYwe9tXK/aRFZYo4QTLlWiMtjsoRwMVV0rSyr4DM0/DYNcfXRRFPTPIVFFbGl ZUewDGeOQ1FqlQvj6ac8DyfjodlM7xUckziGG9W1Qsf0Mlg1bRx7iIIYLPY++2+B+S9n U01upljVdGPx/HSiRJMYH08U85B2s2FkA4dKlc0T7L58iGZZ7uNsdeOl85OKEp99Bkqf KfyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:to :from:subject:message-id:sender:dkim-signature; bh=GGxG1dm0JOlqbtOnaCQz2/mhAsDFbuJdp+nZA5LewW0=; fh=3GHjGeHjWvaZ0w0XWR8fj2iZnyXS0PlUFNW8tTw1mBQ=; b=e0zAtIJzloLIODebc4ZCPQpkyimndoxVEwX4CJqFMpgTLnNEkd3mXfPU3saeZWexvn zQKzykceYtaxe8ovgtRl9PVER7Kbsyim5QiWM8WWiik3AVo4+/k0mhFDO9OatCdbQulV gOMCBxB85Qs/iHHMLbWD9/gxSlsabKqVTlcBSTNQ0ewYpK7YFZzvAk0Id1oZtYsUfkbd SSA+BbVdY158zSHqodMmF585wNNFyiOSw6+BBMG1uBCfHZpIB5P08Ub05v9+VzK3o6Ms luyrq5BPbUSz9kk8wg1xyZ/cgfR95ynnMUm3Cu3kJCxmlNSf0Dc+BUkNNR4Yx9ZYttih A/ng==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1741872764; x=1742477564; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:user-agent:content-transfer-encoding :autocrypt:references:in-reply-to:date:to:from:subject:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=GGxG1dm0JOlqbtOnaCQz2/mhAsDFbuJdp+nZA5LewW0=; b=umN9YaRWNzPX7E+dI9qnc0/rlHnZ3t00laZn+U0Wfz7+DkHy1emH+itWjjvCXfV+gF sNA0BpWH9BVATdM0XixnnJX7Ag8DegUV9/oH6e7o9b+cO+k6d06aqq91aNak67oOw6Em awOpibW6gK8m6uq+pxj4VgXhhQyNGgplge+MaCGT26wGqLdVt8DXKnW3BAvMw5hSTV3w yGyPQuwKTqiefM3nsYizu4LGe6VpO7iXJvxpoDTyHtY3MIbRg7ILxsXaaZyD/j4U0PpL jXft9AyjZe5a11AUYn2p9q6AhWaMvwdC/akUnpsAt7k+mUaAvMgi0G238d4Yz9FYgeeM NIow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741872764; x=1742477564; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:to:from:subject:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=GGxG1dm0JOlqbtOnaCQz2/mhAsDFbuJdp+nZA5LewW0=; b=LeQmj2XKN4BjwqTxwwmvuk0/WiSeaSmJCocOrUid+PwdibmuozLvgm9y1o61Zd+WC6 +w4BbazXa6ODi1YUpsoe7iUeVl9u22DZlE2kt52ZhaIwivvwGFdF9SbagSf/yfpL5HvA qdBjg14n15qV+Ap/DJjLpHrzGagMJL+nvIFyehArh7be6/cXhLMdY9qG9KLBowRphtUB mlB5g6WQ5e0XQj+GD+xrI8dU6P1VukcsBkCy1Bsi54J5rWn8xTh2aKRHN4meaRcGM2Kp jbvZqHpkULPuHju0FKoeCQkGDzrxuX4/zTeY40pYeFx4ND3NlSSa911mYcgOmC+OObNp eSJA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUS2gQvcPsANeET9yfZKtsJTmTSYdgjaaryj/bvcHwwH1bECrmzjWSHqBwuto1tSS+ICdGw@ilbers.de X-Gm-Message-State: AOJu0YyKdklLSARc3TFT5QLUEHzNOxZgYHdQ/02/NUEn9ZVXgmtbxuGz j4Ex3JkBY9DEDPoKiNmS5YJNVuuIq5L86GnjwEy+N27kycJXfmF/ X-Google-Smtp-Source: AGHT+IHiUVY9sEyDzfGzLe6Heut33Q5Vk/1IpfPFP9SaYYbynP/HzBI1dvZm/IqKonaMg91CdlYEnQ== X-Received: by 2002:a5d:5f46:0:b0:391:386d:5971 with SMTP id ffacd0b85a97d-395b7a5c328mr2166664f8f.14.1741872762961; Thu, 13 Mar 2025 06:32:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=Adn5yVHj7jCXx+jmsad5MqEgADc4Xg82KvrBWQIfVa/g7/JF+w== Received: by 2002:adf:e84c:0:b0:390:d6ab:6c26 with SMTP id ffacd0b85a97d-39564338e34ls264914f8f.0.-pod-prod-00-eu; Thu, 13 Mar 2025 06:32:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWKYiCeLpTedbZEqgUme/AoyGECX9ID/K7uJc7jNBkT6Yt/XzaHYBrqoKlAPfLWvh7VVP/Klh6btpop@googlegroups.com X-Received: by 2002:a05:6000:1847:b0:38d:b52d:e11c with SMTP id ffacd0b85a97d-395b7e32190mr1872890f8f.15.1741872760643; Thu, 13 Mar 2025 06:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741872760; cv=none; d=google.com; s=arc-20240605; b=DEBxvMv3sgZ5PO9WtHhgosbpoIwfARmpBZVcfOj75OXEhPYYYtCR2NvPSqbudi4CG9 mODKFjNeW4J/bM9bwi2y48Wj2ZF3EH9/06G9Ejii81ZB+ciONP60sOwgjtOhgISFaZqU n59EH1+2ALJlxqBCTOLkbReIEK8z+waRXJClI6gHQKYryp1EWT7WGI/0/23PjoiBSjd/ /xfMXxGLr8ucPPRf/TszmrsEHwDjGl8Kcvj4lDC2c7YtDzeFfI36vU3i48sGKWIJi7u0 vbl6ecAx0VC+US+DcLzMIy4IC+f8shvcdaDcDuSkLwzPa7nHSh6guML/EPkqBuHGLoK3 U2eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id; bh=An1JzA9eQeo1PzrqEbmPiN6TNHmfFjIORaXZCiNDdaE=; fh=xEaguVBF0tSuSVpJYsv0jH295li1pT99R8G73C5QyKg=; b=MqlcM8b1IZNE/e6vAeg2AjND6AWco5AdYsK0mQD30XQSojnTuVDunogsmlEx6vF5xb jnT/L7vLoFJ4rzYMfYTPnjeAuLgXJq5sL4ihwgVD0539PQJGPTPN/Iwd5WKphTBh68+L zPnB/pG3d3FqOAN26P2lZUvp0ZycuKvLBID3KaPgL+SJlYUxhrL5OwZY+kT0ScCTZmP2 19vjTClqLg5L2rLYaAC9N55+VVS3R2L3tR7iyc5SLCZAtPfMjNK08McjV06zI9xRY7QC QZN5H+mGfg+aL2ZmAmT+FtywG9HseFlAwjQ9U3EHyD0dGQZiisSUz3xX4UYsHCu/SEw0 R6Gg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-395c518d934si13752f8f.0.2025.03.13.06.32.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Mar 2025 06:32:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [IPv6:::1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 52DDWcJV026259 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Mar 2025 14:32:39 +0100 Message-ID: <70005140a8ebc156582f05349d3e8cead21d7bd1.camel@ilbers.de> Subject: Re: [PATCH v3] isar-installer: show progress bar during bmaptool copy process From: Uladzimir Bely To: Kasturi Shekar , isar-users@googlegroups.com Date: Thu, 13 Mar 2025 16:32:38 +0300 In-Reply-To: <20250310070304.272969-1-kasturi.shekar@siemens.com> References: <20250310070304.272969-1-kasturi.shekar@siemens.com> Autocrypt: addr=ubely@ilbers.de; prefer-encrypt=mutual; keydata=mQENBGO2eUkBCACtT+T3OrPVSExBmqfgXT3lp9XcdxRzjYp26wezkgYjjBXaf36bxtaAf S471VoQtpar0RVeFfW7WDDdfX9ZclSj36zBQe+RVSJzoNoNQfjOXWuSHb5Z+cpAFtqBY4muxK4+ia IlLJd6CN3ejOsLHATtCeHHq8wi0z2T+KdLQO+wQRgo2hjj0Lp9pGTrKJry50HP/o7Vbdu14dOx2xq r8+wPc6SQbBIrcqaa4MqCQC00vQG7eXvo+k2MOw59FDdpMH0KR9mHgp3u/s4I+4YRBArukt9G9xz/ rsEFmxAIBC6N/a6Hzwg4puc91n7ABDsPg8Vp+X3MDraujN0dvR6OKVNtABEBAAG0IFVsYWR6aW1pc iBCZWx5IDx1YmVseUBpbGJlcnMuZGU+iQFOBBMBCAA4FiEEJqPNVhVGyk12Eh+PAUQYBM/2FkoFAm O2eUkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQAUQYBM/2FkprlAgAmuna8Hm9EyoEtTl DBGDg6Zm4ZLp5ffvZBE946h92jepDrteoxsJ7pSzJVC2HmDLa4iZUao7lLLbDsUj5x45/iLJcqBZK k3YnAxP2r6a+kI+1VVQY1pxdG1nlJAbdNzoojm/qmezNPSrqni61KVMQKsXBCWhIjSXDSM9CsBj21 a+9qaVqfxovJGTn9lgrZO+xzKQNMKZeOouJlscVuFj21P0ww3/YENiU/nMeTSuYypO76mDtAd08Jo nc3yuHa9MJGei5ixN3wT+IrGR2aL2hdw2M6NgH7sYbL2Zi4ugD6RXHJai1Bh2yvFSVqSQ+M6QOInT 4ud7wslm1XRB065dXtA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: B02TztGpYc9V On Mon, 2025-03-10 at 12:33 +0530, 'Kasturi Shekar' via isar-users wrote: > - Added support for a progress gauge using a named pipe to capture > and display > =C2=A0percentage progress when using `bmaptool`. > - The progress bar is displayed only when the `bmaptool` version is > 3.8 or above, > =C2=A0as versions prior to 3.8 has some issues with `--psplash-pipe` flag= . > - For `bmaptool` versions below 3.8, the image copy process continues > without a > =C2=A0progress bar to maintain compatibility. > - The gauge uses `dialog --gauge` to dynamically update the progress > based on > =C2=A0output from the `bmaptool` process. >=20 > Signed-off-by: Kasturi Shekar > --- > =C2=A0.../files/usr/bin/deploy-image-wic.sh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 | 44 > ++++++++++++++++++- > =C2=A01 file changed, 42 insertions(+), 2 deletions(-) >=20 > 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 7f552eee..9743bfe6 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 > @@ -149,8 +149,48 @@ if ! $installer_unattended; then > =C2=A0=C2=A0=C2=A0=C2=A0 clear > =C2=A0fi > =C2=A0 > -if ! bmaptool copy ${bmap_options} "$installer_image_uri" > "${installer_target_dev}"; then > -=C2=A0=C2=A0=C2=A0 exit 1 > +# Function to compare version numbers > +version_ge() { > +=C2=A0=C2=A0=C2=A0 if [ "$(printf '%s\n' "$1"X "$2" | sort -V | head -n = 1)" !=3D > "$1"X ]; then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0 > +=C2=A0=C2=A0=C2=A0 else > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 1 > +=C2=A0=C2=A0=C2=A0 fi > +} > + > +# Get bmap-tools version using dpkg-query > +bmap_version=3D$(dpkg-query -W -f=3D'${Version}' bmap-tools | awk - > F'[~+-]' '{ print $1 }') > + > +if version_ge "$bmap_version" "3.8"; then > +=C2=A0=C2=A0=C2=A0 # Create a named pipe for progress communication > +=C2=A0=C2=A0=C2=A0 progress_pipe=3D"/tmp/progress" > +=C2=A0=C2=A0=C2=A0 if ! mkfifo "$progress_pipe"; then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo "Error: Failed to create= named pipe $progress_pipe" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit 1 > +=C2=A0=C2=A0=C2=A0 fi > + > +=C2=A0=C2=A0=C2=A0 # Initialize the dialog gauge and update it dynamical= ly > +=C2=A0=C2=A0=C2=A0 ( > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while true; do > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if re= ad -r line < "$progress_pipe"; then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 percentage=3D$(echo "$line" | awk '{ print $2 }') > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 echo "$percentage" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 done > +=C2=A0=C2=A0=C2=A0 ) | dialog --gauge "Flashing image, please wait..." 1= 0 70 0 & > + > +=C2=A0=C2=A0=C2=A0 # Run bmaptool with psplash updating progress > +=C2=A0=C2=A0=C2=A0 if ! bmaptool -q copy ${bmap_options} --psplash- > pipe=3D"$progress_pipe" "$installer_image_uri" "$installer_target_dev"; > then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit 1 > +=C2=A0=C2=A0=C2=A0 fi > + > +=C2=A0=C2=A0=C2=A0 # Clean up the named pipe after completion > +=C2=A0=C2=A0=C2=A0 rm "$progress_pipe" > + Hello. Since we are going to reboot anyway, we could not worry about removing progress_pipe here, move --psplash-pipe=3D"$progress_pipe" into ${bmap_options} and avoid code duplication below. > +else > +=C2=A0=C2=A0=C2=A0 if ! bmaptool copy ${bmap_options} "$installer_image_= uri" > "$installer_target_dev"; then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit 1 > +=C2=A0=C2=A0=C2=A0 fi > =C2=A0fi > =C2=A0 > =C2=A0if ! $installer_unattended; then > --=20 > 2.39.5 >=20 --=20 Best regards, Uladzimir. --=20 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 e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= 70005140a8ebc156582f05349d3e8cead21d7bd1.camel%40ilbers.de.