public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC] Make U-Boot log great again
@ 2018-02-16 19:01 Sam Protsenko
  2018-02-16 19:49 ` Robert Nelson
  2018-02-18 21:22 ` Wolfgang Denk
  0 siblings, 2 replies; 23+ messages in thread
From: Sam Protsenko @ 2018-02-16 19:01 UTC (permalink / raw)
  To: u-boot

Hi guys,

TL;DR This is a suggestion about fixing U-Boot log, which has got
worse recently.

Right now U-Boot and SPL logs are cluttered with bogus warnings like
these (on X15 board, but I'm pretty sure it should appear on many
others):

    Loading Environment from FAT...
    *** Warning - bad CRC, using default environment
    Failed (-5)

Those are the consequences of next commit:

    fb69464eae1e ("env: Allow to build multiple environments in Kconfig")

Because of this commit, I can see following changes in my .config file:

    +CONFIG_ENV_IS_IN_FAT=y
    +CONFIG_ENV_FAT_INTERFACE="mmc"
    +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
    +CONFIG_ENV_FAT_FILE="uboot.env"

which led U-Boot to try and load the environment from different
sources. I agree that it's good thing to do and can be useful, but the
problem is that the code for loading the environment wasn't changed to
handle errors properly.

How I suggest to handle that case:

 1. If we have two sources for the environment (e.g. FAT partition on
SD card and some raw partition on eMMC), we shouldn't print error
messages if we were unable to load the environment from one source
 2. We should probably print some human-readable information that we
didn't find the environment there, let's skip and look for next source
(but don't print those warnings/failed messages)
 3. And only print the error message in case when U-Boot environment
wasn't found at all (on all possible sources).

I don't have enough time to fix this by my own right now. But let's
discuss how to approach this issue in a best way possible. And if
someone wants to step forward and do that -- would be really nice. If
no -- I can look into that later. But let's collect some opinions
here, first.

Thanks.

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-07-18 21:41 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-16 19:01 [U-Boot] [RFC] Make U-Boot log great again Sam Protsenko
2018-02-16 19:49 ` Robert Nelson
2018-03-23  5:44   ` Bin Meng
2018-07-10  3:01     ` Bin Meng
2018-07-10 14:38       ` Tom Rini
2018-07-11 14:51         ` Sam Protsenko
2018-07-17 22:14         ` Sam Protsenko
2018-07-18 21:41           ` Sam Protsenko
2018-02-18 21:22 ` Wolfgang Denk
2018-02-19 17:47   ` Sam Protsenko
2018-02-19 19:09     ` Wolfgang Denk
2018-02-20  8:00     ` Maxime Ripard
2018-02-20  9:59       ` Lukasz Majewski
2018-02-21 13:35         ` Tom Rini
2018-02-21 13:55           ` Maxime Ripard
2018-02-21 14:59             ` Tom Rini
2018-02-21 14:38           ` Simon Goldschmidt
2018-02-21 14:54             ` Tom Rini
2018-02-21 15:03               ` Simon Goldschmidt
2018-02-21 15:07               ` Maxime Ripard
2018-02-21 15:14                 ` Tom Rini
2018-02-22 13:33                   ` Maxime Ripard
2018-02-24 20:52         ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox