From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F302AC07E9A for ; Wed, 14 Jul 2021 08:57:19 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E28461362 for ; Wed, 14 Jul 2021 08:57:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E28461362 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 10A86817D3; Wed, 14 Jul 2021 10:57:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gerhold.net header.i=@gerhold.net header.b="b/2xjJwq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 60AEC80FBA; Wed, 14 Jul 2021 10:56:48 +0200 (CEST) Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B37BB80EE5 for ; Wed, 14 Jul 2021 10:56:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=stephan@gerhold.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1626253000; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=X9Vl2NF+UPBLdqjjNz3sTC65fQ6jXrnFMeGuxjbkiRE=; b=b/2xjJwqhYGgQePUeS1RKDV9sKbFxIUFX27xPZEx0CycUcyGuSGr6ewQOxFJMWpUy7 aGZLvVVfGyCNJH/rtcoy4WzAMCcx3CsSHQjkQL7Pjx4qCWiK6cUTn9aLR8GVKUdLJzb4 WP91zbRlS2QHBYSPGcBf5zFihd7DSDeupm6Ujjj57Btd2Hao6M1rBUE9yUklCXxO7kmf Lpq3bOuy9Yf07qBiIRqNZD4+nS39MgUGsOYkQDS20QcDFlcp4gNu8r0PPBSxFJse4T8c AL0HPKqJFApaEVuOEX9/Oi6NdTC5PWdKGtprhKC5rZjI0Wp8/pAxZhVSENeXZdv35l9V OU3w== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxB4m6Ijuk=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.28.1 DYNA|AUTH) with ESMTPSA id Y070ccx6E8ueN8E (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 14 Jul 2021 10:56:40 +0200 (CEST) From: Stephan Gerhold To: u-boot@lists.denx.de Cc: Nicolas Dechesne , Ramon Fried , Stephan Gerhold Subject: [PATCH 2/3] board: dragonboard410c: Fix fastboot Date: Wed, 14 Jul 2021 10:56:25 +0200 Message-Id: <20210714085626.5961-3-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714085626.5961-1-stephan@gerhold.net> References: <20210714085626.5961-1-stephan@gerhold.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean At the moment pressing the volume down key does not actually launch fastboot. This is because setting "bootdelay" to "-1" actually disables autoboot and drops to the U-Boot console. It does not execute the "bootcmd". The correct value for "bootdelay" here would be "-2", which disables the delay and key checking and would immediately execute the "bootcmd". However, even better in this case is using "preboot" to trigger Fastboot. The advantage is that running "fastboot continue" will actually continue the autoboot process instead of ending up in the U-Boot shell. Also make sure to unset "preboot" again immediately in case the user saves the environment after triggering fastboot. Cc: Ramon Fried Fixes: aa043ee91a47 ("db410c: automatically launch fastboot") Signed-off-by: Stephan Gerhold --- board/qualcomm/dragonboard410c/dragonboard410c.c | 3 +-- configs/dragonboard410c_defconfig | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index 3b71881cac..371b3262f8 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -132,8 +132,7 @@ int misc_init_r(void) } if (dm_gpio_get_value(&resin)) { - env_set("bootdelay", "-1"); - env_set("bootcmd", "fastboot 0"); + env_set("preboot", "setenv preboot; fastboot 0"); printf("key_vol_down pressed - Starting fastboot.\n"); } diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig index dc9d0d893c..a46283f980 100644 --- a/configs/dragonboard410c_defconfig +++ b/configs/dragonboard410c_defconfig @@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y # CONFIG_ANDROID_BOOT_IMAGE is not set CONFIG_FIT=y CONFIG_OF_BOARD_SETUP=y +CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_MISC_INIT_R=y -- 2.32.0