Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it
Date: Mon, 26 Sep 2022 01:04:20 UTC
On Sun, Sep 25, 2022 at 03:57:34PM -0700, Mark Millard wrote: > On 2022-Sep-25, at 12:34, bob prohaska <fbsd@www.zefox.net> wrote: > > > > . . . > > > > IIRC I did try replacing the Sabrent enclosure with the Startech > > enclosure, which worked and seemed to implicate the Sabrent as > > the culprit. Thus my interest in u-boot debug information. > > Looking at https://u-boot.readthedocs.io/en/latest/develop/logging.html > it appears the logging availability has to be enabled at compile time: > > QUOTE > Enabling logging > > The following options are used to enable logging > at compile time: > > ??? CONFIG_LOG - Enables the logging system > ??? CONFIG_LOG_MAX_LEVEL - Max log level to > build (anything higher is compiled out) > ??? CONFIG_LOG_CONSOLE - Enable writing log > records to the console > > If CONFIG_LOG is not set, then no logging will be available. > > The above have SPL and TPL versions also, e.g. > CONFIG_SPL_LOG_MAX_LEVEL and CONFIG_TPL_LOG_MAX_LEVEL. > > If logging is disabled, the default behaviour is to output > any message at level LOGL_INFO and below. If logging is > disabled and DEBUG is defined (at the very top of a C file) > then any message at LOGL_DEBUG will be written. > END QUOTE > I looked at the page but didn't understand where/how to set those parameters. Do they go in a configuration or Makefile somewhere? I tried using setenv CONFIG_LOG 1 setenv CONFIG_LOG_CONSOLE 1 setenv CONFIG_LOG_MAX_LEVEL 4 [The numbers were guessed at] All showed up in an env command, but the the resulting u-boot.bin executable did not change size and behaves as before. Apologies if I'm being dense! bob prohaska