* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
@ 2011-04-05 14:07 Nick Thompson
2011-04-05 15:52 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Nick Thompson @ 2011-04-05 14:07 UTC (permalink / raw)
To: u-boot
common/console.c has this function:
/* Called before relocation - use serial functions */
int console_init_f(void)
{
gd->have_console = 1;
#ifdef CONFIG_SILENT_CONSOLE
if (getenv("silent") != NULL)
gd->flags |= GD_FLG_SILENT;
#endif
return 0;
}
I have defined CONFIG_SILENT_CONSOLE and set "silent" in my NAND env,
but the SILENT flag doesn't get set.
I suspect this function is called way too early for NAND env to be available.
I can set the flag unconditionally and that works fine, but I don't think that
that will make a patch worthy of submission...?
Any thoughts?
Thanks,
Nick.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
2011-04-05 14:07 [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env Nick Thompson
@ 2011-04-05 15:52 ` Mike Frysinger
2011-04-05 16:07 ` Nick Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-04-05 15:52 UTC (permalink / raw)
To: u-boot
On Tue, Apr 5, 2011 at 10:07 AM, Nick Thompson wrote:
> common/console.c has this function:
>
> /* Called before relocation - use serial functions */
> int console_init_f(void)
> {
> ? ? ? ?gd->have_console = 1;
>
> #ifdef CONFIG_SILENT_CONSOLE
> ? ? ? ?if (getenv("silent") != NULL)
> ? ? ? ? ? ? ? ?gd->flags |= GD_FLG_SILENT;
> #endif
>
> ? ? ? ?return 0;
> }
>
> I have defined CONFIG_SILENT_CONSOLE and set "silent" in my NAND env,
> but the SILENT flag doesn't get set.
>
> I suspect this function is called way too early for NAND env to be available.
NAND isnt the only one with this problem (SPI does too last i looked).
during early boot, you only have the default env available. so if
you want silent console, i'd suggest you enable that in your default
env.
-mike
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
2011-04-05 15:52 ` Mike Frysinger
@ 2011-04-05 16:07 ` Nick Thompson
2011-04-05 17:46 ` Scott Wood
0 siblings, 1 reply; 7+ messages in thread
From: Nick Thompson @ 2011-04-05 16:07 UTC (permalink / raw)
To: u-boot
On 05/04/11 16:52, Mike Frysinger wrote:
> On Tue, Apr 5, 2011 at 10:07 AM, Nick Thompson wrote:
>> common/console.c has this function:
>>
>> /* Called before relocation - use serial functions */
>> int console_init_f(void)
>> {
>> gd->have_console = 1;
>>
>> #ifdef CONFIG_SILENT_CONSOLE
>> if (getenv("silent") != NULL)
>> gd->flags |= GD_FLG_SILENT;
>> #endif
>>
>> return 0;
>> }
>>
>> I have defined CONFIG_SILENT_CONSOLE and set "silent" in my NAND env,
>> but the SILENT flag doesn't get set.
>>
>> I suspect this function is called way too early for NAND env to be available.
> NAND isnt the only one with this problem (SPI does too last i looked).
> during early boot, you only have the default env available. so if
> you want silent console, i'd suggest you enable that in your default
> env.
> -mike
Yes, that's what I intend to do, I think, though I'd have liked it to be
configurable at run time.
Thanks for the info,
Nick.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
2011-04-05 16:07 ` Nick Thompson
@ 2011-04-05 17:46 ` Scott Wood
2011-04-06 8:21 ` Nick Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Scott Wood @ 2011-04-05 17:46 UTC (permalink / raw)
To: u-boot
On Tue, 5 Apr 2011 17:07:13 +0100
Nick Thompson <nick.thompson@ge.com> wrote:
> On 05/04/11 16:52, Mike Frysinger wrote:
> > On Tue, Apr 5, 2011 at 10:07 AM, Nick Thompson wrote:
> >> common/console.c has this function:
> >>
> >> /* Called before relocation - use serial functions */
> >> int console_init_f(void)
> >> {
> >> gd->have_console = 1;
> >>
> >> #ifdef CONFIG_SILENT_CONSOLE
> >> if (getenv("silent") != NULL)
> >> gd->flags |= GD_FLG_SILENT;
> >> #endif
> >>
> >> return 0;
> >> }
> >>
> >> I have defined CONFIG_SILENT_CONSOLE and set "silent" in my NAND env,
> >> but the SILENT flag doesn't get set.
> >>
> >> I suspect this function is called way too early for NAND env to be available.
> > NAND isnt the only one with this problem (SPI does too last i looked).
> > during early boot, you only have the default env available. so if
> > you want silent console, i'd suggest you enable that in your default
> > env.
> > -mike
>
> Yes, that's what I intend to do, I think, though I'd have liked it to be
> configurable at run time.
Try enabling CONFIG_NAND_ENV_DST to have the environment be loaded by the
SPL along with the main U-Boot image. You didn't say what board/chip
you're using, so if you're using something other than the common
nand_boot.c you may need to add support for this (it's just a couple
lines), and silence any output from the SPL itself.
-Scott
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
2011-04-05 17:46 ` Scott Wood
@ 2011-04-06 8:21 ` Nick Thompson
2011-04-06 9:22 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Nick Thompson @ 2011-04-06 8:21 UTC (permalink / raw)
To: u-boot
On 05/04/11 18:46, Scott Wood wrote:
> On Tue, 5 Apr 2011 17:07:13 +0100
> Nick Thompson <nick.thompson@ge.com> wrote:
>
>> On 05/04/11 16:52, Mike Frysinger wrote:
>>> On Tue, Apr 5, 2011 at 10:07 AM, Nick Thompson wrote:
>>>> common/console.c has this function:
>>>>
>>>> /* Called before relocation - use serial functions */
>>>> int console_init_f(void)
>>>> {
>>>> gd->have_console = 1;
>>>>
>>>> #ifdef CONFIG_SILENT_CONSOLE
>>>> if (getenv("silent") != NULL)
>>>> gd->flags |= GD_FLG_SILENT;
>>>> #endif
>>>>
>>>> return 0;
>>>> }
>>>>
>>>> I have defined CONFIG_SILENT_CONSOLE and set "silent" in my NAND env,
>>>> but the SILENT flag doesn't get set.
>>>>
>>>> I suspect this function is called way too early for NAND env to be available.
>>> NAND isnt the only one with this problem (SPI does too last i looked).
>>> during early boot, you only have the default env available. so if
>>> you want silent console, i'd suggest you enable that in your default
>>> env.
>>> -mike
>> Yes, that's what I intend to do, I think, though I'd have liked it to be
>> configurable at run time.
> Try enabling CONFIG_NAND_ENV_DST to have the environment be loaded by the
> SPL along with the main U-Boot image. You didn't say what board/chip
> you're using, so if you're using something other than the common
> nand_boot.c you may need to add support for this (it's just a couple
> lines), and silence any output from the SPL itself.
>
> -Scott
>
Thanks Scott,
That's interesting. I'm using a TI board (da830evm). Unfortunately it has its
own UBL, so I don't have the SPL to configure that way.
That might be a good reason to consider dropping the UBL though. I believe
TI are moving to U-Boot SPL themselves.
I'll add it to my TODO list.
Thanks,
Nick.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
2011-04-06 8:21 ` Nick Thompson
@ 2011-04-06 9:22 ` Wolfgang Denk
2011-04-06 10:06 ` Nick Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2011-04-06 9:22 UTC (permalink / raw)
To: u-boot
Dear Nick Thompson,
In message <4D9C2274.3080602@ge.com> you wrote:
>
> That's interesting. I'm using a TI board (da830evm). Unfortunately it has its
> own UBL, so I don't have the SPL to configure that way.
There is little reason to stick with UBL. You can get rid of it and
use the SPL approach instead - this is no real technical challenge,
but just a "little effort".
> That might be a good reason to consider dropping the UBL though. I believe
> TI are moving to U-Boot SPL themselves.
Are they? Do you have any pointers?
> I'll add it to my TODO list.
Thanks!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Keep your head and your heart going in the right direction and you
will not have to worry about your feet.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env
2011-04-06 9:22 ` Wolfgang Denk
@ 2011-04-06 10:06 ` Nick Thompson
0 siblings, 0 replies; 7+ messages in thread
From: Nick Thompson @ 2011-04-06 10:06 UTC (permalink / raw)
To: u-boot
On 06/04/11 10:22, Wolfgang Denk wrote:
> Dear Nick Thompson,
>
> In message <4D9C2274.3080602@ge.com> you wrote:
>> That might be a good reason to consider dropping the UBL though. I believe
>> TI are moving to U-Boot SPL themselves.
> Are they? Do you have any pointers?
There have been some SPL submissions from TI people, for example:
http://www.mail-archive.com/u-boot at lists.denx.de/msg48557.html
I believe the work is focused on OMAP4, with OMAP3 as a later addition.
I notice there is already something in repo for da8xx, though not from
TI. I think I need to take a look at that.
Nick.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-04-06 10:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-05 14:07 [U-Boot] CONFIG_SILENT_CONSOLE not working with NAND env Nick Thompson
2011-04-05 15:52 ` Mike Frysinger
2011-04-05 16:07 ` Nick Thompson
2011-04-05 17:46 ` Scott Wood
2011-04-06 8:21 ` Nick Thompson
2011-04-06 9:22 ` Wolfgang Denk
2011-04-06 10:06 ` Nick Thompson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox