[PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

Rick Chen rickchen36 at gmail.com
Mon May 10 04:01:44 CEST 2021


> If /chosen was missing, chosen_offset would never get updated with the new
> /chosen node. This would cause fdt_setprop_u32 to fail. This patch fixes
> this by setting chosen_offset. In addition, log any errors from setting
> boot-hartid as well.
>
> Fixes: 177c53fe6c6 ("riscv: Move all fdt fixups together")
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
> I have not actually tested this (nor observed the original failure). But this
> seemed buggy from inspection.
>
>  arch/riscv/lib/fdt_fixup.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)

Good catch !

Reviewed-by: Rick Chen <rick at andestech.com>


More information about the U-Boot mailing list