kbuild: fix bzImage build for x86

As has been discussed previously (and Sam has been CC'ed), the fix
is still incorrect.  It replaces "echo -ne" with "/bin/echo -ne",
but neither of the two are guaranteed to support the necessary
arguments and necessary (hexadecimal) escape sequences.  What should
be used here is printf(1).  The trivial patch below (on top of these
kbuild changes) fixes this issue.

Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Michael Tokarev 2009-10-13 22:22:46 +02:00 committed by Michal Marek
parent 053fe57ac2
commit 4a2ff67c88

View file

@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
# Bzip2 and LZMA do not include size in file... so we have to fake that; # Bzip2 and LZMA do not include size in file... so we have to fake that;
# append the size as a 32-bit littleendian number as gzip does. # append the size as a 32-bit littleendian number as gzip does.
size_append = /bin/echo -ne $(shell \ size_append = printf $(shell \
dec_size=0; \ dec_size=0; \
for F in $1; do \ for F in $1; do \
fsize=$$(stat -c "%s" $$F); \ fsize=$$(stat -c "%s" $$F); \