doc: fix mistyped "env flags" command
[pandora-u-boot.git] / boot / Kconfig
index 235c5a7..3d7aabd 100644 (file)
@@ -20,6 +20,21 @@ config TIMESTAMP
          loaded that does not, the message 'Wrong FIT format: no timestamp'
          is shown.
 
+config BUTTON_CMD
+       bool "Support for running a command if a button is held during boot"
+       depends on CMDLINE
+       depends on BUTTON
+       help
+         For many embedded devices it's useful to enter a special flashing mode
+         such as fastboot mode when a button is held during boot. This option
+         allows arbitrary commands to be assigned to specific buttons. These will
+         be run after "preboot" if the button is held. Configuration is done via
+         the environment variables "button_cmd_N_name" and "button_cmd_N" where n is
+         the button number (starting from 0). e.g:
+
+           "button_cmd_0_name=vol_down"
+           "button_cmd_0=fastboot usb 0"
+
 menuconfig FIT
        bool "Flattened Image Tree (FIT)"
        select HASH
@@ -346,8 +361,16 @@ config PXE_UTILS
        help
          Utilities for parsing PXE file formats.
 
-config BOOT_DEFAULTS
-       bool  # Common defaults for standard boot and distroboot
+config BOOT_DEFAULTS_FEATURES
+       bool
+       select SUPPORT_RAW_INITRD
+       select ENV_VARS_UBOOT_CONFIG
+       imply USB_STORAGE
+       imply EFI_PARTITION
+       imply ISO_PARTITION
+
+config BOOT_DEFAULTS_CMDS
+       bool
        imply USE_BOOTCOMMAND
        select CMD_ENV_EXISTS
        select CMD_EXT2
@@ -358,14 +381,14 @@ config BOOT_DEFAULTS
        select CMD_DHCP if CMD_NET
        select CMD_PING if CMD_NET
        select CMD_PXE if CMD_NET
-       select SUPPORT_RAW_INITRD
-       select ENV_VARS_UBOOT_CONFIG
        select CMD_BOOTI if ARM64
        select CMD_BOOTZ if ARM && !ARM64
        imply CMD_MII if NET
-       imply USB_STORAGE
-       imply EFI_PARTITION
-       imply ISO_PARTITION
+
+config BOOT_DEFAULTS
+       bool  # Common defaults for standard boot and distroboot
+       select BOOT_DEFAULTS_FEATURES
+       select BOOT_DEFAULTS_CMDS if CMDLINE
        help
          These are not required but are commonly needed to support a good
          selection of booting methods. Enable this to improve the capability
@@ -418,6 +441,7 @@ config VPL_BOOTSTD
 config BOOTSTD_FULL
        bool "Enhanced features for standard boot"
        default y if SANDBOX
+       imply BOOTSTD_DEFAULTS
        help
          This enables various useful features for standard boot, which are not
          essential for operation:
@@ -431,7 +455,6 @@ config BOOTSTD_FULL
 config BOOTSTD_DEFAULTS
        bool "Select some common defaults for standard boot"
        depends on BOOTSTD
-       imply USE_BOOTCOMMAND
        select BOOT_DEFAULTS
        select BOOTMETH_DISTRO
        help
@@ -452,6 +475,18 @@ config BOOTSTD_BOOTCOMMAND
          standard boot does not support all of the features of distro boot
          yet.
 
+config BOOTSTD_PROG
+       bool "Use programmatic boot"
+       depends on !CMDLINE
+       default y
+       help
+         Enable this to provide a board_run_command() function which can boot
+         a systen without using commands. If the boot fails, then U-Boot will
+         panic.
+
+         Note: This currently has many limitations and is not a useful booting
+         solution. Future work will eventually make this a viable option.
+
 config BOOTMETH_GLOBAL
        bool
        help
@@ -504,7 +539,7 @@ config BOOTMETH_EXTLINUX_PXE
 
 config BOOTMETH_EFILOADER
        bool "Bootdev support for EFI boot"
-       depends on EFI_LOADER
+       depends on EFI_BINARY_EXEC
        default y
        help
          Enables support for EFI boot using bootdevs. This makes the
@@ -536,10 +571,10 @@ config BOOTMETH_VBE
 
 config BOOTMETH_DISTRO
        bool  # Options needed to boot any distro
-       select BOOTMETH_SCRIPT  # E.g. Armbian uses scripts
+       select BOOTMETH_SCRIPT if CMDLINE # E.g. Armbian uses scripts
        select BOOTMETH_EXTLINUX  # E.g. Debian uses these
        select BOOTMETH_EXTLINUX_PXE if CMD_PXE && CMD_NET && DM_ETH
