[PATCH] sandbox: fix linker error for SDL build
alison at she-devel.com
alison at she-devel.com
Mon Aug 18 01:49:40 CEST 2025
From: Alison Chaiken <alison at she-devel.com>
The patches fixes the following build failure:
$ make sandbox_defconfig
$ make nconfig
Turn on SANDBOX_SDL.
$ make u-boot
[ . . . ]
LTO u-boot
/usr/bin/ld: /tmp/ccEZac9f.ltrans48.ltrans.o: in function
`dm_test_video_bmp8':
/home/alison/gitsrc/u-boot/test/dm/video.c:415:(.text+0x16bb): undefined
reference to `sandbox_sdl_set_bpp'
/usr/bin/ld: /tmp/ccEZac9f.ltrans48.ltrans.o: in function
`dm_test_video_bmp32':
/home/alison/gitsrc/u-boot/test/dm/video.c:507:(.text+0x189c): undefined
reference to `sandbox_sdl_set_bpp'
/usr/bin/ld: /tmp/ccEZac9f.ltrans48.ltrans.o: in function
`dm_test_video_comp_bmp32':
/home/alison/gitsrc/u-boot/test/dm/video.c:543:(.text+0x1a7d): undefined
reference to `sandbox_sdl_set_bpp'
/usr/bin/ld: /tmp/ccEZac9f.ltrans48.ltrans.o: in function
`dm_test_video_comp_bmp8':
/home/alison/gitsrc/u-boot/test/dm/video.c:563:(.text+0x1c5e): undefined
reference to `sandbox_sdl_set_bpp'
/usr/bin/ld: /tmp/ccEZac9f.ltrans48.ltrans.o: in function
`dm_test_video_bmp16':
/home/alison/gitsrc/u-boot/test/dm/video.c:437:(.text+0x1e49): undefined
reference to `sandbox_sdl_set_bpp'
/usr/bin/ld: /tmp/ccEZac9f.ltrans48.ltrans.o:
/home/alison/gitsrc/u-boot/test/dm/video.c:461: more undefined
references to `sandbox_sdl_set_bpp' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:2029: u-boot] Error 1
Signed-off-by: Alison Chaiken <alison at she-devel.com>
---
arch/sandbox/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index d61a327f151..d8fedee55b1 100644
--- a/arch/sandbox/Kconfig
+++ b/arch/sandbox/Kconfig
@@ -55,6 +55,7 @@ config HOST_HAS_SDL
config SANDBOX_SDL
bool "Enable SDL2 support in sandbox"
default HOST_HAS_SDL
+ select VIDEO_SANDBOX_SDL if VIDEO
config SANDBOX_CRASH_RESET
bool "Reset on crash"
--
2.47.2
More information about the U-Boot
mailing list