mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* New environment ?
       [not found] <mailman.4.1361466001.6115.barebox@lists.infradead.org>
@ 2013-03-02 17:47 ` George Pontis
  2013-03-04 20:53   ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: George Pontis @ 2013-03-02 17:47 UTC (permalink / raw)
  To: barebox

I'm interested to update my bsp to use the new environment. I am not finding
any info that describe the structure or how it is intended to be configured
and used. Can someone provide a pointer to something, or write a few
sentences on the subject ?

Geo.



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

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

* Re: New environment ?
  2013-03-02 17:47 ` New environment ? George Pontis
@ 2013-03-04 20:53   ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2013-03-04 20:53 UTC (permalink / raw)
  To: George Pontis; +Cc: barebox

Hi George,

On Sat, Mar 02, 2013 at 09:47:44AM -0800, George Pontis wrote:
> I'm interested to update my bsp to use the new environment. I am not finding
> any info that describe the structure or how it is intended to be configured
> and used. Can someone provide a pointer to something, or write a few
> sentences on the subject ?

I'm pretty sure I wrote something up, but I can't find it :(

So here is something new:

As with the old env the files are collected from different directories.
The basic files are in defaultenv-2/base/, the menu specific files are
in defaultenv-2/menu/. All files can be overwritten with board specific
files.

The defenv-2 has an init sequence, so all files in /env/init/ are
executed in alphabetical order during startup. Most notable in the
init sequence is /env/init/automount. Here automountpoints are created,
see http://wiki.barebox.org/doku.php?id=commands:automount.
Automount means that a fs is not directly mounted. Instead it is mounted
when the directory is first accessed. Optionally a command is executed
which can make the device to be mounted available (e.g. usb). The
automounting has the advantage that the possible mountpoints can be
configured and later a simple 'cp' will access the files.

Another thing worth noting is the 'ifup' script which can be used to
configure the network device in a Linux-like fashion. The config file
is in /env/network/eth0 and should be self explanatory.

The boot script itself expects boot entries in /env/boot/. boot <name>
will boot the corresponding entry. A single entry usually configures
the global variables (global.*) which bootm later evaluates. I orginally
did this to make it possible to configure everythin needed using
boot -d (dryrun) and later 'bootm' without further arguments could
be called. This way a boot entry could be dryrun first, then the user
can set additional variables before executing bootm. I'm thinking about
removing this extra step though.
Some extra scripts exist (/env/bin/bootargs-*) to make the setting
of the variables simpler for the /env/boot scripts.

If menu support and the menu commands are compiled in the scripts from
defaultenv-2/menu are compiled in. Typing 'exit' on the prompt (or 'm'
during autoboot timeout) will lead you to a menu which gives you access
to the most important config files and lets you boot the configured
entries.

I hope this helps for a first start.

Sascha


-- 
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-03-04 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.4.1361466001.6115.barebox@lists.infradead.org>
2013-03-02 17:47 ` New environment ? George Pontis
2013-03-04 20:53   ` Sascha Hauer

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