mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* blspec - autoboot + timeout/default
@ 2022-02-05 14:58 Frank Wunderlich
  2022-02-07  8:59 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Wunderlich @ 2022-02-05 14:58 UTC (permalink / raw)
  To: barebox

Hi,

can i boot directly to blspec-menu (boot -m sd.1) with setting in default env and boot a specific entry (by title/filename) after some time (e.g.3-5 sec)?

i have defined some blspec files in /mnt/sd.1/loader/entries/ and i want to show the menu by default and after some time the entry from specific file should be booted. this gives user the possibility to modify this conf to define his kernel for autoboot in headless mode.

i tried to modify defaultenv/nv/boot.default, but this needs filenames in /env/boot, no commands and if i use a script, it cannot start the "boot -m sd.1" because the /env/boot scripts run bootm (tried loading barebox with such script - ended with putting a separate script in /env/bin/)

btw. is there a way to load environment from a txt file from a specific partition (similar to uboots uEnv.txt)?

regards Frank


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


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

* Re: blspec - autoboot + timeout/default
  2022-02-05 14:58 blspec - autoboot + timeout/default Frank Wunderlich
@ 2022-02-07  8:59 ` Sascha Hauer
  2022-02-07 16:09   ` Aw: " Frank Wunderlich
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2022-02-07  8:59 UTC (permalink / raw)
  To: Frank Wunderlich; +Cc: barebox

On Sat, Feb 05, 2022 at 03:58:54PM +0100, Frank Wunderlich wrote:
> Hi,
> 
> can i boot directly to blspec-menu (boot -m sd.1) with setting in
> default env and boot a specific entry (by title/filename) after some
> time (e.g.3-5 sec)?

There is a -t <secs> option to the boot command. It seems however that
there is no possibility to select a specfic entry beforehand. The first
one would be booted.

> 
> i have defined some blspec files in /mnt/sd.1/loader/entries/ and i
> want to show the menu by default and after some time the entry from
> specific file should be booted. this gives user the possibility to
> modify this conf to define his kernel for autoboot in headless mode.
> 
> i tried to modify defaultenv/nv/boot.default, but this needs filenames
> in /env/boot, no commands and if i use a script, it cannot start the
> "boot -m sd.1" because the /env/boot scripts run bootm (tried loading
> barebox with such script - ended with putting a separate script in
> /env/bin/)

It should work by setting:

nv boot.default=myboot

With /env/boot/myboot:

#!/bin/sh

boot -m sd.1 -t 3

> 
> btw. is there a way to load environment from a txt file from a
> specific partition (similar to uboots uEnv.txt)?

The barebox environment is a directory tree rather than a list of
variables, so there is no way to load a text file as environment.
There is the loadenv command which takes the path to an environment
image as argument. You can generate such an image on the host
with the bareboxenv tool and then load it under barebox with loadenv.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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] 3+ messages in thread

* Aw: Re: blspec - autoboot + timeout/default
  2022-02-07  8:59 ` Sascha Hauer
@ 2022-02-07 16:09   ` Frank Wunderlich
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Wunderlich @ 2022-02-07 16:09 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi

> Gesendet: Montag, 07. Februar 2022 um 09:59 Uhr
> Von: "Sascha Hauer" <sha@pengutronix.de>
> An: "Frank Wunderlich" <frank-w@public-files.de>
> Cc: barebox@lists.infradead.org
> Betreff: Re: blspec - autoboot + timeout/default
>
> On Sat, Feb 05, 2022 at 03:58:54PM +0100, Frank Wunderlich wrote:
> > Hi,
> >
> > can i boot directly to blspec-menu (boot -m sd.1) with setting in
> > default env and boot a specific entry (by title/filename) after some
> > time (e.g.3-5 sec)?
>
> There is a -t <secs> option to the boot command. It seems however that
> there is no possibility to select a specfic entry beforehand. The first
> one would be booted.

mhm, then i need a way to add it...is there anything similar in blspec
not implemented in barebox or is this a function that needs to be added to specification too?

> > i have defined some blspec files in /mnt/sd.1/loader/entries/ and i
> > want to show the menu by default and after some time the entry from
> > specific file should be booted. this gives user the possibility to
> > modify this conf to define his kernel for autoboot in headless mode.
> >
> > i tried to modify defaultenv/nv/boot.default, but this needs filenames
> > in /env/boot, no commands and if i use a script, it cannot start the
> > "boot -m sd.1" because the /env/boot scripts run bootm (tried loading
> > barebox with such script - ended with putting a separate script in
> > /env/bin/)
>
> It should work by setting:
>
> nv boot.default=myboot

i want to avoid user environment...it should be defined in builtin env, but afaik i can set the boot.default in this too...but currently i appended only my scripts...

i can use the script next as first entry if it is handled correctly

> With /env/boot/myboot:
>
> #!/bin/sh
>
> boot -m sd.1 -t 3
>
> >
> > btw. is there a way to load environment from a txt file from a
> > specific partition (similar to uboots uEnv.txt)?
>
> The barebox environment is a directory tree rather than a list of
> variables, so there is no way to load a text file as environment.
> There is the loadenv command which takes the path to an environment
> image as argument. You can generate such an image on the host
> with the bareboxenv tool and then load it under barebox with loadenv.

binary import is not that userfriendly :) for me no problem. so there should be a way to define a blspec config as default...

regards Frank

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


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

end of thread, other threads:[~2022-02-07 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 14:58 blspec - autoboot + timeout/default Frank Wunderlich
2022-02-07  8:59 ` Sascha Hauer
2022-02-07 16:09   ` Aw: " Frank Wunderlich

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