diff mbox series

[boot-wrapper,v2,6/9] configure: Use earlycon instead of earlyprintk

Message ID 20211222181607.1203191-7-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show
Series Various (build system) fixes | expand

Commit Message

Andre Przywara Dec. 22, 2021, 6:16 p.m. UTC
The arm64 Linux kernel dropped support for the "earlyprintk" command line
parameter a long time ago[1], instead it uses the earlycon parameter
now.

Replace earlyprintk with earlycon on the default command line, to see
early kernel output.

Ideally we would just say "earlycon" (without specifying an MMIO
address), but this relies on the stdout-path property in the /chosen
node, which the model DTs do not carry.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ef0ed95ee04

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Rutland Jan. 7, 2022, 2:01 p.m. UTC | #1
On Wed, Dec 22, 2021 at 06:16:04PM +0000, Andre Przywara wrote:
> The arm64 Linux kernel dropped support for the "earlyprintk" command line
> parameter a long time ago[1], instead it uses the earlycon parameter
> now.
> 
> Replace earlyprintk with earlycon on the default command line, to see
> early kernel output.
> 
> Ideally we would just say "earlycon" (without specifying an MMIO
> address), but this relies on the stdout-path property in the /chosen
> node, which the model DTs do not carry.

Can we send a Linux patch to add that?

Mark.

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ef0ed95ee04
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 2b295de..9e3b722 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -99,7 +99,7 @@ AC_SUBST([FILESYSTEM], [$USE_INITRD])
>  AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
>  
>  AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
> -C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"
> +C_CMDLINE="console=$C_CONSOLE earlycon=pl011,0x1c090000"
>  AC_ARG_WITH([cmdline],
>  	AS_HELP_STRING([--with-cmdline], [set a command line for the kernel]),
>  	[C_CMDLINE=$withval])
> -- 
> 2.25.1
>
Mark Rutland Jan. 7, 2022, 2:14 p.m. UTC | #2
On Fri, Jan 07, 2022 at 02:01:37PM +0000, Mark Rutland wrote:
> On Wed, Dec 22, 2021 at 06:16:04PM +0000, Andre Przywara wrote:
> > The arm64 Linux kernel dropped support for the "earlyprintk" command line
> > parameter a long time ago[1], instead it uses the earlycon parameter
> > now.
> > 
> > Replace earlyprintk with earlycon on the default command line, to see
> > early kernel output.
> > 
> > Ideally we would just say "earlycon" (without specifying an MMIO
> > address), but this relies on the stdout-path property in the /chosen
> > node, which the model DTs do not carry.
> 
> Can we send a Linux patch to add that?
> 
> Mark.

For clarity, I'm going to apply this patch regardless; the above just seems
like a nice-to-have.

Mark.

> 
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ef0ed95ee04
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> >  configure.ac | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 2b295de..9e3b722 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -99,7 +99,7 @@ AC_SUBST([FILESYSTEM], [$USE_INITRD])
> >  AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
> >  
> >  AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
> > -C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"
> > +C_CMDLINE="console=$C_CONSOLE earlycon=pl011,0x1c090000"
> >  AC_ARG_WITH([cmdline],
> >  	AS_HELP_STRING([--with-cmdline], [set a command line for the kernel]),
> >  	[C_CMDLINE=$withval])
> > -- 
> > 2.25.1
> > 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Andre Przywara Jan. 7, 2022, 2:47 p.m. UTC | #3
On Fri, 7 Jan 2022 14:01:37 +0000
Mark Rutland <mark.rutland@arm.com> wrote:

Hi Mark,

> On Wed, Dec 22, 2021 at 06:16:04PM +0000, Andre Przywara wrote:
> > The arm64 Linux kernel dropped support for the "earlyprintk" command line
> > parameter a long time ago[1], instead it uses the earlycon parameter
> > now.
> > 
> > Replace earlyprintk with earlycon on the default command line, to see
> > early kernel output.
> > 
> > Ideally we would just say "earlycon" (without specifying an MMIO
> > address), but this relies on the stdout-path property in the /chosen
> > node, which the model DTs do not carry.  
> 
> Can we send a Linux patch to add that?

There is already:
http://lists.infradead.org/pipermail/linux-arm-kernel/2021-September/685791.html

But I think it got stuck somewhere.

Cheers,
Andre

> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ef0ed95ee04
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> >  configure.ac | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 2b295de..9e3b722 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -99,7 +99,7 @@ AC_SUBST([FILESYSTEM], [$USE_INITRD])
> >  AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
> >  
> >  AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
> > -C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"
> > +C_CMDLINE="console=$C_CONSOLE earlycon=pl011,0x1c090000"
> >  AC_ARG_WITH([cmdline],
> >  	AS_HELP_STRING([--with-cmdline], [set a command line for the kernel]),
> >  	[C_CMDLINE=$withval])
> > -- 
> > 2.25.1
> >
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 2b295de..9e3b722 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,7 @@  AC_SUBST([FILESYSTEM], [$USE_INITRD])
 AM_CONDITIONAL([INITRD], [test "x$USE_INITRD" != "x"])
 
 AS_IF([test "x$X_IMAGE" = "x"],[C_CONSOLE="ttyAMA0"],[C_CONSOLE="hvc0"])
-C_CMDLINE="console=$C_CONSOLE earlyprintk=pl011,0x1c090000"
+C_CMDLINE="console=$C_CONSOLE earlycon=pl011,0x1c090000"
 AC_ARG_WITH([cmdline],
 	AS_HELP_STRING([--with-cmdline], [set a command line for the kernel]),
 	[C_CMDLINE=$withval])