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] add support for virtual terminal
Date: Tue, 8 Nov 2011 10:28:13 +0100	[thread overview]
Message-ID: <20111108102813.084fff3d@skate> (raw)
In-Reply-To: <4EB8DEF6.3020106@visionsystems.de>

Le Tue, 08 Nov 2011 08:49:10 +0100,
Yegor Yefremov <yegor_sub1@visionsystems.de> a ?crit :

> I'd like to have both serial console and virtual one (on tty I
> experiment with my program and vie serial console I can do other
> administrative tasks. One could use ssh, but this implies having
> network connection). Every time I execute make clean or clone BR I
> loose my inittab. Earlier versions of inittab had some ttys
> predefined, but they were deleted, so I thought, it would be useful
> to add this as an option. This way everyone should be satisfied.

Just use a post-build script to customize your inittab. Something like:

BR2_ROOTFS_POST_BUILD_SCRIPT="board/yegor_company/yegor_project/post-build.sh"

with board/yegor_company/yegor_project/post-build.sh containing:

---------------8<------------------
#!/bin/sh

TARGET_DIR=$1

grep -q "^tty1::respawn:" $TARGET_DIR/etc/inittab || \
	echo "tty1::respawn:/sbin/getty tty1 38400" >> $TARGET_DIR/etc/inittab
---------------8<------------------

And there you are. If you don't like that, you can also just copy the
fs/skeleton/etc/inittab into board/yegor_company/yegor_project/ and
have the post-build.sh script do something like:

---------------8<------------------
#!/bin/sh

TARGET_DIR=$1
BOARD_DIR=board/yegor_company/yegor_project/

cp $BOARD_DIR/inittab $TARGET_DIR/etc/inittab
---------------8<------------------

And there you are.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2011-11-08  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 11:47 [Buildroot] [PATCH v2] add support for virtual terminal Yegor Yefremov
2011-11-07 22:39 ` Peter Korsgaard
2011-11-08  7:49   ` Yegor Yefremov
2011-11-08  9:28     ` Thomas Petazzoni [this message]
2011-11-08  9:35     ` Peter Korsgaard
2011-11-08  9:41       ` Yegor Yefremov

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=20111108102813.084fff3d@skate \
    --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