From: Alexander Dahl <post@lespocky.de>
To: PTXdist Developer Mailinglist <ptxdist@pengutronix.de>
Subject: [ptxdist] console_name for systemd based systems
Date: Wed, 28 Mar 2012 11:09:55 +0200 [thread overview]
Message-ID: <71d8b34cb98b8c7d5ae38819cafcfe13@idefix.lespocky.dyndns.org> (raw)
Hei hei,
moving along with systemd integration I came across an issue where I'm
not sure how to integrate this nicely into ptxdist. Let me explain how
this works for busysbox init at the moment:
There's PTXCONF_CONSOLE_NAME in platformconfig. For our project it has
the value /dev/ttyS0 because the target has no graphics system but just
a serial console. For busybox this is put to /etc/inittab around line 41
of rules/initmethod-bbinit.make:
40 @$(call install_replace, initmethod-bbinit, /etc/inittab, \
41 @CONSOLE@, $(PTXCONF_CONSOLE_NAME))
The resulting line in /etc/inittab:
console::respawn:/sbin/getty -L 115200 /dev/ttyS0 vt100
Now systemd has no inittab anymore. There are two services for getty:
# ls /lib/systemd/system/*tty*
/lib/systemd/system/getty@.service
/lib/systemd/system/serial-getty@.service
The first one is used for /dev/tty*, the second for /dev/ttyS* or any
other serial console (/dev/ttyUSB0 would be possible as well). These are
activated by setting a symlink at the appropriate place, a quick 'n
dirty solution ignoring PTXCONF_CONSOLE_NAME looks like this:
255 # FIXME there's $(PTXCONF_CONSOLE_NAME) in platformconfig.
Would be
256 # nice to get this by some magic
257 @$(call install_link, myrootfs, \
258 /lib/systemd/system/serial-getty@.service, \
259
/etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service)
For integrating this into ptxdist, especially in
rules/initmethod-systemd.*, there would be some magic needed guessing
which service to pick based on which device is configured in
PTXCONF_CONSOLE_NAME. Any ideas on this?
Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
--
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2012-03-28 9:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 9:09 Alexander Dahl [this message]
2012-03-28 9:26 ` Michael Olbrich
2012-03-28 10:25 ` Alexander Dahl
2012-03-28 10:44 ` Michael Olbrich
2012-03-28 11:02 ` Alexander Dahl
2012-03-28 11:10 ` Michael Olbrich
2012-03-28 11:27 ` Alexander Dahl
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=71d8b34cb98b8c7d5ae38819cafcfe13@idefix.lespocky.dyndns.org \
--to=post@lespocky.de \
--cc=ptxdist@pengutronix.de \
/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