-       select BOOTMETH_EFILOADER if EFI_LOADER # E.g. Ubuntu uses this
+       select BOOTMETH_EFILOADER if EFI_BINARY_EXEC # E.g. Ubuntu uses this
 
 config SPL_BOOTMETH_VBE
        bool "Bootdev support for Verified Boot for Embedded (SPL)"
@@ -664,6 +699,7 @@ config BOOTMETH_SANDBOX
 config BOOTMETH_SCRIPT
        bool "Bootdev support for U-Boot scripts"
        default y if BOOTSTD_FULL
+       depends on CMDLINE
        select HUSH_PARSER
        help
          Enables support for booting a distro via a U-Boot script. This makes
@@ -685,6 +721,49 @@ config LEGACY_IMAGE_FORMAT
          loaded. If a board needs the legacy image format support in this
          case, enable it here.
 
+config MEASURED_BOOT
+       bool "Measure boot images and configuration when booting without EFI"
+       depends on HASH && TPM_V2
+       help
+         This option enables measurement of the boot process when booting
+         without UEFI . Measurement involves creating cryptographic hashes
+         of the binary images that are booting and storing them in the TPM.
+         In addition, a log of these hashes is stored in memory for the OS
+         to verify the booted images and configuration. Enable this if the
+         OS has configured some memory area for the event log and you intend
+         to use some attestation tools on your system.
+
+if MEASURED_BOOT
+       config MEASURE_DEVICETREE
+       bool "Measure the devicetree image"
+       default y if MEASURED_BOOT
+       help
+         On some platforms, the devicetree is not static as it may contain
+         random MAC addresses or other such data that changes each boot.
+         Therefore, it should not be measured into the TPM. In that case,
+         disable the measurement here.
+
+       config MEASURE_IGNORE_LOG
+       bool "Ignore the existing event log"
+       default n
+       help
+         On platforms that use an event log memory region that persists
+         through system resets and are the first stage bootloader, then
+         this option should be enabled to ignore any existing data in the
+         event log memory region.
+endif # MEASURED_BOOT
+
+config SYS_BOOTM_LEN
+       hex "Maximum size of a decompresed OS image"
+       depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \
+               LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT
+       default 0x4000000 if PPC || ARM64
+       default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7
+       default 0x800000
+       help
+         This is the maximum size of the buffer that is used to decompress the OS
+         image in to if attempting to boot a compressed image.
+
 config SUPPORT_RAW_INITRD
        bool "Enable raw initrd images"
        help
@@ -693,14 +772,6 @@ config SUPPORT_RAW_INITRD
          address of the initrd must be augmented by it's size, in the following
          format: "<initrd address>:<initrd size>".
 
-config ARCH_FIXUP_FDT_MEMORY
-       bool "Enable arch_fixup_memory_banks() call"
-       default y if OF_LIBFDT
-       help
-         Enable FDT memory map syncup before OS boot. This feature can be
-         used for booting OS with different memory setup where the part of
-         the memory location should be used for different purpose.
-
 config CHROMEOS
        bool "Support booting Chrome OS"
        help
@@ -785,6 +856,7 @@ endmenu             # Boot images
 
 config DISTRO_DEFAULTS
        bool "(deprecated) Script-based booting of Linux distributions"
+       select CMDLINE
        select BOOT_DEFAULTS
        select AUTO_COMPLETE
        select CMDLINE_EDITING
@@ -1170,14 +1242,16 @@ menu "Autoboot options"
 
 config AUTOBOOT
        bool "Autoboot"
+       depends on CMDLINE
        default y
        help
          This enables the autoboot.  See doc/README.autoboot for detail.
 
+if AUTOBOOT
+
 config BOOTDELAY
        int "delay in seconds before automatically booting"
        default 2
-       depends on AUTOBOOT
        help
          Delay before automatically running bootcmd;
          set to 0 to autoboot with no delay, but you can stop it by key input.
@@ -1199,9 +1273,11 @@ config AUTOBOOT_KEYED
          U-Boot automatic booting process and bring the device
          to the U-Boot prompt for user input.
 
+if AUTOBOOT_KEYED
+
 config AUTOBOOT_FLUSH_STDIN
        bool "Enable flushing stdin before starting to read the password"
-       depends on AUTOBOOT_KEYED && !SANDBOX
+       depends on !SANDBOX
        help
          When this option is enabled stdin buffer will be flushed before
          starting to read the password.
@@ -1210,7 +1286,6 @@ config AUTOBOOT_FLUSH_STDIN
 
 config AUTOBOOT_PROMPT
        string "Autoboot stop prompt"
-       depends on AUTOBOOT_KEYED
        default "Autoboot in %d seconds\\n"
        help
          This string is displayed before the boot delay selected by
@@ -1226,7 +1301,6 @@ config AUTOBOOT_PROMPT
 
 config AUTOBOOT_ENCRYPTION
        bool "Enable encryption in autoboot stopping"
