serial: earlycon requires console support
PATCH 1/1 serial: earlycon requires console support
A configuration that enables earlycon but not the core console code causes a link error:
drivers/built-in.o: In function `setup_earlycon':drivers/tty/serial/earlycon.c:70: undefined reference to `uart_parse_earlycon'
That error can be triggered by the newly added samsung earlycon support, which is missing a 'select' statement. This patch adds the 'select' to make serial-samsung behave like the other drivers.
drivers/tty/serial/Kconfig +1 -0
@@ -241,6 +241,7 @@ config SERIAL_SAMSUNG tristate "Samsung SoC serial support" depends on PLAT_SAMSUNG || ARCH_EXYNOS select SERIAL_CORE + select SERIAL_CORE_CONSOLE select SERIAL_EARLYCON help Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
Hi Arnd,
Quoted 9 lines · Arnd Bergmann
A configuration that enables earlycon but not the core console code causes a link error:
drivers/built-in.o: In function `setup_earlycon':drivers/tty/serial/earlycon.c:70: undefined reference to `uart_parse_earlycon'That error can be triggered by the newly added samsung earlycon support, which is missing a 'select' statement. This patch adds the 'select' to make serial-samsung behave like the other drivers.
Since Kconfig has a separate option for enabling console on Samsung, I'd rather move uart_parse_earlycon() and enclose it in
#if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(CONFIG_SERIAL_EARLYCON)
...
#endif
I'll send a fix for that right now.
Regards,
Peter Hurley
Quoted 15 lines
Signed-off-by Arnd Bergmann <[email protected]>Fixes b94ba0328d3b3 ("serial: samsung: Add support for early console")drivers/tty/serial/Kconfig +1
-0@@ -241,6 +241,7 @@ config SERIAL_SAMSUNG tristate "Samsung SoC serial support" depends on PLAT_SAMSUNG || ARCH_EXYNOS select SERIAL_CORE + select SERIAL_CORE_CONSOLE select SERIAL_EARLYCON help Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
Quoted 13 lines · On Saturday 11 April 2015 09:39:43 Peter Hurley wrote:
Hi Arnd,
Quoted 9 lines · Arnd Bergmann
A configuration that enables earlycon but not the core console code causes a link error:
drivers/built-in.o: In function `setup_earlycon':drivers/tty/serial/earlycon.c:70: undefined reference to `uart_parse_earlycon'That error can be triggered by the newly added samsung earlycon support, which is missing a 'select' statement. This patch adds the 'select' to make serial-samsung behave like the other drivers.
Quoted 9 lines
Since
Kconfighas a separate option for enabling console on Samsung, I'd rather moveuart_parse_earlycon()and enclose it in#if
defined(CONFIG_SERIAL_CORE_CONSOLE)||defined(CONFIG_SERIAL_EARLYCON)
...
#endifI'll send a fix for that right now.
Hmm, maybe the 'select SERIAL_EARLYCON' should just be under SERIAL_SAMSUNG_CONSOLE then? Upon looking closer at the other drivers, that seems to be the common model, and I don't know what it means to have EARLYCON but no CORE_CONSOLE enabled.
Arnd
Quoted 21 lines · Arnd Bergmann
Quoted 20 lines · On Saturday 11 April 2015 09:39:43 Peter Hurley wrote:
Hi Arnd,
Quoted 9 lines · Arnd Bergmann
A configuration that enables earlycon but not the core console code causes a link error:
drivers/built-in.o: In function `setup_earlycon':drivers/tty/serial/earlycon.c:70: undefined reference to `uart_parse_earlycon'That error can be triggered by the newly added samsung earlycon support, which is missing a 'select' statement. This patch adds the 'select' to make serial-samsung behave like the other drivers.
Since
Kconfighas a separate option for enabling console on Samsung, I'd rather moveuart_parse_earlycon()and enclose it in#if
defined(CONFIG_SERIAL_CORE_CONSOLE)||defined(CONFIG_SERIAL_EARLYCON)
...
#endif
Quoted 7 lines
Quoted 2 lines
I'll send a fix for that right now.
Hmm, maybe the 'select
SERIAL_EARLYCON' should just be underSERIAL_SAMSUNG_CONSOLEthen? Upon looking closer at the other drivers, that seems to be the common model, and I don't know what it means to have EARLYCON but noCORE_CONSOLEenabled.
Yeah, maybe that's better; will you send that?
Regards,
Peter Hurley