From patchwork Tue Sep 10 20:20:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Langsdorf X-Patchwork-Id: 274037 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3823A2C0116 for ; Wed, 11 Sep 2013 06:22:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3FBF64A068; Tue, 10 Sep 2013 22:22:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id unDy35BlyiPG; Tue, 10 Sep 2013 22:22:57 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CAFC64A06E; Tue, 10 Sep 2013 22:22:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D20D94A062 for ; Tue, 10 Sep 2013 22:21:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5tlBFZzZyRGF for ; Tue, 10 Sep 2013 22:20:51 +0200 (CEST) X-Greylist: delayed 345 seconds by postgrey-1.27 at theia; Tue, 10 Sep 2013 22:20:45 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp69.ord1c.emailsrvr.com (smtp69.ord1c.emailsrvr.com [108.166.43.69]) by theia.denx.de (Postfix) with ESMTPS id AE9A04A060 for ; Tue, 10 Sep 2013 22:20:45 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 131DC148318; Tue, 10 Sep 2013 16:20:44 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp1.relay.ord1c.emailsrvr.com (Authenticated sender: mark.langsdorf-AT-calxeda.com) with ESMTPSA id A79381482D1; Tue, 10 Sep 2013 16:20:25 -0400 (EDT) From: Mark Langsdorf To: u-boot@lists.denx.de Date: Tue, 10 Sep 2013 15:20:23 -0500 Message-Id: <1378844424-15506-1-git-send-email-mark.langsdorf@calxeda.com> X-Mailer: git-send-email 1.8.1.2 X-Mailman-Approved-At: Tue, 10 Sep 2013 22:22:42 +0200 Cc: Mark Langsdorf Subject: [U-Boot] [PATCH 1/2] autoboot: add an option to override keyed autoboot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de As originally implemented, setting the AUTOBOOT_KEYED config option will prevent users from breaking into the autoboot script with ctrl-c. Restore that option with a new config symbol. Signed-off-by: Mark Langsdorf --- common/main.c | 4 ++-- doc/README.autoboot | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/main.c b/common/main.c index ae37fee..dea48e4 100644 --- a/common/main.c +++ b/common/main.c @@ -392,13 +392,13 @@ static void process_boot_delay(void) debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : ""); if (bootdelay != -1 && s && !abortboot(bootdelay)) { -#ifdef CONFIG_AUTOBOOT_KEYED +#if defined(CONFIG_AUTOBOOT_KEYED) && !defined(CONFIG_AUTOBOOT_KEYED_CTRLC) int prev = disable_ctrlc(1); /* disable Control C checking */ #endif run_command_list(s, -1, 0); -#ifdef CONFIG_AUTOBOOT_KEYED +#if defined(CONFIG_AUTOBOOT_KEYED) && !defined(CONFIG_AUTOBOOT_KEYED_CTRLC) disable_ctrlc(prev); /* restore Control C checking */ #endif } diff --git a/doc/README.autoboot b/doc/README.autoboot index e4fabc9..6f35c7b 100644 --- a/doc/README.autoboot +++ b/doc/README.autoboot @@ -74,6 +74,7 @@ What they do "bootretry" is >= 0. CONFIG_AUTOBOOT_KEYED + CONFIG_AUTOBOOT_KEYED_CTRLC CONFIG_AUTOBOOT_PROMPT CONFIG_AUTOBOOT_DELAY_STR CONFIG_AUTOBOOT_STOP_STR @@ -135,6 +136,13 @@ What they do environment variable you can specify a second, alternate string (which allows you to have two "password" strings). + The CONFIG_AUTOBOOT_KEYED_CTRLC #define 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_ZERO_BOOTDELAY_CHECK If this option is defined, you can stop the autoboot process