Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-02-13 Thread Mike Frysinger
Acked-by: Mike Frysinger 
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
> On Wednesday 25 January 2012 22:28:17 Marek Vasut wrote:
> > > On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
> > > > > On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
> > > > > > >  * if defined run env "premonitor" before Main Loop for Monitor
> > > > > > >  Processing
> > > > > > 
> > > > > > What is this good for?
> > > > > 
> > > > > before running monitor loop I'd like write some info to console
> > > > > (specific board info, board commands, board macros). but if these
> > > > > info will be written in preboot it can be deleted by menu section.
> > > > 
> > > > The "menu" here, you refer to the thing you implemented? So fix that
> > > > instead of introducing broken code and a pile of workarounds.
> > > 
> > > With "menu" I mean env menucmd. U-Boot run command stored in env
> > > menucmd after preboot and before monitor loop. For example in menucmd
> > > can be my bootmenu, but there are no problems - no broken code! My
> > > bootmenu clear screan and show menu, so anything printed before menu
> > > entries will be deleted. This is not bug - Also in Grub or LILO is
> > > debug/output log cleaned when showing menu entries.
> > 
> > Ok anyway, but you implemented custom menu system anyway ... so let's
> > clear this first, is common/menu.c useless for your application?
> 
> I do not know. I created my bootmenu before menu.c was integrated into
> u-boot. I did not looked at menu.c yet - I do not know what is in menu.c
> implemented.

Please go through it, we don't need two separate implementations of the same 
thing. If you can't use it as it, just augment it and submit a patch for it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 22:28:17 Marek Vasut wrote:
> > On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
> > > > On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
> > > > > >  * if defined run env "premonitor" before Main Loop for Monitor
> > > > > >  Processing
> > > > >
> > > > > What is this good for?
> > > >
> > > > before running monitor loop I'd like write some info to console
> > > > (specific board info, board commands, board macros). but if these info
> > > > will be written in preboot it can be deleted by menu section.
> > >
> > > The "menu" here, you refer to the thing you implemented? So fix that
> > > instead of introducing broken code and a pile of workarounds.
> >
> > With "menu" I mean env menucmd. U-Boot run command stored in env menucmd
> > after preboot and before monitor loop. For example in menucmd can be my
> > bootmenu, but there are no problems - no broken code! My bootmenu clear
> > screan and show menu, so anything printed before menu entries will be
> > deleted. This is not bug - Also in Grub or LILO is debug/output log
> > cleaned when showing menu entries.
>
> Ok anyway, but you implemented custom menu system anyway ... so let's clear
> this first, is common/menu.c useless for your application?
>

I do not know. I created my bootmenu before menu.c was integrated into u-boot.
I did not looked at menu.c yet - I do not know what is in menu.c implemented.

--
Pali Rohár
pali.ro...@gmail.com

signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
> On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
> > > On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
> > > > >  * if defined run env "premonitor" before Main Loop for Monitor
> > > > >  Processing
> > > > 
> > > > What is this good for?
> > > 
> > > before running monitor loop I'd like write some info to console
> > > (specific board info, board commands, board macros). but if these info
> > > will be written in preboot it can be deleted by menu section.
> > 
> > The "menu" here, you refer to the thing you implemented? So fix that
> > instead of introducing broken code and a pile of workarounds.
> 
> With "menu" I mean env menucmd. U-Boot run command stored in env menucmd
> after preboot and before monitor loop. For example in menucmd can be my
> bootmenu, but there are no problems - no broken code! My bootmenu clear
> screan and show menu, so anything printed before menu entries will be
> deleted. This is not bug - Also in Grub or LILO is debug/output log
> cleaned when showing menu entries.

Ok anyway, but you implemented custom menu system anyway ... so let's clear 
this 
first, is common/menu.c useless for your application?

M
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
> > On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
> > > >  * if defined run env "premonitor" before Main Loop for Monitor
> > > >  Processing
> > >
> > > What is this good for?
> >
> > before running monitor loop I'd like write some info to console (specific
> > board info, board commands, board macros). but if these info will be
> > written in preboot it can be deleted by menu section.
>
> The "menu" here, you refer to the thing you implemented? So fix that instead
> of introducing broken code and a pile of workarounds.

With "menu" I mean env menucmd. U-Boot run command stored in env menucmd after
preboot and before monitor loop. For example in menucmd can be my bootmenu,
but there are no problems - no broken code! My bootmenu clear screan and show
menu, so anything printed before menu entries will be deleted. This is not bug
- Also in Grub or LILO is debug/output log cleaned when showing menu entries.

--
Pali Rohár
pali.ro...@gmail.com

signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
> On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
> > >  * if defined run env "premonitor" before Main Loop for Monitor
> > >  Processing
> > 
> > What is this good for?
> 
> before running monitor loop I'd like write some info to console (specific
> board info, board commands, board macros). but if these info will be
> written in preboot it can be deleted by menu section.

The "menu" here, you refer to the thing you implemented? So fix that instead of 
introducing broken code and a pile of workarounds.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
> >  * if defined run env "premonitor" before Main Loop for Monitor Processing
>
> What is this good for?
>

before running monitor loop I'd like write some info to console (specific
board info, board commands, board macros). but if these info will be written
in preboot it can be deleted by menu section.

--
Pali Rohár
pali.ro...@gmail.com

signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
>  * if defined run env "premonitor" before Main Loop for Monitor Processing

What is this good for?
> 
> Signed-off-by: Pali Rohár 
> ---
> Changes since original version:
>- removed #ifdef CONFIG_PREMONITOR in main.c
> 
>  common/env_common.c |3 +++
>  common/main.c   |4 
>  2 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/common/env_common.c b/common/env_common.c
> index 71811c4..1c2360d 100644
> --- a/common/env_common.c
> +++ b/common/env_common.c
> @@ -92,6 +92,9 @@ const uchar default_environment[] = {
>  #ifdef   CONFIG_PREBOOT
>   "preboot="  CONFIG_PREBOOT  "\0"
>  #endif
> +#ifdef   CONFIG_PREMONITOR
> + "premonitor="   CONFIG_PREMONITOR   "\0"
> +#endif
>  #ifdef   CONFIG_ROOTPATH
>   "rootpath=" CONFIG_ROOTPATH "\0"
>  #endif
> diff --git a/common/main.c b/common/main.c
> index 503d6c4..e0c262c 100644
> --- a/common/main.c
> +++ b/common/main.c
> @@ -427,6 +427,10 @@ void main_loop (void)
>   }
>  #endif
> 
> + s = getenv("premonitor");
> + if (s)
> + run_command2(s, 0);
> +
>   /*
>* Main Loop for Monitor Command Processing
>*/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot