[PATCH 2/2] board: sifive: overwrite board_fdt_blob_setup in u-boot proper

Leo Liang ycliang at andestech.com
Mon Aug 2 11:07:47 CEST 2021


On Tue, Jul 27, 2021 at 05:06:59PM +0800, Zong Li wrote:
> Add board_fdt_blob_setup to return the device tree location which is
> passed by prior stage in u-boot proper. The generic board_fdt_blob_setup
> always returns _end, it mignt be ok because u-boot SPL would currently
> put the dtb there, but it would be broken if we put the dtb to another
> place and assigned the location into a1 register for u-boot proper. Use
> the location passed by prior stage would make more sence, because we
> actually pass the location to u-boot proper and want to use that one,
> rather than the dtb which in _end.
> 
> We can't use CONFIG_OF_PRIOR_STAGE because it doens't distinguish the
> implementation of u-boot SPL and u-boot proper, so u-boot SPL need to
> reply on the prior stage to pass device tree location as well, but we
> don't pass the DT from boot rom now. In addition, when
> CONFIG_OF_PRIOR_STAGE is enabled, the u-boot-spl.bin and u-boot.itb won't
> include the device tree.
> 
> Signed-off-by: Zong Li <zong.li at sifive.com>
> ---
>  board/sifive/unleashed/unleashed.c | 11 +++++++++++
>  board/sifive/unmatched/unmatched.c | 11 +++++++++++
>  2 files changed, 22 insertions(+)

Reviewed-by: Leo Yu-Chi Liang <ycliang at andestech.com>


More information about the U-Boot mailing list