2016-03-31 08:29:20

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH -repost] kgdb: depends on VT

With VT=n, the kernel build fails with:
drivers/built-in.o: In function `kgdboc_pre_exp_handler':
kgdboc.c:(.text+0x7b5aa): undefined reference to `fg_console'
kgdboc.c:(.text+0x7b5ce): undefined reference to `vc_cons'
kgdboc.c:(.text+0x7b5d5): undefined reference to `vc_cons'

kgdboc.o is built when KGDB_SERIAL_CONSOLE is set. So make
KGDB_SERIAL_CONSOLE depend on HW_CONSOLE which includes those symbols.

Signed-off-by: Jiri Slaby <[email protected]>
Reported-by: "Jim Davis" <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
---
lib/Kconfig.kgdb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.kgdb b/lib/Kconfig.kgdb
index c635a107a7de..533f912638ed 100644
--- a/lib/Kconfig.kgdb
+++ b/lib/Kconfig.kgdb
@@ -22,7 +22,7 @@ config KGDB_SERIAL_CONSOLE
tristate "KGDB: use kgdb over the serial console"
select CONSOLE_POLL
select MAGIC_SYSRQ
- depends on TTY
+ depends on TTY && HW_CONSOLE
default y
help
Share a serial console with kgdb. Sysrq-g must be used
--
2.7.4


2016-03-31 12:02:04

by Jason Wessel

[permalink] [raw]
Subject: Re: [PATCH -repost] kgdb: depends on VT

On 03/31/2016 03:29 AM, Jiri Slaby wrote:
> With VT=n, the kernel build fails with:
> drivers/built-in.o: In function `kgdboc_pre_exp_handler':
> kgdboc.c:(.text+0x7b5aa): undefined reference to `fg_console'
> kgdboc.c:(.text+0x7b5ce): undefined reference to `vc_cons'
> kgdboc.c:(.text+0x7b5d5): undefined reference to `vc_cons'
>
> kgdboc.o is built when KGDB_SERIAL_CONSOLE is set. So make
> KGDB_SERIAL_CONSOLE depend on HW_CONSOLE which includes those symbols.

Acked-by: Jason Wessel <[email protected]>


I'll put this in the kgdb-next branch and submit it to the upstream, unless it gets merged in another queue.

Thanks!
Jason.