9
0
Fork 0
Commit Graph

37 Commits

Author SHA1 Message Date
Steffen Trumtrar e1a843d668 defaultenv-2: Fix settings entry
There is no "settings-entries-edit" command. This results in a recursive call
to the settings menu. Use the missing "boot-entries-edit" command instead.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:26:09 +02:00
Sascha Hauer c8af035b41 Merge branch 'for-next/misc' 2013-05-06 09:30:28 +02:00
Jan Luebbe a9634ce95b defaultenv-2: init: display prompt after running /env/init/*
This allows init scripts to print messages to the console without messing
up the timeout prompt.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-24 07:56:25 +02:00
Sascha Hauer 4d43f79dd5 defaultenv-2: net: use oftree when existing
For booting with devicetree we had to adjust /env/boot/net manually.
Instead, test if a devicetree exists and if yes, use it. This makes
for a better default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:15:53 +02:00
Sascha Hauer 8f98a3a39c defaultenv-2: Fix verbose booting
During option parsing we use the variable BOOT_BOOTMOPTS, all other
scripts use BOOT_BOOTM_OPTS though. Fix this by using the same variable
everywhere.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:15:44 +02:00
Sascha Hauer 8f2c6a3d2b Merge branch 'for-next/misc' 2013-04-04 14:20:32 +02:00
Jean-Christophe PLAGNIOL-VILLARD 771bec2e63 defaultenv-2: move settings in a submenu
To be more clear

so on the mainmenu we will just have
 - the boot option
 - settings
 - shell
 - reset

when starting to have a long list of boot option the menu start to be big

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-15 08:24:21 +01:00
Vicente Bergas 942a79f05b defaultenv-2: don't load nonexistent file
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 09:24:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8be08d9cf2 defaultenv-2: add boot sequence
This allows to boot a sequence of boot entries until one succeeds.

boot sources can be passed in $global.boot.default, which is now treated
as a list. Also a list of boot entries can be specified as arguments
to the boot script. The entries can be:

- a plain filename from /env/boot/
- a full path to an arbitrary file
- a directory containing boot entries

With this this command:

boot net nand-ubi /env/boot.d

would first use the /env/boot/net entry, if this fails the /env/boot/nand-ubi
entry and if this also fails the files from /env/boot.d/ (which could also
be links to boot scripts)

To make the above the default, global.boot.default would be specified as:

global.boot.default="net nand-ubi /env/boot.d"

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-05 11:51:35 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Fabio Porcedda 88b9369518 defenv2: comment setting default values in /env/config
There is no need to set again default values in /env/config
because they are already set in /env/bin/init,
that allows /env/config-board to change those default values
without being overwritten by /env/config.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Fabio Porcedda 527835a784 defaultenv-2: fix base/init/ps1: don't reload /env/config
Remove the load of /env/config because is already done by /bin/init,
so it doesn't overwrite any changes done by previous /init/* scripts that
are loaded by /bin/init.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 15:03:06 +01:00
Sascha Hauer e55f9d10b4 defenv2: move config-board out of /env/init
Having the board config file in /env/init has the problem that
the settings in /env/config are overwritten in the init sequence.

This moves the config-board files to /env/ and sources them explicitly
from /env/bin/init before sourcing /env/config

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 08:50:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD f19a924f92 defaultenv-2: move ps1 to base/init/ps1
so we can overwrite it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-21 09:04:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD b26c1c30eb defaultenv-2: execute init/* before timeout
so we can have splash, usb serial, etc...

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-16 21:32:24 +01:00
Sascha Hauer e3e11053ef defenv-2 menu: when booting failed wait for key press
When booting fails we will be immediately be back into the menu,
so the error message can't be seen. Also, boot in verbose mode
since in interactive mode the last bit of performance is not that
necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 23:40:19 +01:00
Sascha Hauer d78597af84 defenv-2: bring back /env/config
The idea of having /env/init/* scripts was to make the configuration
more flexible and customizable for boards. It turned out though that
people (including myself) do not find the place where they should
change these settings.

So this patch brings back /env/config for defenv-2. The individual
env/init/* scripts are removed and their content is added to
/env/init/config-board. This makes the values from /env/init/config-board
the board specific defaults which can be overwritten in /env/config.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 19:46:40 +01:00
Sascha Hauer fee5d94b9a defenv-2: remove some helper scripts
The added complexity of bootargs-ip-* and bootargs-root-* makes
understanding defenv-2 more complicated. remove them and open
code the scripts instead in their users.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:50:19 +01:00
Sascha Hauer 9103c6dcd7 defenv-2: remove initrd boot script
This is mostly an example and does not have a real use, so remove
it to not have it in each and every environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:50:19 +01:00
Sascha Hauer 8f29343d9d defenv-2: set username to 'none'
The current 'sha' setting, though admittedly very convenient for me,
was never intended to be in mainline.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 17:42:27 +02:00
Jan Luebbe 0502e3db73 defaultenv-2: boot: add missing space in error message
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:03:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD a004cbb5af defaultenv-2: eth0 add default global.dhcp.vendor_id
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-02 08:57:07 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9b22271b7b defaultenv-2: boot reset linux.bootargs.dyn. and bootm. globalvar
This is need for boot sequence to do not have the previous boot param.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-14 00:46:00 +08:00
Jean-Christophe PLAGNIOL-VILLARD 86df3fcd30 defaultenv-2: boot use global.linux.bootargs.dyn for dynamic globalvar
linux.bootargs.dyn.* will be cleared at the beginning of boot

This is need for boot sequence to do not have the previous boot param.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-14 00:46:00 +08:00
Jean-Christophe PLAGNIOL-VILLARD e23b943a42 defaultenv-2/ansi-colors: export color only if enable
This will allow to do not check it everywhere

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 00:45:38 +08:00
Jean-Christophe PLAGNIOL-VILLARD 94fd74dda7 command/mount: add autodetection support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-04 09:08:39 +02:00
Sascha Hauer bff2e86495 Merge branch 'for-next/defenv-2' 2012-08-01 17:49:27 +02:00
Teresa Gámez 63b3a39309 defaultenv-2: Add bootargs for booting from disk
Add support in defaultenv-2 for booting from disk (SD-Card, USB-Stick).

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-26 12:43:29 +02:00
Sascha Hauer 4604923f0c defenv-2: improve boot script
- add usage information
- add option parsing:
  -v verbose
  -v -v more verbose
  -l list b´possible boot sources
  -d dryrun

The dryrun option sets the global variables necessary for booting
but does not actually boot the system. This way it is possible to
make additional adjustments to the boot variables and then invoke
bootm manually.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:50:45 +02:00
Sascha Hauer 4561eae51a defenv-2: Add usage information for bootargs scripts
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:50:40 +02:00
Maxime Ripard 3d484187b3 Add bootargs script to boot on ext filesystems
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 22:15:27 +02:00
Sascha Hauer c5d53f0efd defaultenv-2 ifup: create network up state file for dhcp
We store the 'up' status of a network device in /tmp/network/$interface.
Create this file for dhcp aswell to prevent doing dhcp requests each
time ifup is called.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:45:46 +02:00
Sascha Hauer 52c31adcb0 defaultenv-2: remove global.tftp.path
This variable is set in /env/init/general and then used
in /env/boot/* which is a bit confusing. Also it does not
necessarily have to be a tftp path (could be nfs aswell).
Use a local variable in the scripts using it instead to make
the meaning a bit more clear.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:45:46 +02:00
Sascha Hauer d33909c5ed defaultenv-2: mount tftp server specified in $eth0.serverip
This is always the tftp server specified in /env/network/eth0,
this could be either the one returned from a dhcp request or
a manually specified one, but in the end it's always the right
one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:45:46 +02:00
Sascha Hauer 2ac974b541 defaultenv-2 ifup: Always overwrite eth0.serverip
if serverip is specified, also overwrite eth0.serverip in dhcp
case. This makes it possible to specify a different serverip
when the dhcp server returns the wrong ip (because the DHCP
might be a DSL router which does not provide tftp).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:45:46 +02:00
Sascha Hauer 64d22dec43 defaultenv-2: automount script: run mount only when ifup succeeds
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-23 16:14:57 +02:00
Sascha Hauer 0e8155229a Add next generation default environment template
This adds a new environment template which aims to be more flexible
and configurable. Instead of having mainly two scripts (a config script
and a boot script) this template uses initscripts which control the
startup behaviour and configuration. Also we have boot scripts in
/env/boot which configure a single boot configuration. Additional
boot entries can be added by board specific entries or during runtime
by copying and editing a template entry.

Some more helpers handle for example network interfaces which can now
be brought up with 'ifup'. We use the automount feature to configure
mountpoints together with the commands to bring up the devices behind
these mountpoints.

Optionally menu support is available which hides many details behind
a nice looking interface.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-18 12:26:52 +02:00