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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E92FAC47073 for ; Wed, 10 Jan 2024 18:08:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 07F9887732; Wed, 10 Jan 2024 19:08:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=manjaro.org header.i=@manjaro.org header.b="o5nmS0jB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6F5168791E; Wed, 10 Jan 2024 19:08:24 +0100 (CET) Received: from mail.manjaro.org (mail.manjaro.org [116.203.91.91]) (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 43F108750C for ; Wed, 10 Jan 2024 19:08:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsimic@manjaro.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1704910101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t0SdIIspe9x55+rEX9SjkRC2eIx1gCPcUhwYiXeXC70=; b=o5nmS0jBxZV/AHXcdjAaA3KIw75NsJfOgUXkqI2BPFBavL20Oaw6P3wY5j9Mro3ABjP4Mj kyjJ+Ym3sRD7GLv50VPorKAIgzAefbIUfz29S5RAT0DjapWqdvdNGZJiw6zdFOHNIFt95C 4F2Am0QLQ6cC65g44ftxliAmNJ84Wf14nuFDNUAy0Z6Fw8Q5Wo/BRBMwDRF4POWyZR2FPh qWEq9eJ5XFC2dRwPPlXgFpK20xW+ytBevur1vnpJFDNBPZBMONqIWOaXeSmZby6vVoe2np uQN25ILu+HdVc72zWo5wDvY9n2NElYcDbQmPMY24Jl8P/eJLV8QOdsFFsycGiw== Date: Wed, 10 Jan 2024 19:08:21 +0100 From: Dragan Simic To: Caleb Connolly Cc: Tom Rini , Simon Glass , Sumit Garg , u-boot@lists.denx.de, Svyatoslav Ryhel Subject: Re: [PATCH v2] boot: add support for button commands In-Reply-To: <20240109115310.1917139-1-caleb.connolly@linaro.org> References: <20240109115310.1917139-1-caleb.connolly@linaro.org> Message-ID: <6c46c19f28a1008550fe3c3249c034d4@manjaro.org> X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean On 2024-01-09 12:51, Caleb Connolly wrote: > With the relatively new button API in U-Boot, it's now much easier to > model the common usecase of mapping arbitrary actions to different > buttons during boot - for example entering fastboot mode, setting some > additional kernel cmdline arguments, or booting with a custom recovery > ramdisk, to name a few. > > Historically, this functionality has been implemented in board code, > making it fixed for a given U-Boot binary and requiring the code be > duplicated and modified for every board. > > Implement a generic abstraction to run an arbitrary command during boot > when a specific button is pressed. The button -> command mapping is > configured via environment variables with the following format: > > button_cmd_N_name=