[PATCH 2/2] arm: mvebu: turris_omnia: Increase fdt size in fixup_mtd_partitions

Stefan Roese sr at denx.de
Mon Aug 1 13:55:33 CEST 2022


On 01.08.22 12:02, Pali Rohár wrote:
> Sometimes fixup_mtd_partitions() prints during booting kernel error
> "Failed fixing SPI NOR partitions!" because it does not have enough space
> for creating all paritions nodes. So increase fdt size.
> 
> Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB")
> Signed-off-by: Pali Rohár <pali at kernel.org>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   board/CZ.NIC/turris_omnia/turris_omnia.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
> index d836ac94ec29..108d160f486d 100644
> --- a/board/CZ.NIC/turris_omnia/turris_omnia.c
> +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
> @@ -979,6 +979,9 @@ static bool fixup_mtd_partitions(void *blob, int offset, struct mtd_info *mtd)
>   			return false;
>   	}
>   
> +	if (fdt_increase_size(blob, 512) < 0)
> +		return false;
> +
>   	parts = fdt_add_subnode(blob, offset, "partitions");
>   	if (parts < 0)
>   		return false;

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list