From c7e499357fac8bfdf3bd11550a6ed3187d46efc6 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Sat, 20 Jun 2026 14:10:06 +1200 Subject: tty0 getty --- meta-yerba/recipes-core/images/yerba-image.bb | 1 + meta-yerba/recipes-core/runit/runit-config/1 | 6 ++++-- meta-yerba/recipes-core/runit/runit-tty0-getty.bb | 16 ++++++++++++++++ meta-yerba/recipes-core/runit/runit-tty0-getty/run | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 meta-yerba/recipes-core/runit/runit-tty0-getty.bb create mode 100644 meta-yerba/recipes-core/runit/runit-tty0-getty/run (limited to 'meta-yerba') diff --git a/meta-yerba/recipes-core/images/yerba-image.bb b/meta-yerba/recipes-core/images/yerba-image.bb index 7b70c8b..2d64f9b 100644 --- a/meta-yerba/recipes-core/images/yerba-image.bb +++ b/meta-yerba/recipes-core/images/yerba-image.bb @@ -12,6 +12,7 @@ IMAGE_INSTALL = "\ yerba-user \ runit \ runit-serialgetty \ + runit-tty0-getty \ runit-dhcpcd \ runit-config \ bash \ diff --git a/meta-yerba/recipes-core/runit/runit-config/1 b/meta-yerba/recipes-core/runit/runit-config/1 index e139ea1..4288a23 100644 --- a/meta-yerba/recipes-core/runit/runit-config/1 +++ b/meta-yerba/recipes-core/runit/runit-config/1 @@ -1,7 +1,9 @@ #!/bin/sh export PATH=/usr/bin:/bin:/sbin +mkdir -p /dev/pts /proc /sys +mount -t devpts devpts /dev/pts -o mode=0620,gid=5 +mount -t proc proc /proc +mount -t sysfs sysfs /sys mount -a hostname -F /etc/hostname 2>/dev/null || hostname yerba-live -mkdir -p /dev/pts -mount -t devpts none /dev/pts 2>/dev/null || true diff --git a/meta-yerba/recipes-core/runit/runit-tty0-getty.bb b/meta-yerba/recipes-core/runit/runit-tty0-getty.bb new file mode 100644 index 0000000..a9d31e4 --- /dev/null +++ b/meta-yerba/recipes-core/runit/runit-tty0-getty.bb @@ -0,0 +1,16 @@ +SUMMARY = "tty0 getty service for runit" +DESCRIPTION = "Provides a getty service on the tty0 virtual console for runit" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://run" + +RDEPENDS:${PN} = "runit" + +do_install() { + install -d ${D}/etc/runit/sv/tty0-getty ${D}/etc/service/ + install -m 0755 ${WORKDIR}/run ${D}/etc/runit/sv/tty0-getty/run + ln -sf /etc/runit/sv/tty0-getty ${D}/etc/service/tty0-getty +} + +FILES:${PN} = "/etc/service/tty0-getty /etc/runit/sv/tty0-getty" diff --git a/meta-yerba/recipes-core/runit/runit-tty0-getty/run b/meta-yerba/recipes-core/runit/runit-tty0-getty/run new file mode 100644 index 0000000..bc84eb3 --- /dev/null +++ b/meta-yerba/recipes-core/runit/runit-tty0-getty/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /sbin/getty -L tty0 38400 linux -- cgit v1.2.3