[PATCH] env: ti: boot: Fix Android boot on AM57x EVM

Eugeniu Rosca erosca at de.adit-jv.com
Thu Feb 20 15:33:00 CET 2020

Hi Sam,

On Wed, Feb 19, 2020 at 08:27:52PM +0200, Sam Protsenko wrote:
> When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM
> board, there is not enough memory reserved in RAM for DTB blob. Hence,
> DTBO can't be merged in DTB. It leads to inability to boot Android with
> next error message:
>     failed on fdt_overlay_apply(): FDT_ERR_NOSPACE
> To overcome that issue let's provide 1 MiB of space to keep DTB and all
> merged DTBO blobs. To do so, "length" parameter should be specified for
> "fdt addr" command:
>     => fdt addr $fdtaddr 0x100000

I am not an everyday user of this platform, hence curious what are the
usual sizes of DTB and DTBO files employed in Android booting?

For comparison, below are the sizes of R-Car3 DTB (Linux v5.6-rc2):

$ du -sh arch/arm64/boot/dts/renesas/r8a779*dtb | sort -n
32K	arch/arm64/boot/dts/renesas/r8a77961-salvator-xs.dtb
32K	arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dtb
44K	arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb
52K	arch/arm64/boot/dts/renesas/r8a77965-ulcb.dtb
60K	arch/arm64/boot/dts/renesas/r8a77960-ulcb.dtb
60K	arch/arm64/boot/dts/renesas/r8a77965-salvator-x.dtb
60K	arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dtb
60K	arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dtb
64K	arch/arm64/boot/dts/renesas/r8a77960-salvator-x.dtb
64K	arch/arm64/boot/dts/renesas/r8a77960-salvator-xs.dtb
64K	arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dtb
68K	arch/arm64/boot/dts/renesas/r8a77950-ulcb.dtb
68K	arch/arm64/boot/dts/renesas/r8a77951-ulcb.dtb
72K	arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb
72K	arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dtb
72K	arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dtb
72K	arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dtb
72K	arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb

FWIW based on the above values, Renesas scripts reserve 512K for DTB.

> Also add size variables to 'adtimg' command invocations, to avoid
> cluttering the console with DTBO blob sizes.

Looks good to me.

> Signed-off-by: Sam Protsenko <joe.skb7 at gmail.com>

Reviewed-by: Eugeniu Rosca <rosca.eugeniu at gmail.com>

Best Regards
Eugeniu Rosca

More information about the U-Boot mailing list