lkml.org 
[lkml]   [2009]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kbuild: correct size calculation of bzImgae / fix x86 boot
Sam Ravnborg wrote:
> We use ... printf \x ... when calculating the size of the
> compressed kernel.
> Unfortunately dash built-in printf does not support this notation
> resulting in a non-bootable kernel.
>
> Fix this by always using the external version of printf.
>
> The commit that introduced this bug was:
> 4a2ff67c88211026afcbdbc190c13f705dae1b59: "kbuild: fix bzImage
> build for x86"
>
> Reported-by: Michael Guntsche <mike@it-loops.com>
> Cc: Oliver Hartkopp <oliver@hartkopp.net>
> Cc: Johannes Stezenbach <js@sig21.net>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>
> This should fix it but it would be great if it is tested.
> Michal Marek, I think this needs to go upstream pretty quickly.
>
> Sam
>
> scripts/Makefile.lib | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index cd815ac..bd201d9 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -213,13 +213,14 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
>
> # 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.
> +# Note: dash built-in printf does not support \x so use /usr/bin version
> size_append = printf $(shell \


I thought *this* printf caused the problem?!?


> dec_size=0; \
> for F in $1; do \
> fsize=$$(stat -c "%s" $$F); \
> dec_size=$$(expr $$dec_size + $$fsize); \
> done; \
> -printf "%08x" $$dec_size | \
> +/usr/bin/printf "%08x" $$dec_size | \

Maybe this one too ...

Should i test it with this patch anyway??

Regards,
Oliver



\
 
 \ /
  Last update: 2009-12-20 11:27    [W:0.092 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site