diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/README.bootcount | 51 | ||||
| -rw-r--r-- | doc/conf.py | 2 | ||||
| -rwxr-xr-x | doc/sphinx/rstFlatTable.py | 2 | ||||
| -rw-r--r-- | doc/uImage.FIT/source_file_format.txt | 5 |
4 files changed, 57 insertions, 3 deletions
diff --git a/doc/README.bootcount b/doc/README.bootcount new file mode 100644 index 00000000000..b1c22905c66 --- /dev/null +++ b/doc/README.bootcount @@ -0,0 +1,51 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Boot Count Limit +================ + +This allows to detect multiple failed attempts to boot Linux. + +After a power-on reset, "bootcount" variable will be initialized with 1, and +each reboot will increment the value by 1. + +If, after a reboot, the new value of "bootcount" exceeds the value of +"bootlimit", then instead of the standard boot action (executing the contents of +"bootcmd") an alternate boot action will be performed, and the contents of +"altbootcmd" will be executed. + +If the variable "bootlimit" is not defined in the environment, the Boot Count +Limit feature is disabled. If it is enabled, but "altbootcmd" is not defined, +then U-Boot will drop into interactive mode and remain there. + +It is the responsibility of some application code (typically a Linux +application) to reset the variable "bootcount", thus allowing for more boot +cycles. + +BOOTCOUNT_EXT +------------- + +This adds support for maintaining boot count in a file on an EXT filesystem. +The file to use is define by: + +SYS_BOOTCOUNT_EXT_INTERFACE +SYS_BOOTCOUNT_EXT_DEVPART +SYS_BOOTCOUNT_EXT_NAME + +The format of the file is: + +==== ================= +type entry +==== ================= +u8 magic +u8 version +u8 bootcount +u8 upgrade_available +==== ================= + +To prevent unattended usage of "altbootcmd" the "upgrade_available" variable is +used. +If "upgrade_available" is 0, "bootcount" is not saved, if "upgrade_available" is +1 "bootcount" is save. +So the Userspace Application must set the "upgrade_available" and "bootcount" +variables to 0, if a boot was successfully. +This also prevents writes on all reboots. diff --git a/doc/conf.py b/doc/conf.py index 0772fb6f0c8..8bb27ad9e25 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -37,7 +37,7 @@ needs_sphinx = '1.3' extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure'] # The name of the math extension changed on Sphinx 1.4 -if major == 1 and minor > 3: +if (major == 1 and minor > 3) or (major > 1): extensions.append("sphinx.ext.imgmath") else: extensions.append("sphinx.ext.pngmath") diff --git a/doc/sphinx/rstFlatTable.py b/doc/sphinx/rstFlatTable.py index f9a4b46dbe2..2019a55f6b1 100755 --- a/doc/sphinx/rstFlatTable.py +++ b/doc/sphinx/rstFlatTable.py @@ -53,8 +53,6 @@ from docutils.utils import SystemMessagePropagation # common globals # ============================================================================== -# The version numbering follows numbering of the specification -# (doc/books/kernel-doc-HOWTO). __version__ = '1.0' PY3 = sys.version_info[0] == 3 diff --git a/doc/uImage.FIT/source_file_format.txt b/doc/uImage.FIT/source_file_format.txt index 18d2aedcb73..884a58456f7 100644 --- a/doc/uImage.FIT/source_file_format.txt +++ b/doc/uImage.FIT/source_file_format.txt @@ -304,6 +304,11 @@ Normal kernel FIT image has data embedded within FIT structure. U-Boot image for SPL boot has external data. Existence of 'data-offset' can be used to identify which format is used. +For FIT image with external data, it would be better to align each blob of data +to block(512 byte) for block device, so that we don't need to do the copy when +read the image data in SPL. Pass '-B 0x200' to mkimage to align the FIT +structure and data to 512 byte, other values available for other align size. + 9) Examples ----------- |
