mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] defenv-2: source /env/config after /env/init/*
@ 2013-01-25  9:37 Michael Olbrich
  2013-01-25 18:00 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Olbrich @ 2013-01-25  9:37 UTC (permalink / raw)
  To: barebox

This way variables in /env/config can actually overwrite things from
e.g. /env/init/config-board.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

This is really confusing right now. The comment in config-board says
"Change /env/config instead" and that doesn't work.

I'd like to see this in master as well, but that only works if these
commits are applied first:

f19a924 defaultenv-2: move ps1 to base/init/ps1
b26c1c3 defaultenv-2: execute init/* before timeout

otherwise global.autoboot_timeout and global.allow_color are set too late.

Michael

 defaultenv-2/base/bin/init |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init
index b606b63..4a1b22e 100644
--- a/defaultenv-2/base/bin/init
+++ b/defaultenv-2/base/bin/init
@@ -13,8 +13,6 @@ global linux.bootargs.dyn.ip
 global linux.bootargs.dyn.root
 global editcmd=sedit
 
-/env/config
-
 if [ -e /env/menu ]; then
 	echo -e -n "\nHit m for menu or any other key to stop autoboot: "
 else
@@ -33,6 +31,8 @@ for i in /env/init/*; do
 	. $i
 done
 
+/env/config
+
 timeout -a $global.autoboot_timeout -v key
 autoboot="$?"
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] defenv-2: source /env/config after /env/init/*
  2013-01-25  9:37 [PATCH] defenv-2: source /env/config after /env/init/* Michael Olbrich
@ 2013-01-25 18:00 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2013-01-25 18:00 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: barebox

On Fri, Jan 25, 2013 at 10:37:30AM +0100, Michael Olbrich wrote:
> This way variables in /env/config can actually overwrite things from
> e.g. /env/init/config-board.
> 
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
> 
> This is really confusing right now. The comment in config-board says
> "Change /env/config instead" and that doesn't work.
> 
> I'd like to see this in master as well, but that only works if these
> commits are applied first:
> 
> f19a924 defaultenv-2: move ps1 to base/init/ps1
> b26c1c3 defaultenv-2: execute init/* before timeout
> 
> otherwise global.autoboot_timeout and global.allow_color are set too late.

I stumbled upon this aswell. I think we need another solution though.
This patch does not apply to master. Currently the problem is that we
need the variables from /env/config before the init sequence, which
means that we have to source /env/config once, then the init sequence
and then /env/config again.

I think we have to move /env/init/config-board to /env/config-board for
each board and source it manually in /env/init. Better ideas?

Sascha


> 
> Michael
> 
>  defaultenv-2/base/bin/init |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init
> index b606b63..4a1b22e 100644
> --- a/defaultenv-2/base/bin/init
> +++ b/defaultenv-2/base/bin/init
> @@ -13,8 +13,6 @@ global linux.bootargs.dyn.ip
>  global linux.bootargs.dyn.root
>  global editcmd=sedit
>  
> -/env/config
> -
>  if [ -e /env/menu ]; then
>  	echo -e -n "\nHit m for menu or any other key to stop autoboot: "
>  else
> @@ -33,6 +31,8 @@ for i in /env/init/*; do
>  	. $i
>  done
>  
> +/env/config
> +
>  timeout -a $global.autoboot_timeout -v key
>  autoboot="$?"
>  
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-25 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25  9:37 [PATCH] defenv-2: source /env/config after /env/init/* Michael Olbrich
2013-01-25 18:00 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox