[PATCH v2 21/33] emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGE

Tom Rini trini at konsulko.com
Mon Jan 6 22:40:25 CET 2025


On Mon, Jan 06, 2025 at 07:32:17AM -0700, Simon Glass wrote:
> QEMU always gets its devicetree from the OF_BOARD mechanism so we should
> not depend on !BLOBLIST here.
> 
> The logic of PRIOR_STAGE is quite a mess, unfortuantely. We should rely
> only standard passage to receive things from the prior stage. QEMU
> should implement standard passage to provide its devicetree to U-Boot
> However Linaro has blocked my patch to provide devicetree additions[1],
> so little breath should be held in respect of either change.
> 
> [1] https://lore.kernel.org/qemu-devel/20210926183410.256484-1-sjg@chromium.org/
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Fixes: 2b71470628c dts: OF_HAS_PRIOR_STAGE should depend on !BLOBLIST
> ---
> 
> (no changes since v1)
> 
>  dts/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dts/Kconfig b/dts/Kconfig
> index 41a758e83a6..fc25a854708 100644
> --- a/dts/Kconfig
> +++ b/dts/Kconfig
> @@ -191,7 +191,7 @@ config OF_BOARD
>  
>  config OF_HAS_PRIOR_STAGE
>  	bool
> -	depends on !BLOBLIST
> +	depends on !BLOBLIST || ARCH_QEMU
>  	help
>  	  Indicates that a prior stage of the firmware (before U-Boot proper)
>  	  makes use of device tree and this board normally boots with that prior

Since OF_HAS_PRIOR_STAGE has no prompt, it shouldn't have a depends line
either really. I believe 2b71470628c is part of an attempt to say that
if you have bloblist enabled then that's how the previous loader needs
to pass the device tree. But indeed that's not quite how to enforce that
kind of demand, so we should just drop the restriction here (and some
other time fix the "imply OF_HAS_PRIOR_STAGE" to be "select
OF_HAS_PRIOR_STAGE" because it's not prompted, imply is the wrong
keyword.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250106/c4649616/attachment.sig>


More information about the U-Boot mailing list