diff --git a/.gitignore b/.gitignore index 6dc77d5e..149d7e99 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ Makefile.in /GRTAGS /GSYMS /GTAGS -/contrib/* /autom4te.cache/* /aclocal.m4 /ar-lib diff --git a/contrib/alpine/README.md b/contrib/alpine/README.md new file mode 100644 index 00000000..99929211 --- /dev/null +++ b/contrib/alpine/README.md @@ -0,0 +1,32 @@ +HowTo: Finit on Alpine Linux 3.4 +================================= + +This is a mini-howto for booting a very basic Alpine Linux with Finit. +It is assumed that the user has already installed a compiler, C library +header files, and other tools needed to build a GNU configure based +project. + +To start with you need to first install [libuEv][] and [libite][], by +default they install to `/usr/local` and Alpine's `pkg-config` does not +look for libraries and header files there. So the `PKG_CONFIG_LIBDIR` +environment variable has to be used: + + alpine:~/finit# PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig ./configure \ + --enable-embedded --enable-rw-rootfs --enable-inetd-echo-plugin \ + --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ + --enable-inetd-discard-plugin --enable-inetd-time-plugin \ + --with-heading="Alpine Linux 3.4" --with-hostname=alpine + +The plugins are optional, but the other configure flags are *not*. + + alpine:~/finit# make all install + +The installation will skip setting up `/sbin/init`, because it already +exists, and Alpine is hard coded to use it. So you have to change the +symlink yourself to point to `finit` instead of `/bin/busybox`. + +Before rebooting, make sure to install `/etc/finit.conf` and the glue +`/etc/rc.local` from this directory -- check them both if they need to +be tweaked for your installation, you may not run Dropbear SSH or speak +Swedish ... + diff --git a/contrib/alpine/finit.conf b/contrib/alpine/finit.conf new file mode 100644 index 00000000..6810c378 --- /dev/null +++ b/contrib/alpine/finit.conf @@ -0,0 +1,28 @@ +# Sample finit.conf for booting Alpine Linux 3.4 +# + +# Devices to fsck at boot +check /dev/vda1 + +# Runlevel to start after bootstrap, runlevel 'S' +runlevel 2 + +# Network bringup script +network /sbin/ifup -a + +#task [S] /etc/ -- Setting up preliminary keymap + +# Services to be monitored and respawned as needed +service [2345] /sbin/klogd -n -- Kernel logging server +service [2345] /sbin/syslogd -n -- Syslog server +service [2345] /usr/sbin/dropbear -R -F -p 22 -- Dropbear SSH daemon +service [2345] /usr/sbin/crond -f -S -c /etc/crontabs -- Cron daemon +service [2345] log /usr/sbin/ntpd -n -N -p pool.ntp.org +#service [2345] /sbin/acpid -f -- ACPI daemon + +# Virtual consoles to start getty on +tty /dev/tty1 +tty /dev/tty2 +tty /dev/tty3 +#console /dev/tty1 + diff --git a/contrib/alpine/rc.local b/contrib/alpine/rc.local new file mode 100755 index 00000000..66485c01 --- /dev/null +++ b/contrib/alpine/rc.local @@ -0,0 +1,2 @@ +#!/bin/sh +zcat /etc/keymap/sv-latin1.bmap.gz | loadkmap