From patchwork Fri Sep 11 02:21:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1362190 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=S+SShcrl; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BnfgY4RmSz9sR4 for ; Fri, 11 Sep 2020 12:23:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B2BD8233E; Fri, 11 Sep 2020 04:21:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="S+SShcrl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB111822E3; Fri, 11 Sep 2020 04:21:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 064FE822E8 for ; Fri, 11 Sep 2020 04:21:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id z25so9412193iol.10 for ; Thu, 10 Sep 2020 19:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1koU1SkNnEHAXhi/vEr9NMmhw7YZmyUsfg2cPcMlOwU=; b=S+SShcrlCVDzhk/EyoBmLksb1yTI9l4ak7GNRhKMjooK2HweGlwsumBIoeVGWs2egF r4zwHC1YhdbT595xAeI4ukXrlRia1EKXJ/mlr5YSXgrl0OIMtBknUXcUGnt/ZmW0nPjY oQNw8FsZvvEMNhEak/rxNRL5Ikx7uKjXJKEno= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1koU1SkNnEHAXhi/vEr9NMmhw7YZmyUsfg2cPcMlOwU=; b=lXbMfPlh7mY9bHUzPxjB5qLDgHdNdRJrASI204R2hyjkKEZViy0pnGM14pKJb9gxTf aTxASEZSdhteVu6oPvR2fLCAGM6fYkmoPm+PRmcliYjR/b8HWYrv/AcKY2XV2Ns5fohA t0xzRmzPGMtx9bmxU3NgPG4ysRpgVXJ/b2iVvyBuy3R4wvpKKvVzzizsN6eaSiFw01rl cKmGsgBAEVzsKdXm73K4bYFlIKNLwFtoeJXpwAxWB/XL3mPRRftOefm2KqfZ+K50gVt7 +8f+RNpLqh7aKSRbJP2W+obaGVY+v1xPNmo0s6mi4K/JWvJPZL/DxuPU9U/2ffCViwUZ qmWg== X-Gm-Message-State: AOAM531lyJdUqiHrJ42RoCUHNrZEq4+WVTeyiOmkB7/FIkaob2aJNRkH K4Ctf/VvqulFoZQRBluJoBaTvOUQzubo7vjx X-Google-Smtp-Source: ABdhPJzx63+Js9f/AmCy8l+NC1RPuPdSsVHqbNpfWmhQX/jQC0AsjsqcJBMSM0ZlqNndtvlnN8hnIA== X-Received: by 2002:a6b:4f13:: with SMTP id d19mr48582iob.90.1599790899537; Thu, 10 Sep 2020 19:21:39 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id m7sm440078ili.26.2020.09.10.19.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 19:21:39 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Masahiro Yamada , Marek Vasut , Tom Rini , Simon Glass , AKASHI Takahiro , Heinrich Schuchardt , Michal Simek , Miquel Raynal , Patrick Delaunay , Philippe Reynes , Sam Protsenko Subject: [PATCH 05/16] Kconfig: Move autoboot options under boot options Date: Thu, 10 Sep 2020 20:21:16 -0600 Message-Id: <20200910202100.5.I73a31134329bda3aa5d1741a16830256c2b21e84@changeid> X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog In-Reply-To: <20200911022127.3451713-1-sjg@chromium.org> References: <20200911022127.3451713-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean At present the autoboot options are in cmd/Kconfig but they don't really relate to commands. They relate to booting, so move this menu under the boot menu. Signed-off-by: Simon Glass --- cmd/Kconfig | 117 -------------------------------------------- common/Kconfig.boot | 117 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 0761dbb7460..f9a30019540 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -66,123 +66,6 @@ config SYS_XTRACE To enable the tracer a variable "xtrace" needs to be defined in the environment. -menu "Autoboot options" - -config AUTOBOOT - bool "Autoboot" - default y - help - This enables the autoboot. See doc/README.autoboot for detail. - -config AUTOBOOT_KEYED - bool "Stop autobooting via specific input key / string" - default n - help - This option enables stopping (aborting) of the automatic - boot feature only by issuing a specific input key or - string. If not enabled, any input key will abort the - U-Boot automatic booting process and bring the device - to the U-Boot prompt for user input. - -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 - CONFIG_BOOTDELAY starts. If it is not defined there is no - output indicating that autoboot is in progress. - - Note that this define is used as the (only) argument to a - printf() call, so it may contain '%' format specifications, - provided that it also includes, sepearated by commas exactly - like in a printf statement, the required arguments. It is - the responsibility of the user to select only such arguments - that are valid in the given context. - -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. The string itself is hashed and compared against the hash - in the environment variable 'bootstopkeysha256'. If it matches then - boot stops and a command-line prompt is presented. - - This provides a way to ship a secure production device which can also - be accessed at the U-Boot command line. - -config AUTOBOOT_DELAY_STR - string "Delay autobooting via specific input key / string" - depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION - help - This option delays the automatic boot feature by issuing - a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR - or the environment variable "bootdelaykey" is specified - and this string is received from console input before - autoboot starts booting, U-Boot gives a command prompt. The - U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is - used, otherwise it never times out. - -config AUTOBOOT_STOP_STR - string "Stop autobooting via specific input key / string" - depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION - help - This option enables stopping (aborting) of the automatic - boot feature only by issuing a specific input key or - string. If CONFIG_AUTOBOOT_STOP_STR or the environment - variable "bootstopkey" is specified and this string is - received from console input before autoboot starts booting, - U-Boot gives a command prompt. The U-Boot prompt never - times out, even if CONFIG_BOOT_RETRY_TIME is used. - -config AUTOBOOT_KEYED_CTRLC - bool "Enable Ctrl-C autoboot interruption" - depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION - default n - help - This option allows for the boot sequence to be interrupted - by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey". - Setting this variable provides an escape sequence from the - limited "password" strings. - -config AUTOBOOT_STOP_STR_SHA256 - string "Stop autobooting via SHA256 encrypted password" - depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION - help - This option adds the feature to only stop the autobooting, - and therefore boot into the U-Boot prompt, when the input - string / password matches a values that is encypted via - a SHA256 hash and saved in the environment. - -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. - -config AUTOBOOT_MENUKEY - int "ASCII value of boot key to show a menu" - default 0 - depends on AUTOBOOT_USE_MENUKEY - help - If this key is pressed to stop autoboot, then the commands in the - environment variable 'menucmd' will be executed before boot starts. - For example, 33 means "!" in ASCII, so pressing ! at boot would take - this action. - -config AUTOBOOT_MENU_SHOW - bool "Show a menu on boot" - depends on CMD_BOOTMENU - help - This enables the boot menu, controlled by environment variables - defined by the board. The menu starts after running the 'preboot' - environmnent variable (if enabled) and before handling the boot delay. - See README.bootmenu for more details. - -endmenu - config BUILD_BIN2C bool diff --git a/common/Kconfig.boot b/common/Kconfig.boot index f356f7f39d9..4c67510e6c8 100644 --- a/common/Kconfig.boot +++ b/common/Kconfig.boot @@ -692,4 +692,121 @@ config SPI_BOOT endmenu +menu "Autoboot options" + +config AUTOBOOT + bool "Autoboot" + default y + help + This enables the autoboot. See doc/README.autoboot for detail. + +config AUTOBOOT_KEYED + bool "Stop autobooting via specific input key / string" + default n + help + This option enables stopping (aborting) of the automatic + boot feature only by issuing a specific input key or + string. If not enabled, any input key will abort the + U-Boot automatic booting process and bring the device + to the U-Boot prompt for user input. + +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 + CONFIG_BOOTDELAY starts. If it is not defined there is no + output indicating that autoboot is in progress. + + Note that this define is used as the (only) argument to a + printf() call, so it may contain '%' format specifications, + provided that it also includes, sepearated by commas exactly + like in a printf statement, the required arguments. It is + the responsibility of the user to select only such arguments + that are valid in the given context. + +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. The string itself is hashed and compared against the hash + in the environment variable 'bootstopkeysha256'. If it matches then + boot stops and a command-line prompt is presented. + + This provides a way to ship a secure production device which can also + be accessed at the U-Boot command line. + +config AUTOBOOT_DELAY_STR + string "Delay autobooting via specific input key / string" + depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION + help + This option delays the automatic boot feature by issuing + a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR + or the environment variable "bootdelaykey" is specified + and this string is received from console input before + autoboot starts booting, U-Boot gives a command prompt. The + U-Boot prompt will time out if CONFIG_BOOT_RETRY_TIME is + used, otherwise it never times out. + +config AUTOBOOT_STOP_STR + string "Stop autobooting via specific input key / string" + depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION + help + This option enables stopping (aborting) of the automatic + boot feature only by issuing a specific input key or + string. If CONFIG_AUTOBOOT_STOP_STR or the environment + variable "bootstopkey" is specified and this string is + received from console input before autoboot starts booting, + U-Boot gives a command prompt. The U-Boot prompt never + times out, even if CONFIG_BOOT_RETRY_TIME is used. + +config AUTOBOOT_KEYED_CTRLC + bool "Enable Ctrl-C autoboot interruption" + depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION + default n + help + This option allows for the boot sequence to be interrupted + by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey". + Setting this variable provides an escape sequence from the + limited "password" strings. + +config AUTOBOOT_STOP_STR_SHA256 + string "Stop autobooting via SHA256 encrypted password" + depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION + help + This option adds the feature to only stop the autobooting, + and therefore boot into the U-Boot prompt, when the input + string / password matches a values that is encypted via + a SHA256 hash and saved in the environment. + +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. + +config AUTOBOOT_MENUKEY + int "ASCII value of boot key to show a menu" + default 0 + depends on AUTOBOOT_USE_MENUKEY + help + If this key is pressed to stop autoboot, then the commands in the + environment variable 'menucmd' will be executed before boot starts. + For example, 33 means "!" in ASCII, so pressing ! at boot would take + this action. + +config AUTOBOOT_MENU_SHOW + bool "Show a menu on boot" + depends on CMD_BOOTMENU + help + This enables the boot menu, controlled by environment variables + defined by the board. The menu starts after running the 'preboot' + environmnent variable (if enabled) and before handling the boot delay. + See README.bootmenu for more details. + +endmenu + endmenu # Booting