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 A283DC74A5B for ; Wed, 29 Mar 2023 14:17:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D89B858DA; Wed, 29 Mar 2023 16:17:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="dNp/D8J/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9C65858DA; Wed, 29 Mar 2023 16:17:10 +0200 (CEST) Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) (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 2D77180B9E for ; Wed, 29 Mar 2023 16:17:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb34.google.com with SMTP id f188so1038874ybb.3 for ; Wed, 29 Mar 2023 07:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1680099425; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1Uz2TDr4lNXcisyGcTw9y7XdeKp5g+BTpMQi24Mz2Ok=; b=dNp/D8J/7E/n45FQLSLwjUz3UV6YO/zKn6yUkp2zuGUzNVlkzHVa9sn/CpBit6axRH 0JrG3eUSLbBBv9DkbbsYUjuza9aO/A0knFeZocRPdwgpBtcMRRyLtli+WrlQFa7GHkcT L3lgToeoZp9IV7yjHYGyFOrJHoaECz/ORsWvU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680099425; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1Uz2TDr4lNXcisyGcTw9y7XdeKp5g+BTpMQi24Mz2Ok=; b=b1IT5qfrPL2WYhGEWrc8lLdSgslNLXMS7EKqaYWNPJPXSmz7Fw2keABsKqoN8KUmuo fZGwJ4PtbbhVnSnEPjWUTrsbUmRrHi5Qw2Tgv8S1bGHWqRsKp1PzyBGNqwfawM/5i8VZ minj05h8un98SpOQXS3cxL2tD0PWn1PSAY8XtH/8YeQs0nNBTZYGkbjR0jjY58JROiwS T2oaaUQSh/OOw0oPCg1GD04fn7ojkiWqyHw2JSC54s3g0IDC6oxQGUIWJOkbYEPxNOqx TVS913ANzIMRhmEUA+C2LOq9QeqsHTu+DjN95wqmvVgjkcYFbjb73CSH57PcHvaOi98E Kj1Q== X-Gm-Message-State: AAQBX9dsKdbfd5edccCW/JlKbQOFOlJGG0YQcF9mUgc9fCNkuIXORJ9D qUWXiEWJDtL5kQpuBzt23u197w== X-Google-Smtp-Source: AKy350b8kW4tflZC42mWz9cqLzbK3aRgYupjjpSTWUTUqgPOzRE4BRsEZSjPxLltaNEaf5bTlwfJmg== X-Received: by 2002:a25:a267:0:b0:b64:beac:6979 with SMTP id b94-20020a25a267000000b00b64beac6979mr17536307ybi.15.1680099424664; Wed, 29 Mar 2023 07:17:04 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-aab4-31cf-c563-6345.res6.spectrum.com. [2603:6081:7b00:6400:aab4:31cf:c563:6345]) by smtp.gmail.com with ESMTPSA id o79-20020a25d752000000b00b7767ca748bsm3513874ybg.40.2023.03.29.07.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 07:17:04 -0700 (PDT) Date: Wed, 29 Mar 2023 10:17:02 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , huang lin , Jeffy Chen , Kever Yang , Philipp Tomsich , Vagrant Cascadian , Philippe Reynes Subject: Re: [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan Message-ID: <20230329141702.GC6083@bill-the-cat> References: <20230329201631.v4.1.I41a5e66644a895a311889b009116245245c741a5@changeid> <20230329071655.1959513-2-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xH3TM9+6eTXUKZ3M" Content-Disposition: inline In-Reply-To: <20230329071655.1959513-2-sjg@chromium.org> X-Clacks-Overhead: GNU Terry Pratchett 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 --xH3TM9+6eTXUKZ3M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 29, 2023 at 08:16:38PM +1300, Simon Glass wrote: > Currently this does not allow the -lb flags unless CMD_BOOTFLOW_FULL is > enabled, which means that we need two separate boot commands. Relax this > to make things easier. It is only a small amount of extra code. >=20 > Signed-off-by: Simon Glass > --- >=20 > (no changes since v1) >=20 > boot/Kconfig | 3 +-- > cmd/bootflow.c | 14 ++++++++++++-- > 2 files changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/boot/Kconfig b/boot/Kconfig > index 61ebc2750154..ae0e7b738c0c 100644 > --- a/boot/Kconfig > +++ b/boot/Kconfig > @@ -1554,8 +1554,7 @@ config USE_BOOTCOMMAND > config BOOTCOMMAND > string "bootcmd value" > depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE > - default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND && CMD_BOOTFLOW_FULL > - default "bootflow scan" if BOOTSTD_BOOTCOMMAND && !CMD_BOOTFLOW_FULL > + default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND > default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS > help > This is the string of commands that will be used as bootcmd and if > diff --git a/cmd/bootflow.c b/cmd/bootflow.c > index 42f6e14a4370..c345b020070f 100644 > --- a/cmd/bootflow.c > +++ b/cmd/bootflow.c > @@ -124,9 +124,19 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, i= nt flag, int argc, > if (!label) > dev =3D std->cur_bootdev; > } else { > + /* > + * allow -b and -l (which is ignored) but complain about > + * anything else > + */ > if (has_args) { > - printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n"); > - return CMD_RET_USAGE; > + char *p; > + > + for (p =3D argv[1] + 1; *p; p++) { > + if (*p !=3D 'b' && *p !=3D 'l') { > + printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n"); > + return CMD_RET_USAGE; > + } > + } > } > boot =3D true; > } I don't think this is worth it for the bit of growth everywhere, honestly. --=20 Tom --xH3TM9+6eTXUKZ3M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmQkSF4ACgkQFHw5/5Y0 tyyqHAv/TgTMIgJDLvWbqIsOjwvQdaulemX2dQGptM4PHqttMtVr2SHpCa4pVFie 52y/fSjv5r4QEmPKAHPtpQArYvnTI2sopw7IEXUr7JfuBeeykcaGQpvAn5sOGclk e5fV313iG9uRWYghz1GiD03kjC5VHHytGCzhIpySNhE5PYlG7YEipQV33MdoggFP q3+ZJUVm6qfhdXOo3PrQa7tvmkSPI5fentRk1aSzMsassMtIIyIfAvbjztI/kxwy 4Wutw4f7PRre/5APJL6ZSZ5BG1O49jEpJYpzy81v5SShkNQcUfBB1o16wJMasc13 PBOpb/zS9ilzZ5cpf3iJpMJ1VJXefSdM7prh5DeF1qhqD21bErze1mF10OgtKdPx w+Z1AI/C/XmMcPMnJFLktm+h0Zc3c9ue+slbKue9U7RtJbPctxiDz7gxR8m7g8/Q 2GRA0WuXD1IN3nR51IYejgsmonpNVX9803D7g0EKdBBpUr3C97f1+gEtN4zRKoxs 3GJbkM1I =9Hyp -----END PGP SIGNATURE----- --xH3TM9+6eTXUKZ3M--