[PATCH 1/1] rpi: Fix build error when CONFIG_VIDEO is disabled for Raspberry Pi

Martin Stolpe martinstolpe at gmail.com
Thu Sep 26 14:26:22 CEST 2024


Hi,

Am Di., 24. Sept. 2024 um 08:38 Uhr schrieb Devarsh Thakkar <devarsht at ti.com
>:

>
> CONFIG_FDT_SIMPLEFB is only used in splash-screen context which in-turn
> depends on CONFIG_VIDEO. So CONFIG_FDT_SIMPLEFB is in a way dependent on
> CONFIG_VIDEO. We had fixed similar issue in past in vendor tree and by
> making
> CONFIG_FDT_SIMPLEFB dependent on CONFIG_VIDEO using below set of patches
> [1]
> which I was planning to post upstream too.
>
> Kindly let me know If these patches look good to you and fix your problem
> too,
> I can post same set of patches to upstream too.
>
> [1] :
>
> https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2024.04&id=1199800505f11f2162030cb641c6d0c9276d5c9c
> [2] :
>
> https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2024.04&id=5b4b8eac243cbd86286ff2cf57ca0469c4d86345
>
>
These patches look good to me.

If I understand the code correctly the frame buffer node should only be
created if CONFIG_FDT_SIMPLEFB is enabled. Thus I would change the code
like this:

Signed-off-by: Martin Stolpe <martin.stolpe at gmail.com>
---

 board/raspberrypi/rpi/rpi.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index ab5ea85cf9..47db441696 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -569,11 +569,13 @@ int ft_board_setup(void *blob, struct bd_info *bd)

     update_fdt_from_fw(blob, (void *)fw_dtb_pointer);

-    node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
-    if (node < 0)
-        fdt_simplefb_add_node(blob);
-    else
-        fdt_simplefb_enable_and_mem_rsv(blob);
+    if (CONFIG_IS_ENABLED(FDT_SIMPLEFB)) {
+        node = fdt_node_offset_by_compatible(blob, -1,
"simple-framebuffer");
+        if (node < 0)
+            fdt_simplefb_add_node(blob);
+        else
+            fdt_simplefb_enable_and_mem_rsv(blob);
+    }

 #ifdef CONFIG_EFI_LOADER
     /* Reserve the spin table */
-- 
2.43.0

What do you think?

Regards
Martin


More information about the U-Boot mailing list