summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-09-28 16:45:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-29 10:25:02 +0200
commit071eecf8c040782515512777b02573c79a3e9899 (patch)
tree7705ce2c9ae0fb4696ac10281ed2b8c15165ada5 /Documentation
parentb28bcba8662cf0e60d35ef30c8d284f320fc9b1c (diff)
downloadbarebox-071eecf8c040782515512777b02573c79a3e9899.tar.gz
barebox-071eecf8c040782515512777b02573c79a3e9899.tar.xz
defaultenv: provide defaults for generic reboot modes
While reboot mode magic identifiers can be very board specific, we can settle on common names to allow some generic reboot mode handling: - loader -> drop to bootloader shell on next boot - bootloader -> enable fastboot on next boot - recovery -> display barebox boot menu Boot modes loader and bootloader are admittedly a bit ambiguous, but this nomenclature was chosen, because it's already in use on Android and Rockchip systems. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/user/defaultenv-2.rst18
1 files changed, 14 insertions, 4 deletions
diff --git a/Documentation/user/defaultenv-2.rst b/Documentation/user/defaultenv-2.rst
index a79ae83d56..da766e4edc 100644
--- a/Documentation/user/defaultenv-2.rst
+++ b/Documentation/user/defaultenv-2.rst
@@ -19,10 +19,11 @@ All new boards should use defaultenv-2 exclusively.
The default environment is composed from different directories during compilation::
- defaultenv/defaultenv-2-base -> base files
- defaultenv/defaultenv-2-dfu -> overlay for DFU
- defaultenv/defaultenv-2-menu -> overlay for menus
- arch/$ARCH/boards/<board>/env -> board specific overlay
+ defaultenv/defaultenv-2-base -> base files
+ defaultenv/defaultenv-2-dfu -> overlay for DFU
+ defaultenv/defaultenv-2-reboot-mode -> overlay for reboot modes
+ defaultenv/defaultenv-2-menu -> overlay for menus
+ arch/$ARCH/boards/<board>/env -> board specific overlay
The content of the above directories is applied one after another. If the
same file exists in a later overlay, it will overwrite the preceding one.
@@ -37,6 +38,7 @@ and their respective included directories in ``defaultenv/Makefile``:
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW) += defaultenv-2-base
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu
+ bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE) += defaultenv-2-reboot-mode
bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1
/env/bin/init
@@ -138,3 +140,11 @@ there will be a file ``eth0`` with a content like this:
# put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover
exit 0
+
+/env/bmode/
+-----------
+
+This contains the files to be sourced when barebox detects that the OS
+had requested a specific reboot mode (via e.g. ``reboot bootloader``
+under Linux). After the ``/env/init`` scripts were executed, barebox will
+``source /env/bmode/${global.system.reboot_mode.prev}`` if available.