aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-06-20 14:10:06 +1200
committerArslaan Pathan <[email protected]>2026-06-20 14:10:06 +1200
commitc7e499357fac8bfdf3bd11550a6ed3187d46efc6 (patch)
treecedaef9237d69c649b25c9d5f93bcd2819acf25e
parent00ac78984c30beb67e3fe1a1f7ab524f4752f7c0 (diff)
downloadyerbalinux-c7e499357fac8bfdf3bd11550a6ed3187d46efc6.tar.xz
yerbalinux-c7e499357fac8bfdf3bd11550a6ed3187d46efc6.zip
tty0 getty
-rw-r--r--meta-yerba/recipes-core/images/yerba-image.bb1
-rw-r--r--meta-yerba/recipes-core/runit/runit-config/16
-rw-r--r--meta-yerba/recipes-core/runit/runit-tty0-getty.bb16
-rw-r--r--meta-yerba/recipes-core/runit/runit-tty0-getty/run2
-rwxr-xr-xqemu.sh3
5 files changed, 26 insertions, 2 deletions
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
diff --git a/qemu.sh b/qemu.sh
new file mode 100755
index 0000000..52f430a
--- /dev/null
+++ b/qemu.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# This script exists so I don't have to keep remembering the QEMU command when I run my distro testing
+runqemu yerba-x86_64 qemuparams="-display vnc=:0 -vga virtio -serial mon:stdio" bootparams="console=tty0"