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.3 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 45F52C4338F for ; Thu, 19 Aug 2021 17:28:05 +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 2F5256108B for ; Thu, 19 Aug 2021 17:28:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2F5256108B 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 C274B80F47; Thu, 19 Aug 2021 19:28:00 +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="HIj6PdYz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4BB480FC5; Thu, 19 Aug 2021 19:27:58 +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 69B2180ECD for ; Thu, 19 Aug 2021 19:27:54 +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 g11so5195170qtk.5 for ; Thu, 19 Aug 2021 10:27:54 -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=MtrA2DSnaqdGU/b/HDjI+qHy/AetmuB2NHEHb0HNtkQ=; b=HIj6PdYz+uMMkez+pqqSP9odZ6RYVzRTbLyYI743Gc1fhpKbinzA24YCjstQh7sRiP iPr5gIemKWUbeC8Hazc0HYYtIeC5k7D8h4vZoh2ez7cH4a+CQ1FkADCYp46Vbop1NHld xGQ4PShozBJ+YCMQiFuK5PjJMl22EcOZVtfEA= 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=MtrA2DSnaqdGU/b/HDjI+qHy/AetmuB2NHEHb0HNtkQ=; b=TplE9ARs2/uFIeRp4Ly0FhQgxVvc2599Q2YVyLkx6OcqZwlSe7AHv/K/ksIQRiOd1b S5dbAfLDBpaNnnCaUHMQCZIdzBrBQZxldEtRRs3U/MJgitXZYNdxmpLFZft7J4u2THAb EW+pyUJuIGXbXVvY91iiSO/h4RN13bcNycQ7Cbl6sVFMcwqTlJ2ffuplvQKLFNmGVIvZ WyCtsYzKnZvFTJQVBzg5yZQS0/asBISHhOI5IzzBvA+fRY7YpQr4DG0sdvC0Bx9wIBGx cpdhwz+K01BryKnEoC+HFaXaf23PEeIB2wOb+DMxiWk5YClmrDUrJrT3VbZW1/dsZXaw lTWw== X-Gm-Message-State: AOAM533Cm/xQVzukJFtaS1C8/LCq9Z7U7GdvSoy+bGBpZ4kfM+GXL6qH tBeE+YzZ+yIhHoKkj8p+QKD6QQ== X-Google-Smtp-Source: ABdhPJyJPl4kpoiG8zzYfyb71sWYrrpdPxfJvPqRpfXPtDK73ryxYW2E3i55Fu6+vbQxpo0q7grKjg== X-Received: by 2002:ac8:705e:: with SMTP id y30mr13387782qtm.239.1629394073206; Thu, 19 Aug 2021 10:27:53 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-599d-dbbd-fe12-cbbd.res6.spectrum.com. [2603:6081:7b01:cbda:599d:dbbd:fe12:cbbd]) by smtp.gmail.com with ESMTPSA id h68sm1933189qkf.126.2021.08.19.10.27.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Aug 2021 10:27:52 -0700 (PDT) Date: Thu, 19 Aug 2021 13:27:50 -0400 From: Tom Rini To: Simon Glass Cc: 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: <20210819172750.GB858@bill-the-cat> References: <20210819034601.1618773-1-sjg@chromium.org> <20210819135944.GX858@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Ls0oS3FQK7aG11S3" 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 --Ls0oS3FQK7aG11S3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 19, 2021 at 08:25:33AM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Thu, 19 Aug 2021 at 07:59, Tom Rini wrote: > > > > On Wed, Aug 18, 2021 at 09:45:33PM -0600, Simon Glass wrote: > > > > > 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 > > > > My question / concern is this. Would the next step here be to > > implement the generic UEFI boot path? Today, I can write Fedora 34 for > > AArch64 to a USB stick, boot U-Boot off of uSD card and the installer > > automatically boots. I'm sure I could do the same with the BSDs. > > Reading the documentation left me with the impression that every OSV > > would be expected to write something, so that their installer / OS boot. > > But there's already standards for that, which they do, and we should be > > implementing (and do, via the current distro_boot) or making easier to > > enable. Thanks! >=20 > Here you are talking about scanning for a bootflow. It is not actually > OS-specific. If it were, there would be no point to this :-) >=20 > If you look in the distro scripts you will see 'scan_dev_for_efi' (and > also scan_dev_for_scrips). At least the first needs to be implemented > a bit like the distro boot is at present. So far I have only > implemented scan_dev_for_extlinux (plus pxe) as it is enough to show > the concept. >=20 > Adding EFI it's likely to be about the same amount of code as distro.c > at present, perhaps a little less since we don't have the network > case. It is used by Fedora 34, I believe, so is easy enough for me to > do. But I wanted to get something out as the concept is visible in > this series. OK, good. I'd certainly like to see how this looks with EFI added. --=20 Tom --Ls0oS3FQK7aG11S3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEelIwACgkQFHw5/5Y0 tyxJLgv/a3azyHMIpr8vDzN5yUGD2byX3MniK16DLsSZaE+xB+QTTFrygnomD5NK IZkBu6X+Xt4M2XqRbc9u0AwMxlNtQB36icccMKcQShDAQOBXX12HdfVQEXYfIhkQ RdKFoA+xjFlhs+T5Vtxe3wX/cOhPfbEqAhjsU4nm8NOFUv2cfnr/ubE09td8v6mV JbsuskYVWMa6sxUP9ICnkpFWvq0AkDIBjHs8TaIWSxnoIzKo5I4OJVYFsZzfMkIk lASvLhL6zqRnXkz+XFYkVsvoCI+Jcm2tIfFiIj3AfVnJ8xAP4HqXmN+nxDoZ470I HfpIMcQrCPG21lOH5T0fWSI5l8mL2EcXeYf35w0GsxP8aK/ghMYqcHXWN/czVHF7 wTBZzm6gE3NRvE0hy5o5H8syHKE8SmzawA5o9sX5zt8JAPHb5R2ScnMU+EO0CByk zbbpPmi5Wl6PJASeyvjpYltlBExjVhEVp5I7a6JAYTHwOUUSDF/vyOI2oEx+naN4 eUbFxexN =LvCx -----END PGP SIGNATURE----- --Ls0oS3FQK7aG11S3--