Passing boot logs to Linux?
Simon Glass
sjg at chromium.org
Wed Dec 20 05:11:10 CET 2023
+Heinrich Schuchardt
On Tue, 19 Dec 2023 at 13:33, Daniel Golle <daniel at makrotopia.org> wrote:
>
> Hi Bence,
>
> On Tue, Dec 19, 2023 at 08:08:48PM +0000, Csókás Bence wrote:
> > Hi!
> >
> > Is passing the U-Boot boot log to Linux supported yet? We are working
> > with a third-party solution, which works, but is a bit hacky, so I was
> > wondering if an official solution has been merged yet.
> >
> > I saw that there was an option CONFIG_CONSOLE_RECORD that saves
> > everything to a membuff, but I don't know if that can be exported to
> > Linux yet. And if not in the tree yet, would such a patch be welcome?
>
> To me this sounds very useful and definitely something we'd like to
> have in OpenWrt. So I'd volunteer to review and test your patches once
> they are ready.
>
> What comes to mind is that CONFIG_CONSOLE_RECORD also captures ANSI
> sequences during menu or count-down before boot, so we'd have to either
> introduce a dedicated log_printf() call and use that when ever we want
> the output to also become part of the log buffer or we could somehow
> filter the recorded console, eliminating all terminal control sequences.
I have been asking for this for a while. We need some sort of inline
function to enable ANSI output. Perhaps something like this?
#if CONFIG_IS_ENABLED(ANSI)
bool use_ansi(void);
#else
static inline bool use_ansi(void) { return false; }
#endif
bool use_ansi(void)
{
return gd->flags & GD_FLG_ANSI;
}
>
>
> Cheers
>
>
> Daniel
Regards,
SImon
More information about the U-Boot
mailing list