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 16C17C3DA78 for ; Fri, 13 Jan 2023 20:47:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C8A94854E0; Fri, 13 Jan 2023 21:47:55 +0100 (CET) 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="a3Gig2rg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3ED885413; Fri, 13 Jan 2023 21:47:53 +0100 (CET) Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (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 91D9885413 for ; Fri, 13 Jan 2023 21:47:50 +0100 (CET) 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-qv1-xf2f.google.com with SMTP id g10so10044911qvo.6 for ; Fri, 13 Jan 2023 12:47:50 -0800 (PST) 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:message-id:reply-to; bh=p34nM2eEvFiKR7rxEAQc3Go7SgyQT0Qd8VNxpQH7gJY=; b=a3Gig2rgVRNAajbupPcOYlGpR5KH9dO2PYaHer6S0/Jj/v7+OPN5XPmSjkMayRkl+c MnsovL8utSzzNmJ+JS9YB1cyOii4WCVou6kavFe2s60Tw5rXUc/p9SOLJpM9LP+GtxMP Ws8TmDiuLQ7yjgtzc7xFT1uUP0C48Pz0uEEjw= 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 :message-id:reply-to; bh=p34nM2eEvFiKR7rxEAQc3Go7SgyQT0Qd8VNxpQH7gJY=; b=Cqw/+rnaiBwe5ELa7GGddSVXZyDU7YC8QrQyoteo3dR5ctjjhyGhEtGffMq516jvGo A1NTaCsIerGkqL5BW9Wcggiz8bhyHTCiAca9peDJZkGskY77KfeAMyGJropDBKQsuD1X YvrGQyLCVv+qz6AQM8P3Hik6SzgKW1G9p26fbDM3Zhn7zZRUNCdyUKTRdIEtdKsHA2i6 0WhXfNAivRnRiICnv/LM0WJ3+2JpYHJ20Jrt4II1ooMUJIcyxr2MMrXRL97dOl7ANMM9 Aoze3b7X2I/oy0oossJ2eu6sgE+r9kg4ojNwGgiKzeiAJClKhMuv7HV/Om2BTk+6IRH+ +9UA== X-Gm-Message-State: AFqh2kpHXqvJ3F2opU2fmEfNXICNCNMHMIdnkJi0sUlWY0AvfcCRXifp yWYVFah9yQq+wOJw6gbbpUOZfw== X-Google-Smtp-Source: AMrXdXubDUvUZBivjd/Tl86hMSkEDtERin9gRW/yuwUIeivoxdAApn6hNKz+oF5jy6MSW40UBWd6zQ== X-Received: by 2002:a0c:800d:0:b0:4c7:34b5:7993 with SMTP id 13-20020a0c800d000000b004c734b57993mr110498452qva.27.1673642869273; Fri, 13 Jan 2023 12:47:49 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-a538-813d-bada-d144.res6.spectrum.com. [2603:6081:7b00:6400:a538:813d:bada:d144]) by smtp.gmail.com with ESMTPSA id j9-20020a05620a288900b006f9f714cb6asm12976027qkp.50.2023.01.13.12.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 12:47:48 -0800 (PST) Date: Fri, 13 Jan 2023 15:47:46 -0500 From: Tom Rini To: Heinrich Schuchardt Cc: Simon Glass , U-Boot Custodians , Jaehoon Chung , Jeffy Chen , Joe Hershberger , Kever Yang , Marek Vasut , Pavel Herrmann , Peng Fan , Philipp Tomsich , Rob Herring , huang lin , U-Boot Mailing List , Aurelien Jarno Subject: Re: [PATCH v2 00/71] bootstd: Allow migration from distro_bootcmd scripts Message-ID: <20230113204746.GY3787616@bill-the-cat> References: <20230108025047.522240-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9HMcRxcxcMuTBs2o" 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 --9HMcRxcxcMuTBs2o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 13, 2023 at 08:54:06PM +0100, Heinrich Schuchardt wrote: > On 1/8/23 03:49, Simon Glass wrote: > > So far, standard boot does not replicate all the of the functionality > > of the distro_bootcmd scripts. In particular it lacks some bootdevs and > > some of the bootmeths are incomplete. > >=20 > > Also there is currently no internal mechanism to enumerate buses in ord= er > > to discover bootdevs, e.g. with USB. > >=20 > > This series addresses these shortcomings: > >=20 > > - Adds the concept of a 'bootdev hunter' to enumerate buses, etc. in an > > effort to find bootdevs of a certain priority > > - Adds bootdevs for SCSI, IDE, NVMe, virtio, SPI flash > > - Handles PXE and DHCP properly > > - Supports reading the device tree with EFI and reading scripts from the > > network > >=20 > > It also tidies up label processing, so it is possible to use: > >=20 > > bootflow scan mmc2 > >=20 > > to scan just one MMC device (with BOOTSTD_FULL). > >=20 > > As before this implementation still relies on CONFIG_CMDLINE being > > enabled, mostly for the network stack. Further work would be required to > > disentangle that. > >=20 > > Quite a few tests are added but there are some gaps: > >=20 > > - SPI flash bootdev > > - EFI FDT loading > >=20 > > Note that SATA works via SCSI (CONFIG_SCSI_AHCI) and does not use > > driver model. Only pogo_v4 seems to be affected. Probably all thats is > > needed is to call bootdev_setup_sibling_blk() in the Marvell SATA drive= r. > >=20 > > Also, while it would be possible to init MMC in a bootdev hunter, there= is > > no point since U-Boot always inits MMC on startup, if present. > >=20 > > With this series it should be possible to migrate boards to standard bo= ot > > by removing the inclusion of config_distro_bootcmd.h and instead adding > > a suitable value for boot_targets to the environment, e.g.: > >=20 > > boot_targets=3Dmmc1 mmc0 nvme scsi usb pxe dhcp spi >=20 > Does nvme mean all nvme drives? Would mmc mean all mmc block devices? >=20 > doc/develop/bootstd.rst should describe the syntax. >=20 > On generic boards it does not make much sense to restrict scanning to > one instance of a block device type. >=20 > Cf. > [PATCH] board: sifive: unmatched: enable booting on a second NVME device > https://lore.kernel.org/all/20230107223239.2387940-1-aurelien@aurel32.net/ I think there's room for improvement on top of https://patchwork.ozlabs.org/project/uboot/patch/20230108025047.522240-71-s= jg@chromium.org/ with more examples / documentation on how to handle a storage type which can have more than one location. But since this leverages DM, it's not restricted to a single NVMe, since our uclass isn't restricted to a single NVMe. --=20 Tom --9HMcRxcxcMuTBs2o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPBw3IACgkQFHw5/5Y0 tywyJAwAsMB3nMwgfnDEkAJ1vunwksx+Sdv8xMnAHWbFloj7zy6bVMDzbpC8xqEL BcL+MchP/FjcONJp+qhL8ojanuvh9iFaGiSvUxnsCpjqlNwmQAlIhX68b71sPYPm 2wEmsvUpO2HrloCzdZvMKFjGQU+bXjb8Z3DI8ZTZ6YiA+DjBmM8HqzJFbc9q6uWr wSzR6RPHA1C5S4OQlXXsT4tpnKNwxTe7oQu2WicYiVlZaGlF7/gaOIVUSzEfvnlt O7cE/RK00MiE5nwtsI0JFiTiO0eAc8erdHAwNHDmFJlEQOa4cm9LmNa1c56XabRH ivgNdj8fJknT8mxNbA6kHmqJF5pnisLTDOk5Ni3F+0lQcJNvviytvVOAcqoPiKcB DA95AdUeQk0dcTaPJlOlZyobIJ6qKjfNfBl6JTyQb+NOcSQpf50iF/5v6tV4gOwa IBlJzsYLEw0ueQLH3uGO8g1pFdZ1xJ10K9czpID3rLmCRveFJVT0IpXgjHSaywHu TAYLza5R =+7VN -----END PGP SIGNATURE----- --9HMcRxcxcMuTBs2o--