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 23784C433F5 for ; Wed, 19 Jan 2022 16:21:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5319880A4F; Wed, 19 Jan 2022 17:21:26 +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="OMw51kko"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E211980202; Wed, 19 Jan 2022 17:21:24 +0100 (CET) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (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 B7BDF82849 for ; Wed, 19 Jan 2022 17:21:21 +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-qv1-xf2e.google.com with SMTP id a8so3632606qvx.2 for ; Wed, 19 Jan 2022 08:21:21 -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=M1RM7v/yCq+PHMOFDy8dlcf5pd9DaVkjIwa+4kp4QbM=; b=OMw51kkoRJYX2c8G8Z9oVLs5eXkZs5yTclNETXGgJoXnklMxMvEYT+HnPYnNS5ricZ Y2bIvAeYwbO6cIxcNZnxfHXgqhODmCK1qtOLGmiFITB1Si9xYyEUgePk3E2agU4PSAVr sW341PGEZehTHlDwKkEvFzmZhn5AbCF6RuPzs= 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=M1RM7v/yCq+PHMOFDy8dlcf5pd9DaVkjIwa+4kp4QbM=; b=a7TVk0o4P0zNJL8wWg1KvFqVDOg4N9H/yNhVcXpPKJ5zQZ0K470XgCU4JxeMG3X89T u5B7FOrUIWUaCZ2O+tRya+wdP+LKliVkOdm+2EnXRKHKLmctKE89icKk/qxIcJ2uyUu3 SecU51VOmQOUTWDS//2RhdFnlEVOs17Y1mqrZD9pcLR26E1llNfPV7o3i7GoHTWPqzJK 5yAgJIjpRYO4ZoWL8c5I/HJ4YPVHL1QFQrkLv/a0bvwRInjGUO3RcNwhGkvLp0ZcaTv/ 2QgJR7o78dyssj4Tx+YVnSNU9Z4MrnIbCn4hKEaQXWcJ3Gifgfii2myr5HPPpffKGdqp o2jQ== X-Gm-Message-State: AOAM533GBt3F/criP6tQ3uXjJDA2JUe/fUyLgvOA3cc/to1nx+1VWggF H46l9wRVQg7Da0mi9Ltn3jip6g== X-Google-Smtp-Source: ABdhPJznx8yXnGEuQ82F5WuqFLhl+oW2edoQ68uIUWGdUr+aTTwCxsu9NIttFhd6Dpjhnh1NvAepVw== X-Received: by 2002:a05:6214:5184:: with SMTP id kl4mr2365743qvb.101.1642609280351; Wed, 19 Jan 2022 08:21:20 -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 h6sm74682qkk.125.2022.01.19.08.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 08:21:19 -0800 (PST) Date: Wed, 19 Jan 2022 11:21:17 -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: <20220119162117.GD7004@bill-the-cat> References: <20220119014315.1938157-1-sjg@chromium.org> <20220119014315.1938157-21-sjg@chromium.org> <20220119140417.GQ2631111@bill-the-cat> <20220119150140.GA7004@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RhUH2Ysw6aD5utA4" 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 --RhUH2Ysw6aD5utA4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 19, 2022 at 09:09:51AM -0700, Simon Glass wrote: > Hi Tom, >=20 > On Wed, 19 Jan 2022 at 08:01, Tom Rini wrote: > > > > On Wed, Jan 19, 2022 at 07:37:36AM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > 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 bootc= md and 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? > > > > > > 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. >=20 > Then I don't think I understand your original question. With bootstd > if USB is disabled (for example) then the USB bootdev won't exist so > it won't look at USB. It is not so much a link error, just that the > device is not there. I mean, with "boot_targets=3Dmmc0 mmc1 usb0 pxe dhcp0" but CONFIG_MMC disabled, bootstd will gracefully fail, gracefully fail, boot from USB. --=20 Tom --RhUH2Ysw6aD5utA4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmHoOnoACgkQFHw5/5Y0 tyz6bQwAqxfMvLa1L0UB7E7ht9vgJ+y9+iMBBu+RyhpsD+5q6dOW2yoD+WwzbwIY 2d+YMhHUOAh5lI8/G+KANuUJY9f6f1ktgN3zWoQGBdtKC7xnr92WsWiRPOn8eASM MUh+o6N41ZtKHeHDilZPEdmPRcItiW+1L8bRTepUvoXUuaSuyXQ9OyVBn8zM1Zxo fLS4fCm714MifyzaFy8jhYGUASxkTP00r7Wnqvkd+ikWqouXwL/U8dwh3InOy4TT ccy36X5qMpKebhTNb9bxiC7Sb3Kxf5O4a/wmYYXX8soD3Ndyz7OzINScv9cdd9W+ 8lJLbaW9I2mbljb8M39LValpOY0Mzrlr4nsxGZAIgH2x+JnvLThpDT2V5DxUgNV8 Arlm6qIFcc9Wg8BrXgaEvNNLuvxKJxQBbvbISkmKpdGg8s2ExDgcrym8apcMUdmt 6+L4smoN8VfVT7NEN9X3qjtc+KhNTumy169AAKoGfZOCg9uXlyRSj/Bqblg6LcgP ec4/cd+I =nYCF -----END PGP SIGNATURE----- --RhUH2Ysw6aD5utA4--