CONFIG_BOOTM_FITIMAGE_PUBKEY was removed in v2025.09.0 and the device
tree snippet that we merged at runtime into the DT we receive from QEMU
is now empty and no longer serves a purpose.

Remove it as it's actually detrimental: of_merge_nodes is a low-level
operation that doesn't handle duplicate nodes and when
CONFIG_EXTERNAL_DTS_FRAGMENTS adds a state node of its own, the barebox
barebox live device tree ends up with the state twice.

Reported-by: Jan Lübbe <[email protected]>
Signed-off-by: Ahmad Fatoum <[email protected]>
Link: https://lore.barebox.org/[email protected]
Signed-off-by: Sascha Hauer <[email protected]>
(cherry picked from commit f018a6e4606ef31c6975af6b960aa7824f79df73)
Signed-off-by: Ahmad Fatoum <[email protected]>
---
 common/boards/qemu-virt/Makefile            | 3 +--
 common/boards/qemu-virt/board.c             | 5 +----
 common/boards/qemu-virt/fitimage-pubkey.dts | 3 ---
 3 files changed, 2 insertions(+), 9 deletions(-)
 delete mode 100644 common/boards/qemu-virt/fitimage-pubkey.dts

diff --git a/common/boards/qemu-virt/Makefile b/common/boards/qemu-virt/Makefile
index 30bf4f1955ee..7f47c9b08544 100644
--- a/common/boards/qemu-virt/Makefile
+++ b/common/boards/qemu-virt/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 obj-y += board.o
-obj-y += qemu-virt-flash.dtbo.o fitimage-pubkey.dtb.o
+obj-y += qemu-virt-flash.dtbo.o
 ifeq ($(CONFIG_RISCV),y)
 DTC_CPP_FLAGS_qemu-virt-flash.dtbo := -DCONFIG_RISCV
 endif
@@ -9,5 +9,4 @@ ifeq ($(CONFIG_ARM),y)
 DTC_CPP_FLAGS_qemu-virt-flash.dtbo := -DCONFIG_ARM
 endif
 
-clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.z
 clean-files += *.dtbo *.dtbo.S .*.dtso
diff --git a/common/boards/qemu-virt/board.c b/common/boards/qemu-virt/board.c
index 9882b0c31a3c..a8884f26f9c1 100644
--- a/common/boards/qemu-virt/board.c
+++ b/common/boards/qemu-virt/board.c
@@ -54,7 +54,7 @@ BAREBOX_DEEP_PROBE_ENABLE(virt_of_match);
 static int virt_board_driver_init(void)
 {
        struct device_node *root = of_get_root_node();
-       struct device_node *flash, *pubkey;
+       struct device_node *flash;
        const struct of_device_id *id;
        void (*init)(void);
 
@@ -75,9 +75,6 @@ static int virt_board_driver_init(void)
        if (flash && of_device_is_available(flash))
                of_overlay_apply_dtbo(root, __dtbo_qemu_virt_flash_start);
 
-       pubkey = of_unflatten_dtb(__dtb_fitimage_pubkey_start, INT_MAX);
-       of_merge_nodes(root, pubkey);
-
        /* fragment may have added aliases to the DT */
        of_alias_scan();
 
diff --git a/common/boards/qemu-virt/fitimage-pubkey.dts 
b/common/boards/qemu-virt/fitimage-pubkey.dts
deleted file mode 100644
index 1419fa0da5d5..000000000000
--- a/common/boards/qemu-virt/fitimage-pubkey.dts
+++ /dev/null
@@ -1,3 +0,0 @@
-/dts-v1/;
-
-/{ };
-- 
2.47.3


Reply via email to