[U-Boot] Silencing SPL output

Chris Packham judge.packham at gmail.com
Mon Oct 16 21:08:05 UTC 2017


Hi Heiko,

On Mon, Oct 16, 2017 at 5:24 PM, Heiko Schocher <hs at denx.de> wrote:
> Hello Chris,
>
> Am 16.10.2017 um 02:38 schrieb Chris Packham:
>>
>> This is probably something of a foot-gun but here we go...
>>
>> I was wondering if it's worth providing the ability to silence the
>> output from the SPL. CONFIG_SILENT_CONSOLE exist for u-boot proper but
>> the SPL preloader_console_init bypasses anything that would set
>> GD_FLG_SILENT. Even if it didn't the SPL probably doesn't have access
>> to any environment that would allow it to be set/unset.
>>
>> I was thinking about adding a SPL specific CONFIG option that would
>> set GD_FLG_SILENT (probably in spl_init). Aside from re-compiling
>> there wouldn't be any way of making the SPL loud. Is this a reasonable
>> idea or is it just asking for boards to be bricked with no way of
>> telling what went wrong?
>
>
> I have a at91 based board in mainline, which has no SPL output
> enabled (as there is no space for it), see:
>
> configs/smartweb_defconfig
>
> Do not define
> CONFIG_SPL_SERIAL_SUPPORT=y
>

Thanks for the tip. Unfortunately disabling  CONFIG_SPL_SERIAL_SUPPORT
causes some build errors (at least for db-88f6820-amc)

  common/spl/built-in.o: In function `preloader_console_init':
common/spl/spl.c:463: undefined reference to `serial_init'
  lib/built-in.o: In function `fdtdec_get_alias_seq':
lib/fdtdec.c:546: undefined reference to `trailing_strtol'
  drivers/built-in.o: In function
`spi_flash_probe_bus_cs':drivers/mtd/spi/sf-uclass.c:66: undefined
reference to `snprintf'
  scripts/Makefile.spl:358: recipe for target 'spl/u-boot-spl' failed

The first one looks like an appropriate #ifdef (or do/while fallback)
is missing. The others look like missing dependencies.

I was already on the fence about silencing SPL output so I'm not
planning on pursuing it. I thought I'd mention the build failures in
case someone wants to take a look.

Thanks,
Chris


More information about the U-Boot mailing list