Re: [PATCH] x86/boot: Work around broken busybox truncate tool
From: Ingo Molnar
Date: Thu Apr 24 2025 - 12:30:13 EST
* Philipp Stanner <phasta@xxxxxxxxxxx> wrote:
> Thank you very much for this fix :)
>
> On Thu, 2025-04-24 at 12:19 +0200, Ard Biesheuvel wrote:
> > From: Ard Biesheuvel <ardb@xxxxxxxxxx>
> >
> > The GNU coreutils version of truncate, which is the original, accepts
> > a
> > % prefix for the -s size argument which means the file in question
> > should be padded to a multiple of the given size. This is currently
> > used
> > to pad the setup block of bzImage to a multiple of 4k before
> > appending
> > the decompressor.
> >
> > busybux reimplements truncate but does not support this idiom, and
>
> typo, busybox.
Fixed, thx.
>
> > therefore fails the build since commit
> >
> > 9c54baab4401 ("x86/boot: Drop CRC-32 checksum and the build tool
> > that generates it")
>
> Should this be marked as an official bug?
>
> If so, I'd put this as a Fixes: tag below.
So I've added a Fixes tag, because it's informative, but 9c54baab4401
is new in v6.15-rc1 so there's no backporting need.
> > Work around this by avoiding truncate altogether, and relying on dd
> > to
> > perform the padding.
> >
> > Reported-by: <phasta@xxxxxxxxxx>
>
> Tested-by: Philipp Stanner <phasta@xxxxxxxxxx>
Thanks!
Ingo