Kbuild: shut up uboot mkimage output when building quietly
PATCH 1/1 Kbuild: shut up uboot mkimage output when building quietly
From: Arnd Bergmann <[email protected]>
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.
--- scripts/mkuboot.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/mkuboot.sh +5 -1
@@ -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
Signature · 1 line
2.29.2
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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/mkimagewhen 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
Quoted 7 lines
Load Address:
d0000000
Entry Point:d0000000Make 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.
Thanks for the report, but I rather want to suppress stdout in the kbuild core macro.
I wrote this patch.
https://lore.kernel.org/patchwork/patch/1429409/
Quoted 22 lines
Signed-off-by Arnd Bergmann <[email protected]>--- scripts/mkuboot.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)scripts/mkuboot.sh +5
-2@@ -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
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 21 lines · Masahiro Yamada
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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/mkimagewhen 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 MiBQuoted 7 lines
Load Address:
d0000000
Entry Point:d0000000Make 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.
Quoted 5 lines
Thanks for the report, but I rather want to suppress stdout in the kbuild core macro.
I wrote this patch.
https://lore.kernel.org/patchwork/patch/1429409/
Looks good, thank you for taking care of it.
Arnd