aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linaro.org>2019-02-12 17:23:41 -0600
committerAníbal Limón <anibal.limon@linaro.org>2019-02-22 11:07:02 -0600
commit3328a24d7b39a3fd302bc45da3d8586191b7a42b (patch)
tree7a671de74134f4ff94bd721e29424ceb0567ffcf
parent07245713289e26db45420814df04c744cdbaf315 (diff)
downloadmeta-qcom-3328a24d7b39a3fd302bc45da3d8586191b7a42b.tar.gz
meta-qcom-3328a24d7b39a3fd302bc45da3d8586191b7a42b.tar.bz2
meta-qcom-3328a24d7b39a3fd302bc45da3d8586191b7a42b.zip
recipes-test/images: Add autologin to initramfs-bootrr-image
Useful for CI test loop and development, based on meta-ostro [1]. [1] https://github.com/ostroproject/ostro-os/blob/master/meta-ostro/classes/ostro-image.bbclass#L465 Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rw-r--r--recipes-test/images/initramfs-bootrr-image.bb11
1 files changed, 11 insertions, 0 deletions
diff --git a/recipes-test/images/initramfs-bootrr-image.bb b/recipes-test/images/initramfs-bootrr-image.bb
index 18e923f..9a6c84f 100644
--- a/recipes-test/images/initramfs-bootrr-image.bb
+++ b/recipes-test/images/initramfs-bootrr-image.bb
@@ -34,3 +34,14 @@ IMAGE_ROOTFS_EXTRA_SPACE = "0"
# Disable installation of kernel and modules via packagegroup-core-boot
NO_RECOMMENDATIONS = "1"
+
+# Enable local auto-login (on systemd) of the root user (local = serial port and
+# virtual console by default, can be configured).
+LOCAL_GETTY ?= " \
+ ${IMAGE_ROOTFS}${systemd_system_unitdir}/serial-getty@.service \
+ ${IMAGE_ROOTFS}${systemd_system_unitdir}/getty@.service \
+"
+local_autologin () {
+ sed -i -e 's/^\(ExecStart *=.*getty \)/\1--autologin root /' ${LOCAL_GETTY}
+}
+ROOTFS_POSTPROCESS_COMMAND += "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'local_autologin;', '', d)}"