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 X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62AF3C4338F for ; Mon, 23 Aug 2021 20:02:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 834786121E for ; Mon, 23 Aug 2021 20:01:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 834786121E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C9A5F81FC6; Mon, 23 Aug 2021 22:01:56 +0200 (CEST) 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="p6bJGEe2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E6F9681FC6; Mon, 23 Aug 2021 22:01:54 +0200 (CEST) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 2F68380394 for ; Mon, 23 Aug 2021 22:01:50 +0200 (CEST) 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-x82b.google.com with SMTP id d9so14825530qty.12 for ; Mon, 23 Aug 2021 13:01:50 -0700 (PDT) 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:user-agent; bh=C/eQ4eY72ihuXA8S38NW19wGPz79Uk0QsPqOi1URucg=; b=p6bJGEe2v8PbOQ9VyWeSrVQehVFXlg8CHjqMZlmnp7rlbEzGHiQPsbh/Ne65jJHsmK X484GR7XjYUDJOMZ+ZmX5sZuUfuKeWLyQTUR9NBlzyLglvqiT9dynWMJ/m/DF88f2o/M 5j28gdRoXec9mB4EEm/zd1GIGo08al1D88CwA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=C/eQ4eY72ihuXA8S38NW19wGPz79Uk0QsPqOi1URucg=; b=PbQW1acrHQ5bE2Lwpo9S6n2p7iYVn+D3RWNAnv9qGPg7D/PlUWWajxcG+lRsUADCit zgO4hDgrhAvcKczEiSKFdnBXygbrRgoJbT6FoI17fxkm0Co03uN/2m7FGd5YcO3D90xT DkPcBuWp9VjwIeKVcELRvf6lP8vIG6FEj8AsHszsqOOnd0W3F1Seh6rYP6Pu4sv9NSX0 FbeWyT9og44yzJ11AWpBbDK2kHKtRtzvx/ddC4bibGxIqQ5xfcyJbdG6QQMrXXkl6ACn EjRBAmYlwV2AF2LiBNAgnMh+UWd5O2k0EYcqp52y8btiGr77HqPdWTJbUMLWwrLu9P05 g14w== X-Gm-Message-State: AOAM531Ny/CY4enpoD1FmmY8SrtGPCU51XbZbqdYv2Lt8k92KIQ+xuNk 7rcPvyUibiIZ+Zw2oP952FDz7w== X-Google-Smtp-Source: ABdhPJwhp0taglN3jXO8BPfp2TqY8tzmzVTjuiPbxXAZcOqE/dkBDMOHSbUIUtMoZD6S6sltXqJUsQ== X-Received: by 2002:ac8:110b:: with SMTP id c11mr31017370qtj.388.1629748908908; Mon, 23 Aug 2021 13:01:48 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-180d-b350-bd40-4e05.res6.spectrum.com. [2603:6081:7b01:cbda:180d:b350:bd40:4e05]) by smtp.gmail.com with ESMTPSA id x21sm9069336qkf.76.2021.08.23.13.01.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Aug 2021 13:01:48 -0700 (PDT) Date: Mon, 23 Aug 2021 16:01:46 -0400 From: Tom Rini To: Simon Glass Cc: Mark Kettenis , U-Boot Mailing List , Ilias Apalodimas , Steffen Jaeckel , Michal Simek , Dennis Gilmore , Daniel Schwierzeck , Lukas Auer , Jaehoon Chung , Matthias Brugger , Peng Fan , Stephen Warren , Stephen Warren Subject: Re: [PATCH 00/28] Initial implementation of bootmethod/bootflow Message-ID: <20210823200146.GG858@bill-the-cat> References: <20210819034601.1618773-1-sjg@chromium.org> <56140f0c4976b9f9@bloch.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o9AY4ZyoW6huL9oX" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 --o9AY4ZyoW6huL9oX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 23, 2021 at 11:25:42AM -0600, Simon Glass wrote: > Hi Mark, >=20 > On Mon, 23 Aug 2021 at 05:54, Mark Kettenis wro= te: > > > > > From: Simon Glass > > > Date: Wed, 18 Aug 2021 21:45:33 -0600 > > > > > > Bootmethod and bootflow provide a built-in way for U-Boot to automati= cally boot > > > an Operating System without custom scripting and other customisation: > > > > > > - bootmethod - a method to scan a device to find bootflows (owned b= y U-Boot) > > > - bootflow - a description of how to boot (owned by the distro) > > > > > > This series provides an initial implementation of these, enable to sc= an > > > for bootflows from MMC and Ethernet. The only bootflow supported is > > > distro boot, i.e. an extlinux.conf file included on a filesystem or > > > tftp server. It works similiarly to the existing script-based approac= h, > > > but is native to U-Boot. > > > > > > With this we can boot on a Raspberry Pi 3 with just one command: > > > > > > bootflow scan -lb > > > > > > which means to scan, listing (-l) each bootflow and trying to boot ea= ch > > > one (-b). The final patch shows this. > > > > > > It is intended that this approach be expanded to support mechanisms o= ther > > > than distro boot, including EFI-related ones. With a standard way to > > > identify boot devices, these features become easier. It also should > > > support U-Boot scripts, for backwards compatibility only. > > > > > > The first patch of this series moves boot-related code out of common/= and > > > into a new boot/ directory. This helps to collect these related files > > > in one place, as common/ is quite large. > > > > > > Like sysboot, this feature makes use of the existing PXE implementati= on. > > > Much of this series consists of cleaning up that code and refactoring= it > > > into something closer to a module that can be called, teasing apart i= ts > > > reliance on the command-line interpreter to access filesystems and the > > > like. Also it now uses function arguments and its own context struct > > > internally rather than environment variables, which is very hard to > > > follow. No core functional change is included in the included PXE pat= ches. > > > > > > For documentation, see the 'doc' patch. > > > > > > There is quite a long list of future work included in the documentati= on. > > > One question is the choice of naming. Since this is a bootloader, sho= uld > > > we just call this a 'method' and a 'flow' ? The 'boot' prefix is alre= ady > > > shared by other commands like bootm, booti, etc. > > > > > > The design is described here: > > > > > > https://drive.google.com/file/d/1ggW0KJpUOR__vBkj3l61L2dav4ZkNC12/vie= w?usp=3Dsharing > > > > > > The series is available at u-boot-dm/bmea-working > > > > How does the user control the order in which devices are scanned/booted? >=20 > That is not supported in distroboot at present, at least so far as I > can see. For Fedora it seems to happen in grub. Do I have that right? Well, there's "find the next stage", which is boot_targets environment variable, and then "where that next stage looks for stuff" which is OS-dependent. Sometimes the ESP grub.cfg file is just enough to tell grub to find the full grub.cfg file elsewhere, and sometimes it's a full grub.cfg file. I think Mark is talking about the former, and you've said it's not part of this series, yet, but on the TODO list. --=20 Tom --o9AY4ZyoW6huL9oX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEj/qkACgkQFHw5/5Y0 tywyfwv+MXwZ0aBmczqIQVMec6fo+WMKmD/nNoRXb4DNKoqQycrSguCzpT12D0NV adjQHrAfEbyDJ27mTLonzmrzGOoknjbo1lBFbhph4KfURZtNSK5jbM20cRDu8g6M u6wdeMmOMH1EbNKNWWGAim/Tiub8hwC3f+EShdXGqzQEIlfJLQaEaUy80e+uaXzG pZG/VSi2WNMZJ6VZff4+FvUc4I78ZkhQmCExhPpSEWHbmqT0glnUWXp+NQ97ccgS sD81omjDVebPO5Z44Azr8N/jJVkloWQxUGn/b0IneOpMWke23OWkVr0aooJOrLnv 4PXMKgHynYuOhpV+L9DIGboiMLGWoMokGFMEQwg2+sf+eVvQ2LACAfyZlLU6OgmS ZhnyF60pbknxWS/DMMPzbGKrXTU0alA1iOdUy1eAMqwGHQPK5U+iLKzWazbpVQ+H Yvl3jZvlzSaYETSzuWqycr19eynCEV6Jla2L7+iCdN9BSlYa5rDRROTASIwL1pnV kgFECzjZ =UHcr -----END PGP SIGNATURE----- --o9AY4ZyoW6huL9oX--