Re: [PATCH] MIPS: Octeon: Verify the device tree so that /sys/firmware/fdt is created
From: Thomas Bogendoerfer
Date: Tue Nov 17 2026 - 11:28:17 EST
On Mon, Oct 26, 2026 at 08:29:18AM +1300, Carl Smith wrote:
> device_tree_init() sets initial_boot_params directly without calling
> early_init_dt_verify(), so the FDT CRC is never computed and
> of_fdt_raw_init() skips creating /syts/firmware/fdt.
>
> not creating '/sys/firmware/fdt': CRC check failed
>
> Call early_init_dt_verify() after the tree has been pruned and the MAC
> addresses filled in, so that the CRC covers the tree that the kernel
> unflattens.
>
> Tested on a CN7130 with a bootloader-provided device tree.
> Fixes: 08d53aa58cb1 ("of/fdt: export fdt blob as /sys/firmware/fdt")
>
> Signed-off-by: Carl Smith <carl.smith@xxxxxxxxxxxxxxxxxxx>
> ---
> arch/mips/cavium-octeon/setup.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
> index 1ad2602a0383..f25301e08222 100644
> --- a/arch/mips/cavium-octeon/setup.c
> +++ b/arch/mips/cavium-octeon/setup.c
> @@ -1178,6 +1178,7 @@ void __init device_tree_init(void)
> }
> if (fill_mac)
> octeon_fill_mac_addresses();
> + early_init_dt_verify(initial_boot_params, __pa(initial_boot_params));
> unflatten_and_copy_device_tree();
> init_octeon_system_type();
> }
> --
> 2.56.0
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]