linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Kbuild: shut up uboot mkimage output when building quietly
Date: Fri, 14 May 2021 15:57:33 +0200	[thread overview]
Message-ID: <20210514135752.2910387-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

When building with 'make -s', most architectures produce no output
at all unless there are warnings. However, on at leat mips and nios2
there is output from /usr/bin/mkimage when that is installed:

  Image Name:   Linux-5.12.0-next-20210427-00716
  Created:      Wed Apr 28 22:03:30 2021
  Image Type:   NIOS II Linux Kernel Image (gzip compressed)
  Data Size:    2245876 Bytes = 2193.24 KiB = 2.14 MiB
  Load Address: d0000000
  Entry Point:  d0000000

Make these behave like the others and check for the '${quiet}'
variable to see if we should redirect the output to /dev/null.
Any errors and warnings from mkimage will still be seen as those
get sent to stderr.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/mkuboot.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/mkuboot.sh b/scripts/mkuboot.sh
index 4b1fe09e9042..031b5d6b839f 100755
--- a/scripts/mkuboot.sh
+++ b/scripts/mkuboot.sh
@@ -17,4 +17,8 @@ if [ -z "${MKIMAGE}" ]; then
 fi
 
 # Call "mkimage" to create U-Boot image
-${MKIMAGE} "$@"
+if [ "${quiet}" != "silent_" ]; then
+${MKIMAGE} "$@" ${REDIRECT}
+else
+${MKIMAGE} "$@" ${REDIRECT} > /dev/null
+fi
-- 
2.29.2


             reply	other threads:[~2021-05-14 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 13:57 Arnd Bergmann [this message]
2021-05-17  7:09 ` [PATCH] Kbuild: shut up uboot mkimage output when building quietly Masahiro Yamada
2021-05-17  7:28   ` Arnd Bergmann

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=20210514135752.2910387-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    /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;
as well as URLs for NNTP newsgroup(s).