summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-04-04 15:41:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-05 09:55:47 +0100
commit2a8d0df47c9d28f8ca7285861dee7a178273eae4 (patch)
tree6d4b1497cf92a85c9f050f5444bf3ab78325242c
parentb868345f533fc0219845b243a29c12c9a19a3ff3 (diff)
downloadopenembedded-core-contrib-2a8d0df47c9d28f8ca7285861dee7a178273eae4.tar.gz
openembedded-core-contrib-2a8d0df47c9d28f8ca7285861dee7a178273eae4.tar.bz2
openembedded-core-contrib-2a8d0df47c9d28f8ca7285861dee7a178273eae4.zip
systemd: make systemd-serialgetty optional
Some distros may prefer to use the upstream systemd support for starting getty on serial ports. This is now possible by adding "serial-getty-generator" to PACKAGECONFIG. The default is unchanged, i.e. systemd's own serial-getty@.service file does not get packaged and instead systemd-serialgetty is pulled into images via RRECOMMENDS. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd_229.bb14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/recipes-core/systemd/systemd_229.bb b/meta/recipes-core/systemd/systemd_229.bb
index 309a4c3a08..c23c749e2a 100644
--- a/meta/recipes-core/systemd/systemd_229.bb
+++ b/meta/recipes-core/systemd/systemd_229.bb
@@ -96,6 +96,11 @@ PACKAGECONFIG ??= "xz \
PACKAGECONFIG_remove_libc-musl = "selinux"
PACKAGECONFIG_remove_libc-musl = "smack"
+# Use the upstream systemd serial-getty@.service and rely on
+# systemd-getty-generator instead of using the OE-core specific
+# systemd-serialgetty.bb - not enabled by default.
+PACKAGECONFIG[serial-getty-generator] = ""
+
PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
# Sign the journal for anti-tampering
PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
@@ -204,8 +209,10 @@ do_configure_prepend() {
do_install() {
autotools_do_install
install -d ${D}/${base_sbindir}
- # Provided by a separate recipe
- rm ${D}${systemd_unitdir}/system/serial-getty* -f
+ if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
+ # Provided by a separate recipe
+ rm ${D}${systemd_unitdir}/system/serial-getty* -f
+ fi
# Provide support for initramfs
[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
@@ -455,7 +462,8 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
RDEPENDS_${PN} += "volatile-binds update-rc.d"
-RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \
+RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
+ systemd-vconsole-setup \
systemd-extra-utils \
systemd-compat-units udev-hwdb \
util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \