2009-10-15 05:53:53     Use of "silent" env var makes no difference

Document created by Aaronwu Employee on Sep 24, 2013
Version 1Show Document
  • View in full screen mode

2009-10-15 05:53:53     Use of "silent" env var makes no difference

Einar Saltnes (NORWAY)

Message: 81304   


Hi list!


I have no success when trying to manipulate serial console output by use of silent env var. My platform is:







In other words the most recent release bundle. HW is a custom board that is very similar to bf537-stamp.


In my u-boot board specific configuration file I have:


    defined CONFIG_SILENT_CONSOLE (defined as 1)

    defined CFG_DEVICE_NULLDEV (defined as 1)

    Above definitions are added prior to the #include <configs/bfin_adi_common.h> statement

    bootargs=root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600


silent is not defined in u-boot env var and u-boot runs as expected with regards to output on serial console. Booting linux kernel also gives expected output on serial console and bootargs can be verified by executing cat /proc/cmdline in linux.


Next I define silent as env var as follows:


bfin> setenv silent 1


bfin> saveenv


bfin> printenv silent




Reset board as next step, but u-boot still outputs to serial console. Verify that silent is still defined as expected. Booting linux also gives the same output on serial console and cat /proc/cmdline gives the same kernel arguments as when silent was still undefined.


From the documentation (Wiki, README and README.silent) I would expect that some of the arguments passed on to linux kernel would change from e.g console=ttyBF0,57600 to console=. Also I would expect that the u-boot env var stdout and stderr would change from serial to nulldev. However, they still seem to contain the value serial.


I am obviously missing something about the u-boot configuration/execution, but cannot figure out what. Please, give some advice. Thanks!




2009-10-15 14:59:26     Re: Use of "silent" env var makes no difference

Mike Frysinger (UNITED STATES)

Message: 81317   


i just tested things and they worked fine for me


your confusion with kernel verbosity is probably related to your use of earlyprintk=.  that wont be disabled for you -- you have to remove that option.


i dont know why you set CFG_DEVICE_NULLDEV.  it isnt need for silent booting.




2009-10-16 07:56:02     Re: Use of "silent" env var makes no difference

Einar Saltnes (NORWAY)

Message: 81357   


Thank you for the prompt reply!


I followed your advice and removed the CFG_DEVICE_NULLDEV setting. I also removed earlyprintk from bootargs (and disabled Early printk in the linux kernel).


However, I am still a bit confused about the use of the silent env var.


If I define silent as part of the env vars at compiletime, I get the expected behavior. On reboot of the board, I get no output on serial console from u-boot and no output from linux kernel during boot.


If I undef the silent env var at runtime (no other changes from previous testrun), there will be no change with regards to serial console output - in other words there will be no output from u-boot nor linux kernel upon boot.


My understanding of silent was that I could make the change between silent and "talkative" on serial console just by defining or undefining the silent env var. All this in runtime. However, my tests indicate that I will have to recompile u-boot if I want the system to reflect use of silent or not.


Could you please confirm if my conclusion is correct? Thank you!




2009-11-02 04:21:41     Re: Use of "silent" env var makes no difference

Øyvind Kaurstad (NORWAY)

Message: 81992   


I'm working on the same project as Einar, and I've now looked into this issue, and I think I've discovered why it doesn't work:


We're using SPI flash (and the environment is embedded (ENV_IS_EMBEDDED is defined)). It seems that the console silencing is done in the function console_init_f() which is called from lib_blackfin/board.c. In this function the envvar silent is checked, and if found the silent flag is set. However, this is before environment relocation, and for SPI flash the environment is not usable before relocation (see env_init() in env_sf.c).


Thus, to use silent booting with SPI flash, it seems you cannot in fact turn it on and off with the "silent" envvar, since this envvar is inaccessible at the point where the silencing happens. At this point the default environment (which is obviously hard-coded into the u-boot itself) is used.


The reason it works for you is probably because you're running from parallell flash, not SPI flash.


It is of course possible that I've misunderstood things here, but if not I think the docs should be updated to reflect that you cannot turn on and off silent booting with the envvar silent when using SPI flash.








2009-11-02 04:33:04     Re: Use of "silent" env var makes no difference

Øyvind Kaurstad (NORWAY)

Message: 81993   


A small correction to what I wrote:


ENV_IS_EMBEDDED is not defined, but ENV_IS_EMBEDDED_CUSTOM is. This comes implicitly when CONFIG_BFIN_BOOT_MODE is set to BFIN_BOOT_SPI_MASTER.








2009-11-02 06:30:30     Re: Use of "silent" env var makes no difference

Mike Frysinger (UNITED STATES)

Message: 81994   


your analysis looks correct ... that does seem to be a poor limitation


perhaps console_init_r() should also check the silent env var so you get a little bit of control over the dynamic behavior.  if you want silent by default, add it to your default environment.  pretty much all of the info displayed during boot can be seen with `bdinfo` anyways.