From: Sascha Hauer <s.hauer@pengutronix.de>
To: George Pontis <GPontis@z9.com>
Cc: barebox@lists.infradead.org
Subject: Re: New environment ?
Date: Mon, 4 Mar 2013 21:53:20 +0100 [thread overview]
Message-ID: <20130304205320.GJ1906@pengutronix.de> (raw)
In-Reply-To: <004201ce176e$0ba22460$22e66d20$@com>
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
prev parent reply other threads:[~2013-03-04 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.4.1361466001.6115.barebox@lists.infradead.org>
2013-03-02 17:47 ` George Pontis
2013-03-04 20:53 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130304205320.GJ1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=GPontis@z9.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox