On Mon, Sep 21, 2026 at 7:45 PM Heinrich Schuchardt
<[email protected]> wrote:
>
> On 9/18/26 12:52, Alexey Charkov wrote:
> > print_decomp_msg() names the image it is about to unpack, which drags
> > uimage_type[] and its strings into any phase that links image_decomp().
> > That is about 2.5KB, measured on a Rockchip RK3576 SPL, spent on one line
> > of progress output in a phase built for size.
> >
> > Name it "image" there instead. U-Boot proper is unchanged.
> >
> > Reviewed-by: Tom Rini <[email protected]>
> > Signed-off-by: Alexey Charkov <[email protected]>
> > ---
> >   boot/image.c | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/boot/image.c b/boot/image.c
> > index 185d52ba492f..a7dc69e858ad 100644
> > --- a/boot/image.c
> > +++ b/boot/image.c
> > @@ -416,7 +416,12 @@ void image_print_contents(const void *ptr)
> >   static void print_decomp_msg(int comp_type, int type, bool is_xip,
> >                            ulong load)
> >   {
> > -     const char *name = genimg_get_type_name(type);
> > +     /*
> > +      * The image-type table and its strings cost about 2.5KB, which is a
> > +      * lot to spend on a progress message in a phase built for size.
> > +      */
> > +     const char *name = IS_ENABLED(CONFIG_XPL_BUILD) ? "image" :
> > +                        genimg_get_type_name(type);
> >
> >       /* Shows "Loading Kernel Image" for example */
> >       if (comp_type == IH_COMP_NONE)
> >
>
> The print_decomp_msg() output is irrelevant to end users.
>
> Do we need print_decomp_msg() at all in XPL?
> Even for main U-Boot this should only be a debug message.

I believe it is a helpful progress indicator. End users would rarely
stare at xPL console messages if everything goes well, and if they do
stare at it (which requires having console output, a debug feature,
enabled in the first place) they'll probably want to know where
everything stopped going well without jumping through too many hoops.

Best regards,
Alexey

Reply via email to