
On 07/20/2018 06:18 PM, Sam Protsenko wrote:
This patch series intended to make boot log better. Basically here we just remove unwanted error messages, relying on the message from most deep API to be printed (like mmc subsystem). At the moment this looks like most clean solution to cluttered log problem, as any other solution will be hackish.
With this patch set applied we will see something like this:
Loading Environment from FAT... MMC: no card present Loading Environment from MMC... OK
instead of:
Loading Environment from FAT... MMC: no card present ** Bad device mmc 0 ** Failed (-5) Loading Environment from MMC... OK
Sam Protsenko (2): env: Don't print "Failed" error message disk: part: Don't show redundant error message
disk/part.c | 2 +- env/env.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-)
Hi Sam,
After following the discussion from "Make U-Boot log great again" to here, it made me wonder: Does the user really need to be exposed to all the failed attempts to load the environment if it succeeded eventually?
Maybe the maintainers are willing the consider a more drastic solution for clearing the console clutter when the environment loads.
What if the only thing the user would see on a successful load is this: ENV: Loaded from MMC And the rest of the usual clutter would be visible only if DEBUG is set.
It shouldn't be too hard to implement (Rising GD_FLG_SILENT if DEBUG not defined) and it is very consistent with the rest of the printed messages on boot. The problem is how and what to print on a failed load.
I think it would be best if we could keep the above pattern like so: ENV: Failed to load from FAT - MMC: No card present (-5) ENV: Failed to load from MMC - No MMC card found (-5) ENV: Using default environment The last line would print only if (gd->flags & GD_FLG_ENV_DEFAULT)
This might be harder to implement, but do you think it could work?
Yaniv