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 8C1B6C433F5 for ; Wed, 19 Jan 2022 15:01:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 72C2A8383B; Wed, 19 Jan 2022 16:01:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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="YIcvDdf8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE63F83852; Wed, 19 Jan 2022 16:01:51 +0100 (CET) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (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 D89CC832E3 for ; Wed, 19 Jan 2022 16:01:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x833.google.com with SMTP id f5so2508845qtp.11 for ; Wed, 19 Jan 2022 07:01:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EQIawmDmGoG+5/G3C/Hdc3C/BijOSZ7WpZNDkL8Cpws=; b=YIcvDdf83m5ev45OutpIBM8czF/+i6mFcU5BfpVUlrWb6pzN4YiohrCNkhtWckeyBI 8fGiFFH+vO9UaFVlrE+Qm5E5r2uhLtFaj8nrE6DXoN5zrQhi6idOeFvjArTHMGjXa2R7 g7+x3SHL218/M/wSW7z13OgKKybqNSvYKiS9g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EQIawmDmGoG+5/G3C/Hdc3C/BijOSZ7WpZNDkL8Cpws=; b=Ihg0gh/NLXU5EBs7FIPitEKJLroFw975GNu2MqHVbl0opWBOyO/Ua5ySRmGg/w15vG xB30qIOujN6+2NpYj6uL7PBq8WCPW6ikVSRSQv8AuiBgb8cv7vBpwRSDJ8Uu6c7qu4+p cHBntuLHIyeoPOTfD1A2frkvB6xE/wZRjZtIRc8pJKk49qQqQevgAlUagtCPE55aRp3b ytpICZTRIKSdSwm+uzkF9rWzbhUcb3r2D8nPWYAUvqsA0poBK2pm+2bmDC+jW5wFcHvB 64Zb+6Y67GZ5ji+0lkqpn7q3VJpLYop+Jys7aS0Ze8EZ/BiKMuynK1KX5VMdWVyBsy25 Np1Q== X-Gm-Message-State: AOAM530+uDLr7ua6ms1IhceYSe3JRs/38gKTFPHCYHxXapUkDfNvZIkI mwde/letcN4xYgpLwBqV5uwQoQ== X-Google-Smtp-Source: ABdhPJyflNoO28bvaRJXkrR2qSSNndPY9tywezfqtuSE7FZavpXzaxMAQ3ib0jzaneFgGfMwlg5VfA== X-Received: by 2002:ac8:7c4f:: with SMTP id o15mr1266284qtv.676.1642604503012; Wed, 19 Jan 2022 07:01:43 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id 20sm6074142qtw.88.2022.01.19.07.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 07:01:42 -0800 (PST) Date: Wed, 19 Jan 2022 10:01:40 -0500 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Ilias Apalodimas , Daniel Schwierzeck , Dennis Gilmore , Steffen Jaeckel , Lukas Auer , Michal Simek , Heinrich Schuchardt Subject: Re: [PATCH v3 31/31] RFC: Switch rpi over to use bootstd Message-ID: <20220119150140.GA7004@bill-the-cat> References: <20220119014315.1938157-1-sjg@chromium.org> <20220119014315.1938157-21-sjg@chromium.org> <20220119140417.GQ2631111@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: 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.2 at phobos.denx.de X-Virus-Status: Clean --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 19, 2022 at 07:37:36AM -0700, Simon Glass wrote: > Hi Tom, >=20 > On Wed, 19 Jan 2022 at 07:04, Tom Rini wrote: > > > > On Tue, Jan 18, 2022 at 06:43:15PM -0700, Simon Glass wrote: > > > > > Switch this over, for testing purposes. > > > > > > Signed-off-by: Simon Glass > > > --- > > > > > > (no changes since v1) > > > > > > boot/Kconfig | 3 ++- > > > include/configs/rpi.h | 39 ++------------------------------------- > > > 2 files changed, 4 insertions(+), 38 deletions(-) > > > > > > diff --git a/boot/Kconfig b/boot/Kconfig > > > index 9cf1d013f20..eab3c0f3467 100644 > > > --- a/boot/Kconfig > > > +++ b/boot/Kconfig > > > @@ -1124,7 +1124,8 @@ config USE_BOOTCOMMAND > > > config BOOTCOMMAND > > > string "bootcmd value" > > > depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE > > > - default "run distro_bootcmd" if DISTRO_DEFAULTS > > > + default "bootflow scan -lb" if BOOTSTD > > > + default "run distro_bootcmd" if !BOOTSTD && DISTRO_DEFAULTS > > > help > > > This is the string of commands that will be used as bootcmd a= nd if > > > AUTOBOOT is set, automatically run. > > > diff --git a/include/configs/rpi.h b/include/configs/rpi.h > > > index d5e064fb379..ea373d0c221 100644 > > > --- a/include/configs/rpi.h > > > +++ b/include/configs/rpi.h > > > @@ -133,47 +133,12 @@ > > > "fdt_addr_r=3D0x02600000\0" \ > > > "ramdisk_addr_r=3D0x02700000\0" > > > > > > -#if CONFIG_IS_ENABLED(CMD_MMC) > > > - #define BOOT_TARGET_MMC(func) \ > > > - func(MMC, mmc, 0) \ > > > - func(MMC, mmc, 1) \ > > > - func(MMC, mmc, 2) > > > -#else > > > - #define BOOT_TARGET_MMC(func) > > > -#endif > > > - > > > -#if CONFIG_IS_ENABLED(CMD_USB) > > > - #define BOOT_TARGET_USB(func) func(USB, usb, 0) > > > -#else > > > - #define BOOT_TARGET_USB(func) > > > -#endif > > > - > > > -#if CONFIG_IS_ENABLED(CMD_PXE) > > > - #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) > > > -#else > > > - #define BOOT_TARGET_PXE(func) > > > -#endif > > > - > > > -#if CONFIG_IS_ENABLED(CMD_DHCP) > > > - #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) > > > -#else > > > - #define BOOT_TARGET_DHCP(func) > > > -#endif > > > - > > > -#define BOOT_TARGET_DEVICES(func) \ > > > - BOOT_TARGET_MMC(func) \ > > > - BOOT_TARGET_USB(func) \ > > > - BOOT_TARGET_PXE(func) \ > > > - BOOT_TARGET_DHCP(func) > > > - > > > -#include > > > - > > > #define CONFIG_EXTRA_ENV_SETTINGS \ > > > "dhcpuboot=3Dusb start; dhcp u-boot.uimg; bootm\0" \ > > > + "boot_targets=3Dmmc0 mmc1 usb0 pxe dhcp\0" \ > > > > We have the indirect defines to func(...) everywhere so that if a > > feature is disabled we still build + function, as otherwise it's a loud > > link error. I assume with this we just get a try and fail move to the > > next target at run time, yes? >=20 > Yes, that's right. But I hope that boards actually set up the boot > targets correctly so that only those that are actually supported are > enabled. What do you mean? They always do that, even today, which is why we have those #ifdef's in the distro boot board code. If the user ends up disabling something, it should still build and work. And honestly, given that dependencies are now in Kconfig, the distro_boot.h stuff could get away with dropping all of the "Enabled_foo_without_CONFIG_CMD_foo" stuff I bet. > This series has the basic functionality but once we have it in I need > to look at more individual cases, like all the devicetree variations. > As you can imagine it is tricky to convert hundreds of boards all at > one, but I plan to start with a few that I can test. Right, I'm just trying to make sure we have as much apples-to-apples understanding of both ways. --=20 Tom --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmHoJ8oACgkQFHw5/5Y0 tywVgwv/Xq3Y/x7KlHd7TgdUpkDr1fxj/7pc3HBCnhAlVwX2qvVUmHjmr5wcRkqu SBg1yY10e4Mu2yjjdbNoFigyfX4GMBxqwNs8mIvnxB/rIiofIMTnACyrZoPMcMIW a/JsxuKo/F4qTmql7dnVeVFlJosVmYvmD99O9bebIjplMt3/KqHcVTY89CzvsvPL UsE4QbTTFDO/lyaH0IhDb4tVoKQCMBJOlFxqXaaXZqAKb4QBP4mPEpvaJHYbFbBD uttW9ZqeGuBldZmYQY2mvGn96Haz6faAa/ZQuQq/t6JhnlB76noqPOoPbsHIiICW IxlAOA2xbokBvNB2TkDGNH7ic9B0RCvCncxhriO6t78RIR8HhuV+8p8yNk7pq0DA VWfS6Rg0j4RFQjX56jQQZR90ujfsz1Orm5KLShWoSBQE4BrogIl18htUj6kMQ0nx oJXb35yOGjTxPbpZwu4o9PnZLnp+IkoVXmu8idKmQWo+mwElNR/RUmODYIyqfSgk lpcNy0sx =ui9k -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--