* [PATCH] MIPS: Octeon: Verify the device tree so that /sys/firmware/fdt is created
@ 2026-10-25 19:29 Carl Smith
2026-11-17 16:11 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Carl Smith @ 2026-10-25 19:29 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Carl Smith
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@alliedtelesis.co.nz>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: Octeon: Verify the device tree so that /sys/firmware/fdt is created
2026-10-25 19:29 [PATCH] MIPS: Octeon: Verify the device tree so that /sys/firmware/fdt is created Carl Smith
@ 2026-11-17 16:11 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2026-11-17 16:11 UTC (permalink / raw)
To: Carl Smith; +Cc: linux-mips, linux-kernel
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@alliedtelesis.co.nz>
> ---
> 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 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-17 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 19:29 [PATCH] MIPS: Octeon: Verify the device tree so that /sys/firmware/fdt is created Carl Smith
2026-11-17 16:11 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®