diff options
| author | Arslaan Pathan <[email protected]> | 2026-06-14 18:35:37 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-06-14 18:35:37 +1200 |
| commit | 76f2d2fad1d196f639a2f5c8b9f14e1b8f3c339a (patch) | |
| tree | e9945e88a90c0642194f03bd3607444c9fc2d700 /meta-yerba | |
| parent | 4cc62efa47100b7f6a0e5cb15ccf4b0f468368a6 (diff) | |
| download | yerbalinux-76f2d2fad1d196f639a2f5c8b9f14e1b8f3c339a.tar.xz yerbalinux-76f2d2fad1d196f639a2f5c8b9f14e1b8f3c339a.zip | |
Runit
Diffstat (limited to 'meta-yerba')
| -rw-r--r-- | meta-yerba/conf/distro/yerba.conf | 6 | ||||
| -rw-r--r-- | meta-yerba/recipes-core/runit/runit-serialgetty.bb | 17 | ||||
| -rw-r--r-- | meta-yerba/recipes-core/runit/runit_2.3.1.bb | 48 |
3 files changed, 68 insertions, 3 deletions
diff --git a/meta-yerba/conf/distro/yerba.conf b/meta-yerba/conf/distro/yerba.conf index c5f601c..b285616 100644 --- a/meta-yerba/conf/distro/yerba.conf +++ b/meta-yerba/conf/distro/yerba.conf @@ -6,13 +6,14 @@ MAINTAINER = "Arslaan Pathan <[email protected]>" TCLIBC = "musl" -IMAGE_INSTALL:append = " runit" +IMAGE_INSTALL:append = " runit runit-serialgetty" +APPEND:append = " init=/sbin/runit-init" # add stuff later DISTRO_FEATURES = "" VIRTUAL-RUNTIME_init_manager = "runit" -VIRTUAL-RUNTIME_initscripts = "runit" +VIRTUAL-RUNTIME_initscripts = "" VIRTUAL-RUNTIME_base-utils = "busybox" VIRTUAL_RUNTIME_login_manager = "busybox" @@ -22,4 +23,3 @@ ERROR_QA:append = " textrel host-user-contaminated" WARN_QA:append = " buildpaths ldflags" - diff --git a/meta-yerba/recipes-core/runit/runit-serialgetty.bb b/meta-yerba/recipes-core/runit/runit-serialgetty.bb new file mode 100644 index 0000000..5328f68 --- /dev/null +++ b/meta-yerba/recipes-core/runit/runit-serialgetty.bb @@ -0,0 +1,17 @@ +SUMMARY = "Serial getty service for runit" +DESCRIPTION = "Provides a getty service on the serial console for runit" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +RDEPENDS:${PN} = "runit" + +do_install() { + install -d ${D}/etc/service/serial-getty + cat > ${D}/etc/service/serial-getty/run << EOF +#!/bin/sh +exec /sbin/getty -L 115200 ttyS0 vt100 +EOF + chmod 0755 ${D}/etc/service/serial-getty/run +} + +FILES:${PN} = "/etc/service/serial-getty" diff --git a/meta-yerba/recipes-core/runit/runit_2.3.1.bb b/meta-yerba/recipes-core/runit/runit_2.3.1.bb new file mode 100644 index 0000000..e6e0617 --- /dev/null +++ b/meta-yerba/recipes-core/runit/runit_2.3.1.bb @@ -0,0 +1,48 @@ +SUMMARY = "runit - a UNIX init scheme with service supervision" +DESCRIPTION = "runit is a cross-platform Unix init scheme with service supervision" +HOMEPAGE = "https://smarden.org/runit/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://package/COPYING;md5=a97395d42a16fff3c0a1cf4b48757696" + +SRC_URI = "git://github.com/g-pape/runit;protocol=https;branch=next" +SRCREV = "0e52a89654d375a8d634c5d9d18ab29fdb666976" +S = "${WORKDIR}/git" + +do_compile() { + cd ${S} + ./package/compile +} + +do_install() { + install -d ${D}/sbin ${D}/usr/bin ${D}/usr/sbin ${D}/etc/runit ${D}/etc/service + + if [ -d ${S}/command ]; then + install -m 0755 ${S}/command/runit-init ${D}/sbin/ + install -m 0755 ${S}/command/runsvdir ${D}/usr/sbin/ + install -m 0755 ${S}/command/sv ${D}/usr/bin/ + install -m 0755 ${S}/command/svlogd ${D}/usr/sbin/ + fi + + cat > ${D}/etc/runit/1 << 'EOF' +#!/bin/sh +echo "Starting runit stage 1" +EOF + cat > ${D}/etc/runit/2 << 'EOF' +#!/bin/sh +echo "Starting runit stage 2" +exec runsvdir -P /etc/service +EOF + cat > ${D}/etc/runit/3 << 'EOF' +#!/bin/sh +echo "Shutting down runit stage 3" +EOF + chmod 0755 ${D}/etc/runit/* 2>/dev/null || true +} + +FILES:${PN} = "/sbin/runit-init /usr/sbin/runsvdir /usr/bin/sv /usr/sbin/svlogd /etc/runit /etc/service" +RDEPENDS:${PN} += "busybox" + +PROVIDES += "runit-init" + +# Prevents yocto from shitting itself and telling me "oh its a fatal QA issue the binaries are stripped" LET ME LIVE +INSANE_SKIP:${PN} += "already-stripped debug-files" |
