Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42505 )
Change subject: libpayload: gdb: Condition video console init on LP_VIDEO_CONSOLE ......................................................................
libpayload: gdb: Condition video console init on LP_VIDEO_CONSOLE
With the stub video_console_init() removed from depthcharge in CL:2241493, depthcharge will fail to compile:
payloads/libpayload/gdb/stub.c:76: undefined reference to `video_console_init'
Since video_console_init() is meant to be implemented in libpayload, libpayload should be consistent with itself by not calling this function when it's not implemented (i.e., when !LP_VIDEO_CONSOLE).
Therefore, initialize video console only if LP_VIDEO_CONSOLE is set.
BRANCH=none BUG=none TEST=USE="menu_ui" emerge-gale depthcharge
Change-Id: Ic45f9073330258cb77301003484ec525b2404180 Signed-off-by: Yu-Ping Wu yupingso@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/42505 Reviewed-by: Joel Kitching kitching@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M payloads/libpayload/gdb/stub.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Joel Kitching: Looks good to me, approved
diff --git a/payloads/libpayload/gdb/stub.c b/payloads/libpayload/gdb/stub.c index 694577e..019f27f 100644 --- a/payloads/libpayload/gdb/stub.c +++ b/payloads/libpayload/gdb/stub.c @@ -73,7 +73,8 @@ if (!gdb_state.resumed) { /* Must be a die_if() in GDB (or a bug), so bail out and die. */ gdb_exit(-1); - video_console_init(); + if (CONFIG(LP_VIDEO_CONSOLE)) + video_console_init(); puts("GDB died, redirecting its last words to the screen:\n"); console_write(buffer, count); } else {