-       depends on AUTOBOOT_KEYED
        help
          This option allows a string to be entered into U-Boot to stop the
          autoboot.
@@ -1253,7 +1327,7 @@ config AUTOBOOT_SHA256_FALLBACK
 
 config AUTOBOOT_DELAY_STR
        string "Delay autobooting via specific input key / string"
-       depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
+       depends on !AUTOBOOT_ENCRYPTION
        help
          This option delays the automatic boot feature by issuing
          a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR
@@ -1265,7 +1339,7 @@ config AUTOBOOT_DELAY_STR
 
 config AUTOBOOT_STOP_STR
        string "Stop autobooting via specific input key / string"
-       depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
+       depends on !AUTOBOOT_ENCRYPTION
        help
          This option enables stopping (aborting) of the automatic
          boot feature only by issuing a specific input key or
@@ -1277,7 +1351,7 @@ config AUTOBOOT_STOP_STR
 
 config AUTOBOOT_KEYED_CTRLC
        bool "Enable Ctrl-C autoboot interruption"
-       depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION
+       depends on !AUTOBOOT_ENCRYPTION
        help
          This option allows for the boot sequence to be interrupted
          by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey".
@@ -1286,7 +1360,7 @@ config AUTOBOOT_KEYED_CTRLC
 
 config AUTOBOOT_NEVER_TIMEOUT
        bool "Make the password entry never time-out"
-       depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION && CRYPT_PW
+       depends on AUTOBOOT_ENCRYPTION && CRYPT_PW
        help
          This option removes the timeout from the password entry
          when the user first presses the <Enter> key before entering
@@ -1294,7 +1368,7 @@ config AUTOBOOT_NEVER_TIMEOUT
 
 config AUTOBOOT_STOP_STR_ENABLE
        bool "Enable fixed string to stop autobooting"
-       depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
+       depends on AUTOBOOT_ENCRYPTION
        help
          This option enables the feature to add a fixed stop
          string that is defined at compile time.
@@ -1325,9 +1399,12 @@ config AUTOBOOT_STOP_STR_SHA256
          includes a ":", the portion prior to the ":" will be treated
          as a salt value.
 
+endif  # AUTOBOOT_KEYED
+
+if !AUTOBOOT_KEYED
+
 config AUTOBOOT_USE_MENUKEY
        bool "Allow a specify key to run a menu from the environment"
-       depends on !AUTOBOOT_KEYED
        help
          If a specific key is pressed to stop autoboot, then the commands in
          the environment variable 'menucmd' are executed before boot starts.
@@ -1342,6 +1419,10 @@ config AUTOBOOT_MENUKEY
          For example, 33 means "!" in ASCII, so pressing ! at boot would take
          this action.
 
+endif
+
+endif  # AUTOBOOT
+
 config AUTOBOOT_MENU_SHOW
        bool "Show a menu on boot"
        depends on CMD_BOOTMENU
@@ -1449,6 +1530,15 @@ if OF_LIBFDT
 
 menu "Devicetree fixup"
 
+config OF_ENV_SETUP
+       bool "Run a command from environment to set up device tree before boot"
+       depends on CMD_FDT
+       help
+         This causes U-Boot to run a command from the environment variable
+         fdt_fixup before booting into the operating system, which can use the
+         fdt command to modify the device tree. The device tree is then passed
+         to the OS.
+
 config OF_BOARD_SETUP
        bool "Set up board-specific details in device tree before boot"
        help
@@ -1490,6 +1580,14 @@ config FDT_SIMPLEFB
          the presence of the simple frame buffer with associated reserved
          memory
 
+config ARCH_FIXUP_FDT_MEMORY
+       bool "Enable arch_fixup_memory_banks() call"
+       default y
+       help
+         Enable FDT memory map syncup before OS boot. This feature can be
+         used for booting OS with different memory setup where the part of
+         the memory location should be used for different purpose.
+
 endmenu
 
 endif # OF_LIBFDT
@@ -1529,6 +1627,7 @@ config BOOTARGS_SUBST
 
 config USE_BOOTCOMMAND
        bool "Enable a default value for bootcmd"
+       depends on CMDLINE
        help
          Provide a default value for the bootcmd entry in the environment.  If
          autoboot is enabled this is what will be run automatically.  Enable
@@ -1548,6 +1647,7 @@ config BOOTCOMMAND
 
 config USE_PREBOOT
        bool "Enable preboot"
+       depends on CMDLINE
        help
          When this option is enabled, the existence of the environment
          variable "preboot" will be checked immediately before starting the
@@ -1603,7 +1703,7 @@ menu "Configuration editor"
 
 config CEDIT
        bool "Configuration editor"
-       depends on BOOTSTD
+       depends on EXPO
        help
          Provides a way to deal with board configuration and present it to
          the user for adjustment.