Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] raspberrypi, raspberrypi2: add a serial console
Date: Mon, 18 Apr 2016 13:37:01 +0200	[thread overview]
Message-ID: <20160418133701.58f46491@free-electrons.com> (raw)
In-Reply-To: <1460929546-11966-1-git-send-email-luca@lucaceresoli.net>

Hello,

On Sun, 17 Apr 2016 23:45:46 +0200, Luca Ceresoli wrote:
> The current Buildroot defconfigs for Raspberry Pi and Raspberry Pi 2
> instantiate a console on tty1, which appears on HDMI. Add a console on
> the serial port (ttyAMA0) to be more consistent with other defconfigs
> and provide a better out-of-the-box experience to users used to have a
> serial console from Buildroot defconfigs.
> 
> This requires three changes:
>  1. have two 'console=' entries in the kernel command line: tty1,
>     then ttyAMA0;
>  2. change BR2_TARGET_GENERIC_GETTY_PORT to "console", so it starts
>     a getty on the last console= passed to the kernel, ttyAMA0;
>  3. add a new getty on tty1 to the generated inittab.
> 
> Step 2 is actually obtained by removing BR2_TARGET_GENERIC_GETTY_PORT
> entirely from the defconfigs, since "console" is the default value.
> 
> Step 3 requires a post-build script since the Buildroot makefiles can
> configure only one console.
> 
> Note: instead of simply adding a new getty on ttyAMA0 (which would
> work) this patch actually changes BR2_TARGET_GENERIC_GETTY_PORT to
> instantiate a console on UART, then adds back tty1 via
> post-build.sh. This is done only to avoid the "GENERIC_SERIAL" comment
> where we instantiate an HDMI console, then instantiate a really-serial
> console on another line.
> 
> The result is these two inittab lines:
> 
>   console::respawn:/sbin/getty -L  console 0 vt100 # GENERIC_SERIAL
>   tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console
> 
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---

Applied to master, thanks. Maybe this calls for an update of the
RaspberryPi readme.txt file, to explicitly indicate that a getty will
be running on both the HDMI/composite output *and* the serial port?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2016-04-18 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17 21:45 [Buildroot] [PATCH v2] raspberrypi, raspberrypi2: add a serial console Luca Ceresoli
2016-04-17 22:03 ` Yann E. MORIN
2016-04-18 11:37 ` Thomas Petazzoni [this message]
2016-04-18 11:51   ` Luca Ceresoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160418133701.58f46491@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox