diff --git a/Config.in b/Config.in index e69de29b..fa019d5f 100644 --- a/Config.in +++ b/Config.in @@ -0,0 +1,5 @@ +menu "Packages" + +source "$BR2_EXTERNAL_INFIX_PATH/package/Config.in" + +endmenu diff --git a/external.mk b/external.mk index e69de29b..214901ca 100644 --- a/external.mk +++ b/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/package/*/*.mk)) diff --git a/package/Config.in b/package/Config.in new file mode 100644 index 00000000..244520f6 --- /dev/null +++ b/package/Config.in @@ -0,0 +1,2 @@ +source "$BR2_EXTERNAL_INFIX_PATH/package/finit/Config.in" +source "$BR2_EXTERNAL_INFIX_PATH/package/skeleton-init-finit/Config.in" diff --git a/package/finit/Config.in b/package/finit/Config.in new file mode 100644 index 00000000..bcd233ce --- /dev/null +++ b/package/finit/Config.in @@ -0,0 +1,153 @@ +config BR2_PACKAGE_FINIT + bool "finit" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBITE + select BR2_PACKAGE_LIBUEV + select BR2_PACKAGE_SKELETON_INIT_FINIT # before BR2_INIT_FINIT support + help + The original Asus EeePC fastinit clone, on steroids. With process + supervision, plugin support, and more! + + https://github.com/troglobit/finit + +if BR2_PACKAGE_FINIT + +config BR2_PACKAGE_FINIT_CUSTOM_FSTAB + string "Custom /etc/fstab" + default "/etc/fstab" + help + In certain use-cases, e.g., embedded systems with a secondary + partition, or when testing in factory production. Users may + want to mount system partitions from an fstab file other than + /etC/fstab. + + This menuconfing setting changes the default fstab Finit looks + for. To select a different at boot time, use kernel command + line option finit.fstab=/etc/fstab.alt, as usual, for command + line options destined for PID 1, remember the -- separator and + put them last. + +config BR2_PACKAGE_FINIT_INITCTL_GROUP + string "Group for /run/finit/socket" + default "wheel" + help + On systems with multiple administrators, set the group + to their shared UNIX group, usually "wheel", to allow + them to start/stop services and reboot the system. + +config BR2_PACKAGE_FINIT_KEVENTD + bool "finit-keventd" + default n + help + Build bundled finit-keventd, which monitors kernel events + for AC power status and generates sys/pwr/fail condition. + This is a new feature in Finit v4.1 and is still very much + in an experimental state. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_SULOGIN + bool "finit-sulogin" + default n + help + Build bundled finit-sulogin, which handles rescue mode + and cases where fsck fails. Its job is to ask for the + password for the root user, and start a login shell so + an administrator can perform corrective maintenance. + + This is disabled by default since most users prefer the + distribution specific (Busybox) sulogin instead. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_WATCHDOG + bool "finit-watchdogd" + default n + help + Build bundled finit-watchdogd, which provides a simplistic + watchdog daemon that runs in the background, kicking the + systemd default /dev/watchdog to prevent reboot. This is + useful in very small systems where its grownup old cousin + watchdogd cannot be used. + + For lxc/docker application builds you do not need this. + +if BR2_PACKAGE_FINIT_WATCHDOG + +config BR2_PACKAGE_FINIT_WATCHDOG_DEV + string "watchdog device" + default "/dev/watchdog" + help + Device node to use for finit-watchdogd. The default is + usually sufficient, but some systems have more than one. + +endif + +config BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG + bool "hotplug plugin (mdev/udev)" + help + By default, Finit builds and launches its hotplug plugin. + It is responsible for detecting and starting the mdev tool, + or udevd daemon. The former exists in many BusyBox based + systems and is called for "cold plugging". The latter has + many various incarnations and is mostly used for desktop + systems. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS + bool "hook scripts" + default n + help + Adds a run-parts(8) script runner for Finit hook points. When + enabled, it allows extending and customizing the boot process + and do early boot debugging long before regular services are + available. + + For example, say that you want to enable some kernel tracing + before modules are loaded. With hook-scripts, you can just + drop in a shell script in /libexec/finit/hook/mount/all/ that + will poke the right control files in tracefs. + +config BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD + bool "Scan /etc/modules-load.d" + help + Scans /etc/modules-load.d for modules to load. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_PLUGIN_MODPROBE + bool "Coldplug modules using modalias magic" + help + Coldplug modules using modalias magic. Everything is + handled automatically based on device trees and their + matching kernel modules. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_PLUGIN_RTC + bool "RTC plugin" + help + By default, Finit builds and launches its RTC plugin. It is + responsible for restoring the system clock from the RTC clock + at boot, and saving the system clock to RTC at reboot. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_PLUGIN_TTY + bool "TTY plugin" + help + Automatically resart tty services that are plugged in. + + For lxc/docker application builds you do not need this. + +config BR2_PACKAGE_FINIT_PLUGIN_URANDOM + bool "/dev/urandom plugin" + help + By default, Finit builds and launches its urandom plugin. It + is responsible for seeding /dev/urandom from a previously saved + seed at boot, and saving a seed at reboot. + + For lxc/docker application builds you do not need this. + +endif diff --git a/package/finit/finit.hash b/package/finit/finit.hash new file mode 100644 index 00000000..ad0a8dc6 --- /dev/null +++ b/package/finit/finit.hash @@ -0,0 +1,8 @@ +# From https://github.com/troglobit/finit/releases/ +sha256 262d8cfea80d94e048e3f1b149f5d940b4579a38f2b7dba563cf4b0b497e7422 finit-4.3.tar.gz + +# Locally calculated +sha256 abdb9adbbc1faacc35c80bc2974c7d6b842e3e50b066d688385b5d21be86206f LICENSE + +# No hash for git snapshots: +#none none finit-099672f.tar.gz diff --git a/package/finit/finit.mk b/package/finit/finit.mk new file mode 100644 index 00000000..145427ea --- /dev/null +++ b/package/finit/finit.mk @@ -0,0 +1,126 @@ +################################################################################ +# +# finit +# +################################################################################ + +FINIT_VERSION = 4.3 +FINIT_SITE = https://github.com/troglobit/finit/releases/download/$(FINIT_VERSION) +FINIT_LICENSE = MIT +FINIT_LICENSE_FILES = LICENSE +FINIT_INSTALL_STAGING = YES +FINIT_DEPENDENCIES = host-pkgconf libite libuev +FINIT_INSTALL_STAGING = YES +FINIT_D = $(TARGET_DIR)/etc/finit.d + +# Create configure script using autoreconf when building from git +#FINIT_VERSION = 099672f +#FINIT_SITE = git://github.com/troglobit/finit.git +#FINIT_AUTORECONF = YES +#FINIT_DEPENDENCIES += host-automake host-autoconf host-libtool + +# Buildroot defaults to /usr for both prefix and exec-prefix, this we +# must override because we want to install into /sbin and /bin for the +# finit and initctl programs, respectively. The expected plugin path is +# /lib/finit/ and scripts in /libexec, both are set by --exec-prefix. +# The localstatedir is set to the correct system path by Buildroot, so +# no override necessary there. +FINIT_CONF_OPTS = \ + --prefix=/usr \ + --exec-prefix= \ + --disable-doc \ + --disable-contrib \ + --disable-silent-rules \ + --with-group=$(BR2_PACKAGE_FINIT_INITCTL_GROUP) + +# Disable/Enable features +ifeq ($(BR2_PACKAGE_FINIT_CUSTOM_FSTAB),) +FINIT_CONF_OPTS += --with-fstab=yes +else +FINIT_CONF_OPTS += --with-fstab=$(BR2_PACKAGE_FINIT_CUSTOM_FSTAB) +endif + +ifeq ($(BR2_PACKAGE_FINIT_KEVENTD),y) +FINIT_CONF_OPTS += --with-keventd +else +FINIT_CONF_OPTS += --without-keventd +endif + +ifeq ($(BR2_PACKAGE_FINIT_SULOGIN),y) +FINIT_CONF_OPTS += --with-sulogin +else +FINIT_CONF_OPTS += --without-sulogin +endif + +ifeq ($(BR2_PACKAGE_FINIT_WATCHDOG),y) +FINIT_CONF_OPTS += --with-watchdog=$(BR2_PACKAGE_FINIT_WATCHDOG_DEV) +else +FINIT_CONF_OPTS += --without-watchdog +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG),y) +FINIT_CONF_OPTS += --enable-hotplug-plugin +else +FINIT_CONF_OPTS += --disable-hotplug-plugin +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS),y) +FINIT_CONF_OPTS += --enable-hook-scripts-plugin +else +FINIT_CONF_OPTS += --disable-hook-scripts-plugin +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_MODULES_LOAD),y) +FINIT_CONF_OPTS += --enable-modules-load-plugin +else +FINIT_CONF_OPTS += --disable-modules-load-plugin +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_MODPROBE),y) +FINIT_CONF_OPTS += --enable-modprobe-plugin +else +FINIT_CONF_OPTS += --disable-modprobe-plugin +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_RTC),y) +FINIT_CONF_OPTS += --enable-rtc-plugin +else +FINIT_CONF_OPTS += --disable-rtc-plugin +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_TTY),y) +FINIT_CONF_OPTS += --enable-tty-plugin +else +FINIT_CONF_OPTS += --disable-tty-plugin +endif + +ifeq ($(BR2_PACKAGE_FINIT_PLUGIN_URANDOM),y) +FINIT_CONF_OPTS += --enable-urandom-plugin +else +FINIT_CONF_OPTS += --disable-urandom-plugin +endif + +ifneq ($(SKELETON_INIT_COMMON_HOSTNAME),) +FINIT_CONF_OPTS += --with-hostname="$(SKELETON_INIT_COMMON_HOSTNAME)" +endif + +# Disable/Enable features depending on other packages +ifeq ($(BR2_PACKAGE_ALSA_UTILS),y) +FINIT_CONF_OPTS += --enable-alsa-utils-plugin +else +FINIT_CONF_OPTS += --disable-alsa-utils-plugin +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +FINIT_CONF_OPTS += --enable-dbus-plugin +else +FINIT_CONF_OPTS += --disable-dbus-plugin +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +FINIT_CONF_OPTS += --enable-x11-common-plugin +else +FINIT_CONF_OPTS += --disable-x11-common-plugin +endif + +$(eval $(autotools-package)) diff --git a/package/skeleton-init-finit/Config.in b/package/skeleton-init-finit/Config.in new file mode 100644 index 00000000..e6a6885c --- /dev/null +++ b/package/skeleton-init-finit/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_SKELETON_INIT_FINIT + bool + select BR2_PACKAGE_HAS_SKELETON + select BR2_PACKAGE_SKELETON_INIT_COMMON + +config BR2_PACKAGE_PROVIDES_SKELETON + default "skeleton-init-finit" if BR2_PACKAGE_SKELETON_INIT_FINIT + +if BR2_PACKAGE_SKELETON_INIT_FINIT +menu "finit init skeleton" + +config BR2_PACKAGE_SKELETON_INIT_FINIT_TELNETD + bool "/etc/inetd.conf telnetd" + help + Enable telnetd from inetd service (disabled). + +endmenu +endif diff --git a/package/skeleton-init-finit/skeleton-init-finit.mk b/package/skeleton-init-finit/skeleton-init-finit.mk new file mode 100644 index 00000000..926112f9 --- /dev/null +++ b/package/skeleton-init-finit/skeleton-init-finit.mk @@ -0,0 +1,143 @@ +################################################################################ +# +# skeleton-init-finit +# +################################################################################ + +# The skeleton can't depend on the toolchain, since all packages depends on the +# skeleton and the toolchain is a target package, as is skeleton. +# Hence, skeleton would depends on the toolchain and the toolchain would depend +# on skeleton. +SKELETON_INIT_FINIT_ADD_TOOLCHAIN_DEPENDENCY = NO +SKELETON_INIT_FINIT_ADD_SKELETON_DEPENDENCY = NO +SKELETON_INIT_FINIT_TMPFILE := $(shell mktemp) +SKELETON_INIT_FINIT_DEPENDENCIES = skeleton-init-common + +# Enable when BR2_INIT_FINT +#SKELETON_INIT_FINIT_PROVIDES = skeleton + +# Prefer Finit built-in getty unless options are set, squash zero baudrate +define SKELETON_INIT_FINIT_GETTY + if [ -z "$(SYSTEM_GETTY_OPTIONS)" ]; then \ + if [ $(SYSTEM_GETTY_BAUDRATE) -eq 0 ]; then \ + SYSTEM_GETTY_BAUDRATE=""; \ + fi; \ + echo "tty [12345789] $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) noclear"; \ + else \ + echo "tty [12345789] /sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_TERM)"; \ + fi +endef + +define SKELETON_INIT_FINIT_SET_GENERIC_GETTY + $(SKELETON_INIT_FINIT_GETTY) > $(SKELETON_INIT_FINIT_TMPFILE) + grep -qxF "`cat $(SKELETON_INIT_FINIT_TMPFILE)`" $(FINIT_D)/available/getty.conf \ + || cat $(SKELETON_INIT_FINIT_TMPFILE) >> $(FINIT_D)/available/getty.conf + rm $(SKELETON_INIT_FINIT_TMPFILE) + ln -sf ../available/getty.conf $(FINIT_D)/enabled/getty.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_GENERIC_GETTY + +# Dropbear SSH +ifeq ($(BR2_PACKAGE_DROPBEAR),y) +define SKELETON_INIT_FINIT_SET_DROPBEAR + ln -sf ../available/dropbear.conf $(FINIT_D)/enabled/dropbear.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_DROPBEAR +endif + +ifeq ($(BR2_PACKAGE_MINI_SNMPD),y) +define SKELETON_INIT_FINIT_SET_MINI_SNMPD + ln -sf ../available/mini-snmpd.conf $(FINIT_D)/enabled/mini-snmpd.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_MINI_SNMPD +endif + +# Enable Busybox syslogd unless sysklogd is enabled +ifeq ($(BR2_PACKAGE_SYSKLOGD),y) +define SKELETON_INIT_FINIT_SET_SYSLOGD + ln -sf ../available/sysklogd.conf $(FINIT_D)/enabled/sysklogd.conf + rm -f $(FINIT_D)/enabled/syslogd.conf +endef +else +define SKELETON_INIT_FINIT_SET_SYSLOGD + ln -sf ../available/syslogd.conf $(FINIT_D)/enabled/syslogd.conf + rm -f $(FINIT_D)/enabled/sysklogd.conf +endef +endif +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_SYSLOGD + +# SSDP Responder +ifeq ($(BR2_PACKAGE_SSDP_RESPONDER),y) +define SKELETON_INIT_FINIT_SET_SSDP_RESPONDER + ln -sf ../available/ssdp-responder.conf $(FINIT_D)/enabled/ssdp-responder.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_SSDP_RESPONDER +endif + +ifeq ($(BR2_PACKAGE_SMCROUTE),y) +define SKELETON_INIT_FINIT_SET_SMCROUTE + ln -sf ../available/smcroute.conf $(FINIT_D)/enabled/smcroute.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_SMCROUTE +endif + +# Watchdogd +ifeq ($(BR2_PACKAGE_WATCHDOGD),y) +define SKELETON_INIT_FINIT_SET_WATCHDOGD + ln -sf ../available/watchdogd.conf $(FINIT_D)/enabled/watchdogd.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_WATCHDOGD +endif + +# Enable gdbserver when running in Qemu mode +ifeq ($(QEMU_GDB),y) +define SKELETON_INIT_FINIT_SET_GDBSERVER + ln -sf ../available/gdbserver.conf $(FINIT_D)/enabled/gdbserver.conf +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_SET_GDBSERVER +endif + +# Workaround, should be in ifupdown-scripts package +ifeq ($(BR2_PACKAGE_IFUPDOWN_SCRIPTS),y) +define SKELETON_INIT_FINIT_IFUPDOWN_WORKAROUND + $(IFUPDOWN_SCRIPTS_PREAMBLE) + $(IFUPDOWN_SCRIPTS_LOCALHOST) + $(IFUPDOWN_SCRIPTS_DHCP) +endef +SKELETON_INIT_FINIT_TARGET_FINALIZE_HOOKS += SKELETON_INIT_FINIT_IFUPDOWN_WORKAROUND +endif + + +ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y) +# Uncomment /dev/root entry in fstab to allow Finit to remount it rw +define SKELETON_INIT_FINIT_ROOT_RO_OR_RW + $(SED) '\:^#[[:blank:]]*/dev/root[[:blank:]]:s/^# //' $(TARGET_DIR)/etc/fstab +endef +else +# Comment out /dev/root entry to prevent Finit from remounting it rw +define SKELETON_INIT_FINIT_ROOT_RO_OR_RW + $(SED) '\:^/dev/root[[:blank:]]:s/^/# /' $(TARGET_DIR)/etc/fstab +endef +endif + +ifeq ($(BR2_PACKAGE_SKELETON_INIT_FINIT_TELNETD),y) +define SKELETON_INIT_FINIT_TELNETD + $(SED) '\:^#[[:blank:]]*telnet[[:blank:]]:s/^# //' $(TARGET_DIR)/etc/inetd.conf +endef +else +define SKELETON_INIT_FINIT_TELNETD + $(SED) '\:^telnet[[:blank:]]:s/^/# /' $(TARGET_DIR)/etc/inetd.conf +endef +endif + +define SKELETON_INIT_FINIT_INSTALL_TARGET_CMDS + $(call SYSTEM_RSYNC,$(SKELETON_INIT_FINIT_PKGDIR)/skeleton,$(TARGET_DIR)) + mkdir -p $(TARGET_DIR)/home + mkdir -p $(TARGET_DIR)/srv + mkdir -p $(TARGET_DIR)/var + [ -L $(TARGET_DIR)/var/run ] || ln -s ../run $(TARGET_DIR)/var/run + $(SKELETON_INIT_FINIT_ROOT_RO_OR_RW) + $(SKELETON_INIT_FINIT_TELNETD) +endef + +$(eval $(generic-package)) diff --git a/package/skeleton-init-finit/skeleton/etc/default/gdbserver b/package/skeleton-init-finit/skeleton/etc/default/gdbserver new file mode 100644 index 00000000..eaf29168 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/default/gdbserver @@ -0,0 +1,5 @@ +# TCP connection +#GDBSERVER_ARGS="--multi :1235" + +# Qemu debug console +GDBSERVER_ARGS="--multi /dev/hvc1" diff --git a/package/skeleton-init-finit/skeleton/etc/default/querierd b/package/skeleton-init-finit/skeleton/etc/default/querierd new file mode 100644 index 00000000..b4346a8f --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/default/querierd @@ -0,0 +1,3 @@ +# -i NAME :: Set daemon identity (syslog, .conf, .sock, .pid, etc.) +# -l LVL :: Log level +QUERIERD_ARGS="" diff --git a/package/skeleton-init-finit/skeleton/etc/default/sysklogd b/package/skeleton-init-finit/skeleton/etc/default/sysklogd new file mode 100644 index 00000000..775c4e3c --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/default/sysklogd @@ -0,0 +1,5 @@ +# -m0 :: Disable periodic syslog MARK entries +# -s :: Enable secure mode, don't listen to remote logs +# -r 1M:5 :: Log rotation every 1 MiB and keep 5 rotated ones +SYSLOGD_ARGS="-m0 -s -r 1M:5" + diff --git a/package/skeleton-init-finit/skeleton/etc/finit.conf b/package/skeleton-init-finit/skeleton/etc/finit.conf new file mode 100644 index 00000000..ee7a9f18 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.conf @@ -0,0 +1,9 @@ +# /etc/finit.conf: Buildroot defaults +# See /etc/finit.d/available/*.conf and `initctl list` for other services + +## Runlevel to start after bootstrap, runlevel 'S' +# Default is 2 +#runlevel 2 + +## Bootstrap services and tasks +# Can be listed here or in /etc/finit.d/*.conf diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/dnsmasq.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/dnsmasq.conf new file mode 100644 index 00000000..3b34dfe5 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/dnsmasq.conf @@ -0,0 +1 @@ +service [2345] dnsmasq -k -- DHCP/DNS proxy diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/dropbear.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/dropbear.conf new file mode 100644 index 00000000..3eb56868 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/dropbear.conf @@ -0,0 +1,4 @@ +# : dropbear does not honor SIGHUP. +# -R: Create hostkeys if needed. +# -F: Run in foreground. +service [2345789] env:-/etc/default/dropbear dropbear -F -R $DROPBEAR_ARGS -- Dropbear SSH daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/gdbserver.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/gdbserver.conf new file mode 100644 index 00000000..94330238 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/gdbserver.conf @@ -0,0 +1 @@ +service [123456789] env:-/etc/default/gdbserver gdbserver $GDBSERVER_ARGS -- GDB Server diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/getty.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/getty.conf new file mode 100644 index 00000000..3db8d725 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/getty.conf @@ -0,0 +1,20 @@ +# This is a console auto-detect for the built-in getty. It matches +# ttyS0, ttyAMA0, or ttymxc0 depending on the system. +#tty [12345] @console 115200 noclear + +# For board bringup or debug purposes the `nologin` flag can be used +# to bypass the login prompt and get a shell directly. +#tty [12345] @console noclear nologin + +# Alternatively you can run on the exact TTY device +#tty [12345] /dev/ttyS0 115200 noclear +#tty [12345] /dev/ttyAMA0 115200 noclear vt220 + +# Example using an external getty, here from BusyBox +#tty [12345] /sbin/getty -L 115200 ttyAMA0 vt100 nowait +#tty [12345] /sbin/getty -L 115200 @console vt100 noclear + +# Allow login on ttyUSB0, for systems with no dedicated console port +#tty [12345] /dev/ttyUSB0 115200 noclear + +# Automatically generated from Buildroot menuconfig diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/inadyn.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/inadyn.conf new file mode 100644 index 00000000..c6184b3c --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/inadyn.conf @@ -0,0 +1,2 @@ +service [2345] inadyn -ns -t 30 -- DDNS client + diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/inetd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/inetd.conf new file mode 100644 index 00000000..97ecff7f --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/inetd.conf @@ -0,0 +1,3 @@ +# Busybox inetd uses /etc/inetd.conf, example: +# nntp stream tcp nowait news /usr/sbin/leafnode +service [2345] inetd -f -- Internet super server diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/isisd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/isisd.conf new file mode 100644 index 00000000..4d187636 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/isisd.conf @@ -0,0 +1 @@ +service [2345] log:null isisd -A 127.0.0.1 -u root -g root -- IS-IS daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/lldpd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/lldpd.conf new file mode 100644 index 00000000..ccb202f7 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/lldpd.conf @@ -0,0 +1 @@ +service [2345] env:-/etc/default/lldpd lldpd -d $LLDPD_ARGS -- LLDP daemon (IEEE 802.1ab) diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/mini-snmpd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/mini-snmpd.conf new file mode 100644 index 00000000..eacd97a6 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/mini-snmpd.conf @@ -0,0 +1 @@ +service [2345] /usr/sbin/mini-snmpd -sn -- Mini snmpd diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/ntpd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ntpd.conf new file mode 100644 index 00000000..9f1c0cef --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ntpd.conf @@ -0,0 +1,2 @@ +# Wait for the system to have a default route before starting +service [2345] log ntpd -n -l -I eth0 -- NTP daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/ospf6d.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ospf6d.conf new file mode 100644 index 00000000..665ac881 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ospf6d.conf @@ -0,0 +1 @@ +service [2345] log:null ospf6d -A 127.0.0.1 -u root -g root -- OSPF IPv6 daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/ospfd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ospfd.conf new file mode 100644 index 00000000..d600532c --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ospfd.conf @@ -0,0 +1 @@ +service [2345] log:null ospfd -A 127.0.0.1 -u root -g root -- OSPF daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/querierd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/querierd.conf new file mode 100644 index 00000000..f55f8c69 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/querierd.conf @@ -0,0 +1 @@ +service [2345789] env:-/etc/default/querierd querierd -sn $QUERIERD_ARGS -- Multicast query daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/ripd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ripd.conf new file mode 100644 index 00000000..a3aab661 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ripd.conf @@ -0,0 +1 @@ +service [2345] log:null ripd -A 127.0.0.1 -u root -g root -- RIP daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/ripng.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ripng.conf new file mode 100644 index 00000000..c89294c9 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ripng.conf @@ -0,0 +1 @@ +service [2345] log:null ripngd -A 127.0.0.1 -u root -g root -- RIP IPv6 daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/smcroute.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/smcroute.conf new file mode 100644 index 00000000..b06aaf76 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/smcroute.conf @@ -0,0 +1 @@ +service [2345] smcrouted -ns -- Static multicast routing daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/ssdp-responder.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ssdp-responder.conf new file mode 100644 index 00000000..250e4c74 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/ssdp-responder.conf @@ -0,0 +1 @@ +service [2345] ssdpd -ns -- SSDP Responder diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/sysklogd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/sysklogd.conf new file mode 100644 index 00000000..c49f9e15 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/sysklogd.conf @@ -0,0 +1 @@ +service name:sysklogd [S123456789] env:-/etc/default/sysklogd syslogd -F $SYSLOGD_ARGS -- System log daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/syslogd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/syslogd.conf new file mode 100644 index 00000000..c5daa7ca --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/syslogd.conf @@ -0,0 +1,8 @@ +# BusyBox syslogd + klogd + +# We want syslogd to always run, never be stopped, regardless of runlevel +# so it can send to any remote syslog server the user has set up. +service [S123456789] syslogd -n -s 512 -b 3 -t -- System log daemon + +# klogd depends on syslogd, but BusyBox syslogd doesn't create a PID file to sync with +service [S123456789] klogd -n -- Kernel log daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/telnetd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/telnetd.conf new file mode 100644 index 00000000..dc45fa8f --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/telnetd.conf @@ -0,0 +1,2 @@ +service [2345] :23 telnetd -F -p 23 -- Telnet daemon on port 23 +service [2345] :2323 telnetd -F -p 2323 -- Telnet daemon on port 2323 diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/watchdogd.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/watchdogd.conf new file mode 100644 index 00000000..503d0284 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/watchdogd.conf @@ -0,0 +1,4 @@ +# Finit has a built-in watchdog daemon that starts very early +# to take care of the hand-over from any bootloader. Therefore +# watchdogd does not need to start until the default runlevel. +service [123456789] watchdogd -xns -- System watchdog daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/available/zebra.conf b/package/skeleton-init-finit/skeleton/etc/finit.d/available/zebra.conf new file mode 100644 index 00000000..93b15def --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/finit.d/available/zebra.conf @@ -0,0 +1 @@ +service [2345] pid:!/run/quagga/zebra.pid zebra -A 127.0.0.1 -u root -g root -- Zebra routing daemon diff --git a/package/skeleton-init-finit/skeleton/etc/finit.d/enabled/.empty b/package/skeleton-init-finit/skeleton/etc/finit.d/enabled/.empty new file mode 100644 index 00000000..e69de29b diff --git a/package/skeleton-init-finit/skeleton/etc/fstab b/package/skeleton-init-finit/skeleton/etc/fstab new file mode 100644 index 00000000..cb3c546a --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/fstab @@ -0,0 +1,3 @@ +# +/dev/root / auto rw,noauto 0 1 +tmpfs /tmp tmpfs mode=1777 0 0 diff --git a/package/skeleton-init-finit/skeleton/etc/inetd.conf b/package/skeleton-init-finit/skeleton/etc/inetd.conf new file mode 100644 index 00000000..18edffe1 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/etc/inetd.conf @@ -0,0 +1,20 @@ +# Services started by Busybox inetd on demand +# +# [ADDR:]service_name must be in /etc/services, or port number +# socket_type stream/dgram/raw/rdm/seqpacket +# protocol tcp/udp +# wait/nowait[.max] wait is usually for udp, nowait for tcp +# max: max copies to run +# user[.group] or user[:group] user and group to run under +# binary program to run +# arg0 arg1 arg2... arguments, INCLUDING program name (arg0) + +# serv socket pro w/nw user binary args + +# IPv6 +#555 dgram udp6 wait root echo echo Hello IPv6 udp world +# ...with ADDR prefix: +#::1:444 stream tcp6 nowait root echo echo Hello IPv6 localhost + +# Regualar telnetd service +telnet stream tcp nowait root telnetd telnetd diff --git a/package/skeleton-init-finit/skeleton/var/cache/.empty b/package/skeleton-init-finit/skeleton/var/cache/.empty new file mode 100644 index 00000000..e69de29b diff --git a/package/skeleton-init-finit/skeleton/var/lib/misc/.empty b/package/skeleton-init-finit/skeleton/var/lib/misc/.empty new file mode 100644 index 00000000..e69de29b diff --git a/package/skeleton-init-finit/skeleton/var/lock/.empty b/package/skeleton-init-finit/skeleton/var/lock/.empty new file mode 100644 index 00000000..e69de29b diff --git a/package/skeleton-init-finit/skeleton/var/log/.empty b/package/skeleton-init-finit/skeleton/var/log/.empty new file mode 100644 index 00000000..e69de29b diff --git a/package/skeleton-init-finit/skeleton/var/run b/package/skeleton-init-finit/skeleton/var/run new file mode 120000 index 00000000..84ba55b9 --- /dev/null +++ b/package/skeleton-init-finit/skeleton/var/run @@ -0,0 +1 @@ +../run \ No newline at end of file diff --git a/package/skeleton-init-finit/skeleton/var/spool/.empty b/package/skeleton-init-finit/skeleton/var/spool/.empty new file mode 100644 index 00000000..e69de29b diff --git a/package/skeleton-init-finit/skeleton/var/tmp/.empty b/package/skeleton-init-finit/skeleton/var/tmp/.empty new file mode 100644 index 00000000..e69de29b diff --git a/provides/init.in b/provides/init.in new file mode 100644 index 00000000..dd1e951e --- /dev/null +++ b/provides/init.in @@ -0,0 +1,4 @@ +config BR2_INIT_FINIT + bool "Finit" + select BR2_PACKAGE_FINIT + select BR2_PACKAGE_SKELETON_INIT_FINIT if BR2_ROOTFS_SKELETON_DEFAULT diff --git a/provides/skeleton.in b/provides/skeleton.in new file mode 100644 index 00000000..68937f66 --- /dev/null +++ b/provides/skeleton.in @@ -0,0 +1,3 @@ +config BR2_ROOTFS_SKELETON_FINIT + bool "Finit services skeleton" + select BR2_PACKAGE_SKELETON_INIT_FINIT