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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57440C433EF for ; Wed, 13 Oct 2021 01:35:21 +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 71E5B610A2 for ; Wed, 13 Oct 2021 01:35:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 71E5B610A2 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 6A68583565; Wed, 13 Oct 2021 03:35:18 +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="VXV6WJeI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C9108355B; Wed, 13 Oct 2021 03:35:08 +0200 (CEST) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (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 CF3C6835BD for ; Wed, 13 Oct 2021 03:34: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=trini@konsulko.com Received: by mail-qv1-xf31.google.com with SMTP id k29so791585qve.6 for ; Tue, 12 Oct 2021 18:34:56 -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; bh=n39yBeYi4eETwOh8NyyC9Q/ZCYW/A5CZ/MYE/8mHQqQ=; b=VXV6WJeIihkEHMQE0DJu/ayQoxaJA7H/efXiAKhJ8Un2kDaS45inuCtJNutZnRKpav DseCjMMALA3kxbn7Ee+cqqWkktf/L7NKSdoE+Mh1iYy3g7ZXqqdwxY3JCmHDnid9B+qY QWBFlg0dmXOA6h2n/ZwdZUQ+whWI9u37CTdPA= 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=n39yBeYi4eETwOh8NyyC9Q/ZCYW/A5CZ/MYE/8mHQqQ=; b=BHydGFnrHMI+T+HIkfvvlbrIyxjuZiMOc9T0i+GiBmW7U9cdUGPrYvkykqyxNxkeHF 5oMGUPXvOlDFQhHff7ZcbdlrY8mDBg+GVL4cj/YeJ+Uq6lcd9OfV/XoM2xYDNPW2+waN /dSltyeGvLOCHgOAcc2LvDfg4tt7qOqKiO7WxSCNWudJ7DiqNGxw0DQqMeXpVshSeSYh z02R83EfedaWmQTKxRZNE6dcB3mZchjDoYPsHK0zxy8F+k2ENBpYwXl5NeHelfZo5p5x f3XZc0W3uqa1NlCT+1EL9s7xEqJYZUuxkNGN3wYwUD/s5xbKLy36LfD5tzDycbYyy6fd VJHQ== X-Gm-Message-State: AOAM533x7jSpmJEpx0mB1nIMInNyi8UX7XdePVMOAYwuKthBRPt46U4X AdXE03ouxwi/VqxJc+dM74kQ/A== X-Google-Smtp-Source: ABdhPJzf5ajxC8wzWZXl1gEsr2W9UYL35KtLQY/qyg6xa9U4R4yQK+IaV+9PqnKB13Vy+w4HZiFZvw== X-Received: by 2002:ad4:4b0c:: with SMTP id r12mr33231934qvw.20.1634088895127; Tue, 12 Oct 2021 18:34:55 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-e98d-c49f-f596-1fb5.res6.spectrum.com. [2603:6081:7b01:cbda:e98d:c49f:f596:1fb5]) by smtp.gmail.com with ESMTPSA id d64sm5799364qke.62.2021.10.12.18.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 18:34:54 -0700 (PDT) Date: Tue, 12 Oct 2021 21:34:50 -0400 From: Tom Rini To: Bin Meng Cc: Simon Glass , U-Boot Mailing List , Ilias Apalodimas , Aaron Williams , Albert Aribaud , Alexander Graf , Anastasiia Lukianenko , Andre Przywara , Ashok Reddy Soma , Atish Patra , Bin Meng , Christian Hewitt , David Abdurachmanov , Dimitri John Ledkov , Fabio Estevam , Green Wan , Heiko Schocher , Heinrich Schuchardt , Heinrich Schuchardt , Jagan Teki , Jerry Van Baren , Kever Yang , Leo , Linus Walleij , Liviu Dudau , Marek =?iso-8859-1?Q?Beh=FAn?= , Matthias Brugger , Michal Simek , Michal Simek , Neil Armstrong , Niel Fourie , Oleksandr Andrushchenko , Padmarao Begari , Pali =?iso-8859-1?Q?Roh=E1r?= , Peter Robinson , Priyanka Jain , Rainer Boschung , Ramon Fried , Rick Chen , Sean Anderson , Sinan Akman , Stefan Roese , Stephen Warren , Stephen Warren , T Karthik Reddy , Tero Kristo , Thomas Fitzsimmons , Tianrui Wei , Tim Harvey , Tuomas Tynkkynen , Valentin Longchamp , Vladimir Oltean , Wolfgang Denk , Zong Li , "qemu-devel@nongnu.org Developers" Subject: Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option Message-ID: <20211013013450.GJ7964@bill-the-cat> References: <20211013010120.96851-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+OXQCtB1ffO4fety" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Mailman-Approved-At: Wed, 13 Oct 2021 03:35:17 +0200 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 --+OXQCtB1ffO4fety Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 13, 2021 at 09:29:14AM +0800, Bin Meng wrote: > Hi Simon, >=20 > On Wed, Oct 13, 2021 at 9:01 AM Simon Glass wrote: > > > > With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so > > there are only three ways to obtain a devicetree: > > > > - OF_SEPARATE - the normal way, where the devicetree is built and > > appended to U-Boot > > - OF_EMBED - for development purposes, the devicetree is embedded in > > the ELF file (also used for EFI) > > - OF_BOARD - the board figures it out on its own > > > > The last one is currently set up so that no devicetree is needed at all > > in the U-Boot tree. Most boards do provide one, but some don't. Some > > don't even provide instructions on how to boot on the board. > > > > The problems with this approach are documented at [1]. > > > > In practice, OF_BOARD is not really distinct from OF_SEPARATE. Any board > > can obtain its devicetree at runtime, even it is has a devicetree built > > in U-Boot. This is because U-Boot may be a second-stage bootloader and = its > > caller may have a better idea about the hardware available in the machi= ne. > > This is the case with a few QEMU boards, for example. > > > > So it makes no sense to have OF_BOARD as a 'choice'. It should be an > > option, available with either OF_SEPARATE or OF_EMBED. > > > > This series makes this change, adding various missing devicetree files > > (and placeholders) to make the build work. >=20 > Adding device trees that are never used sounds like a hack to me. >=20 > For QEMU, device tree is dynamically generated on the fly based on > command line parameters, and the device tree you put in this series > has various hardcoded values which normally do not show up > in hand-written dts files. >=20 > I am not sure I understand the whole point of this. I am also confused and do not like the idea of adding device trees for platforms that are capable of and can / do have a device tree to give us at run time. --=20 Tom --+OXQCtB1ffO4fety Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFmN7cACgkQFHw5/5Y0 tyzNyQwAhCAwwrL9Ewxnh9vCzy4ggAHTNK4+3kywIkKrs4h00KGNW2z3KRpqUeWv +jBCG17OYaTWdXVdNEoTVLGlq7N/FSfNVwQRfONvpJwWtuFldJ78apiOcqEsq4NV 9cHNGoYOM9BhdAzilwmO/i/F3OdNscqTQcprbBg2Jblzolg/IOqVOUZCI1eBAlNb 4VCAb0YitjjgPnpYmj6+Dw4sbaEc5rvEF++olpIIEsrovprXbDv8M2OLvkvkpi7t wsyGybHNXSUhqknbXNNkvzHtCep9lvyAlmBXNSA35T1uidxO/uxlRyWnvZAgsJwp 2TAx+7iIQIvdFcG3pSUH53fR0KCPxur4F8mqzqs0hx/y4wAHB++aorlq4PPqwIeR 5Sm2n7cVdGaYh+XJHphJkcBiUqe14z4zZcYkioNugJoNCrgPEqZOK0//wl+BRcdG h+MZZE4asNtQFG+dcWrK1Baao7GymkFfgpYiVm3YTl5JaU3/YOmGOnkK8asiLEao Ho1cq9Pt =7osX -----END PGP SIGNATURE----- --+OXQCtB1ffO4fety--