Re: [PATCH] tty/serial: make early console depend on SERIAL_CORE=y

From: Arnd Bergmann
Date: Mon Oct 19 2015 - 08:57:18 EST


On Sunday 18 October 2015 18:06:48 Paul Gortmaker wrote:
> On an powerpc allmodconfig build, the following is seen:
>
> paul@builder:~/git/linux-head$ make O=../ppc-build -j30 > /dev/null
> drivers/built-in.o: In function `.setup_earlycon':
> (.init.text+0x5b00): undefined reference to `.uart_parse_earlycon'
> make[1]: *** [vmlinux] Error 1
>
> Since uart_parse_earlycon lives in serial_core.c we need to ensure
> it is built in if early console is to be used.

I saw the same thing and came up with a different fix

> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Jiri Slaby <jslaby@xxxxxxxx>
> Cc: linux-serial@xxxxxxxxxxxxxxx
> Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
> ---
>
> [A google shows this cropped up in April of this year; I guess it wasn't
> completely fixed?
> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-April/336954.html
> FWIW, I was testing on tty/tty-testing pulled today, from Greg ]

The new problem was clearly caused by 1d59b382f1c4 ("serial: fsl_lpuart:
add earlycon support"), which selects SERIAL_EARLYCON but not
SERIAL_CORE_CONSOLE.

However, the way I read Peter's patch from the URL you provided,
it seems that it is supposed to work without my patch, so I'm not
sure.

Arnd