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 70B32C433FE for ; Fri, 30 Sep 2022 16:51:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 414A084DA3; Fri, 30 Sep 2022 18:51:09 +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="fBg6V4ZS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9FE284D9D; Fri, 30 Sep 2022 18:51:06 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (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 8078D84D94 for ; Fri, 30 Sep 2022 18:51:02 +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-qk1-x72e.google.com with SMTP id u28so3164414qku.2 for ; Fri, 30 Sep 2022 09:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=msYmCdMdLIgOwEEc0Xb8vXusq/QpeNqKzCKhiGOB1xM=; b=fBg6V4ZSfuYamhv2NuBO5ydm8emui0ZxWfvSlSPzWaKz0mN3C7zrh573Wv4fAA9LMT fcfrFgrkp7yk8YWkn0RtxpVMtni+y0fX5BK+d56aQVizF9VQ/P6lH8hKXPLilnX0Advp 1vVWqXT0xnEkz0ZvCuc8ETBsgHWr1S4mG2xJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=msYmCdMdLIgOwEEc0Xb8vXusq/QpeNqKzCKhiGOB1xM=; b=kg8MPy3jN9dNmUlOZYzCyZMlKAeBGoTZNSamj8qoasUyewiY2u12mtSIayDAHT8jVh n7R1VxPn3qsR+DepjXoqLxk/pOiPtSdEBGz9b01X8uEfDAGpDOlezazlq4e8JJGQwWlB SqAMt6dssUqE9Yk2+cGD6Pp/r993/Iv7+UWL45bKwIPhYJeEUdAI9B8GR1/AmfEQxNZ5 OFwQVePlGy+9YGP8GNqyC7hqevjuS/mWEf83AJ2RimnpNI2He7qsF9R5HrbMDPzcoGr+ a4hpBlBg/bnzkuoO9etGi9OMLFXHtwWpbLEz7WVhh/8LDQFNcA/6izStdTIv30YEw3qg GbkA== X-Gm-Message-State: ACrzQf29QSOi4/ge68MP63hijfZNVA5tsabxEkywpvuNoPyKmr5v7bU9 SnPNg+cXqQumFhsQmomPLzN3tw== X-Google-Smtp-Source: AMsMyM6CF1rdaDTGT5TqrKONhYSZ1VHLyiJsAkvFdznOmZlCg6zY1IIwMWdtAKXiNlRFdoO5EpofUQ== X-Received: by 2002:a05:620a:2808:b0:6bc:5d4a:a01a with SMTP id f8-20020a05620a280800b006bc5d4aa01amr6648152qkp.371.1664556661304; Fri, 30 Sep 2022 09:51:01 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-0186-ea3a-a82b-3964.res6.spectrum.com. [2603:6081:7b00:6400:186:ea3a:a82b:3964]) by smtp.gmail.com with ESMTPSA id r4-20020a05620a298400b006ce5f4720cdsm3314181qkp.47.2022.09.30.09.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 09:51:00 -0700 (PDT) Date: Fri, 30 Sep 2022 12:50:58 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Alper Nebi Yasak , Marek =?iso-8859-1?Q?Beh=FAn?= , Pali =?iso-8859-1?Q?Roh=E1r?= , Stefan Roese Subject: Re: [PATCH 31/45] spl: Allow multiple loaders of the same type Message-ID: <20220930165058.GY3044094@bill-the-cat> References: <20220925150248.2524421-1-sjg@chromium.org> <20220925150248.2524421-32-sjg@chromium.org> <20220930162829.GV3044094@bill-the-cat> <20220930163900.GX3044094@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SIAOfPybDqHGMRuo" 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.6 at phobos.denx.de X-Virus-Status: Clean --SIAOfPybDqHGMRuo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2022 at 10:45:01AM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Fri, 30 Sept 2022 at 10:39, Tom Rini wrote: > > > > On Fri, Sep 30, 2022 at 10:37:26AM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > On Fri, 30 Sept 2022 at 10:28, Tom Rini wrote: > > > > > > > > On Sun, Sep 25, 2022 at 09:02:34AM -0600, Simon Glass wrote: > > > > > > > > > At present we only support a single loader of each time. Extra on= es are > > > > > > > > Of each type not time, I assume. > > > > > > > > > ignored. This means that only one BOOT_DEVICE_BOARD can be used i= n the SPL > > > > > image. > > > > > > > > > > This is inconvenient since we sometimes want to provide several > > > > > board-specific drivers, albeit at different priorties. Add suppor= t for > > > > > this. > > > > > > > > > > This should have no functional change for existing boards. > > > > > > > > To be clearer here. Today I can build am335x_evm_defconfig, and it = will > > > > have support for (among others) X/Y-MODEM and SD/MMC booting, and i= f SPL > > > > loads via SD card, it will look at that same slot and find U-Boot, = or > > > > fail. > > > > > > > > This patch doesn't change that, yes? > > > > > > > > A later part of this series makes it possible, but not default? > > > > > > That's right, there is no change for existing boards, since they only > > > have only loader of each type. But it allows boards to change that and > > > have two loaders for a single type. This is done later for sandbox, > > > but it would actually be useful for a few other boards too, e.g. where > > > there are two board-specific ways of booting and we want to try both. > > > > I'm not following now, sorry. Can you elaborate on the example you're > > talking about please, either for sandbox or what it would look like on a > > hardware platform? >=20 > For sandbox we want to boot with VBE if available, but if not then we > want to use the existing loader, which just runs the next executable > (e.g. spl/u-boot-spl). Both of these are board-specific methods. The > current enum of boot methods is a bit of a pain, e.g. we have things > like this in ARM's spl.h because we cannot have more than one loader > of a certain type: >=20 > BOOT_DEVICE_MMC1, > BOOT_DEVICE_MMC2, > BOOT_DEVICE_MMC2_2, >=20 > BTW the loaders already have a priority which we can use to choose > which is more desirable. OK, so it's so that we could do VBE, but fall back if not possible? Is that really advisable? The historical reasoning behind that enum is that we want to know if we came from $X we want to use-or-fail the next stage also being $X. We do have a few cases I believe where the board knows "if $X then $Y" instead for some specific use cases. --=20 Tom --SIAOfPybDqHGMRuo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmM3HmsACgkQFHw5/5Y0 tyyYDwwAnLdx26Fo2n6NyOOGdfWTnulQYzJ1tvk73rNRxhzHoTVnlSLSlJWA+rNU nFzyB3LymSXh25SeKuMmNuplnUQ1wZBeUDCYeb0aTi/wQMXN/ldxtwrUV0woap8p DEp0/UaqA8GONiGk8K2DlivouoFVYXlj4YA3+7DPkQIo2JWPoKx43sjmCeV/S3Um mBUo+E1urZoBvZf2IAWXVbbWb/LIm1d4d2OrJQT5VXV3VkzN3R4JUVrXRaimt1E0 fnOX4DQctjnA/JkIVFxYJ2oawBXonN0+eHhRw1eON+0BG42U5ALSqoJ5xCFY/E5I sNxR8f8X7/mVu61U5Gt6YZso5wz6fBFXbYdDHhbbuA2j6/4KE9Rb8sKGhXMEsZT9 aXgl+rgMundQbZg+IEVgAux00p7vHHlgXEIz45F4K0GQrZ46yXvjufGjgzh3pcZQ GSNFG3vrAMgT4ShMnafgwbzytqiDT8KE4tsBhmghovf8jDH9egOXhQLCeC4KEUEk qXo+Ox8O =nRhP -----END PGP SIGNATURE----- --SIAOfPybDqHGMRuo--