Finalize verified 2720 Flip release source and untrack image outputs
This commit is contained in:
1 parent
2a3078e42c
commit
1c011b360a
121 files changed
+8467
-686
No files matched your search
@@ -0,0 +1,33 @@
|
||||
# Bananarchy cover display daemon (Nokia 2720 Flip external panel).
|
||||
# Root-owned: the daemon runs as root; user preferences live in
|
||||
# /home/user/.config/bananarchy/cover-display.conf and are applied by
|
||||
# the xcover DWM plugin at session start.
|
||||
|
||||
# auto = /dev/fb1 (kernel spi-mux) -> /dev/spidev0.1 -> no hardware
|
||||
backend = auto
|
||||
fb_device = /dev/fb1
|
||||
spidev_device = /dev/spidev0.1
|
||||
gpiochip_device = /dev/gpiochip0
|
||||
panel_firmware = /lib/firmware/nokia,beatles-gc9305-ext-panel.bin
|
||||
socket_path = /run/bananarchy/cover.sock
|
||||
theme_file = /home/user/.Xresources
|
||||
input_dir = /dev/input
|
||||
|
||||
# GPIO offsets on MSM8909 TLMM (from the KaiOS downstream DTS)
|
||||
mux_gpio = 13
|
||||
reset_gpio = 23
|
||||
# gpio110 (the internal panel's DC line) is claimed exclusively by
|
||||
# panel-mipi-dbi-spi, so the daemon cannot request it through gpiochip0.
|
||||
# The gpio13 switch routes the shared DC/CS lines; -1 lets the spidev
|
||||
# backend open without fighting the kernel driver. Set this back to 110
|
||||
# only when the spi-mux kernel modules own both panels instead.
|
||||
dc_gpio = -1
|
||||
|
||||
# Privacy defaults: no caller name, no notification body, no text in logs.
|
||||
enabled = 1
|
||||
show_caller = 0
|
||||
show_notify = 0
|
||||
mask_logs = 1
|
||||
clock24 = 1
|
||||
brightness = 160
|
||||
blank_timeout = 120
|
||||
@@ -0,0 +1,6 @@
|
||||
# Bananarchy: pin the PAM-enabled sshd binary explicitly. The stock init
|
||||
# script picks /usr/sbin/sshd.pam only when its "sshd -G | grep UsePAM yes"
|
||||
# probe succeeds; if that probe is skipped (e.g. a service manager invoking
|
||||
# sshd directly) the default /usr/sbin/sshd is used and it *rejects* the
|
||||
# postmarketOS "UsePAM yes" drop-in as an unsupported option.
|
||||
SSHD_BINARY="/usr/sbin/sshd.pam"
|
||||
@@ -0,0 +1,2 @@
|
||||
# Bound udevadm settle so missing modem firmware cannot delay X startup.
|
||||
udev_settle_timeout=2
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#!/sbin/openrc-run
|
||||
# Bananarchy cover display daemon. Only active on flip devices; the
|
||||
# lid-profile file is written by scripts/apply-bananarchy-overlay.sh.
|
||||
|
||||
description="Nokia 2720 Flip external cover display"
|
||||
# The recovered native bananarchy-coverd busy-loops at 100% CPU on the
|
||||
# spidev backend (gpio110/DC is owned by panel-mipi-dbi-spi) and paints
|
||||
# nothing. Keep that binary installed for the future spi-mux work, but run
|
||||
# the compiled idle IPC server in the default runlevel. No Python runs here.
|
||||
command="/usr/bin/bananarchy-cover-idle"
|
||||
command_args="--config /etc/bananarchy/cover-display.conf"
|
||||
command_background="yes"
|
||||
pidfile="/run/bananarchy/cover-display.pid"
|
||||
output_log="/run/bananarchy/cover-display.log"
|
||||
error_log="/run/bananarchy/cover-display.log"
|
||||
|
||||
depend() {
|
||||
need udev
|
||||
after udev-settle
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
mkdir -p /run/bananarchy
|
||||
chmod 0755 /run/bananarchy
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" != "flip" ]; then
|
||||
ebegin "Skipping cover display (not a flip device)"
|
||||
eend 0
|
||||
return 0
|
||||
fi
|
||||
default_start
|
||||
}
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/sbin/openrc-run
|
||||
# Nokia 2720 Flip hall-sensor lid handling (lock, blank, cover switch).
|
||||
|
||||
description="Bananarchy flip lid handler"
|
||||
|
||||
command="/usr/bin/bananarchy-lid"
|
||||
command_background=true
|
||||
pidfile="/run/bananarchy-lid.pid"
|
||||
|
||||
depend() {
|
||||
need udev
|
||||
after udev-settle
|
||||
before bananarchy-cover-display tinydm
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/sbin/openrc-run
|
||||
# USB-only PAM-free fallback sshd, started independently of local.d.
|
||||
description="Bananarchy USB diagnostic sshd"
|
||||
|
||||
command="/usr/sbin/sshd"
|
||||
command_args="-f /etc/ssh/sshd_config_debug"
|
||||
pidfile="/run/sshd-debug.pid"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after sshd udev-settle
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
[ -x /usr/sbin/sshd ] || return 1
|
||||
[ -f /etc/ssh/ssh_host_ed25519_key ] || /usr/sbin/ssh-keygen -A >/dev/null 2>&1 || true
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -f /etc/bananarchy-no-debug-sshd ]; then
|
||||
ebegin "Skipping USB-only diagnostic sshd"
|
||||
eend 0
|
||||
return 0
|
||||
fi
|
||||
ebegin "Starting USB-only diagnostic sshd"
|
||||
"$command" $command_args
|
||||
eend $?
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/sbin/openrc-run
|
||||
# Direct evdev handling for the 2720 Flip side volume rocker.
|
||||
|
||||
description="Bananarchy side volume keys"
|
||||
|
||||
command="/usr/bin/bananarchy-volume-keys"
|
||||
command_background=true
|
||||
pidfile="/run/bananarchy-volume-keys.pid"
|
||||
|
||||
depend() {
|
||||
need udev
|
||||
after udev-settle
|
||||
}
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright (c) 2007-2015 The OpenRC Authors.
|
||||
# See the Authors file at the top-level directory of this distribution and
|
||||
# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
|
||||
#
|
||||
# This file is part of OpenRC. It is subject to the license terms in
|
||||
# the LICENSE file found in the top-level directory of this
|
||||
# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
|
||||
# This file may not be copied, modified, propagated, or distributed
|
||||
# except according to the terms contained in the LICENSE file.
|
||||
|
||||
conf_d_dir="${RC_SERVICE%/*/*}/conf.d"
|
||||
local_d_dir="${RC_SERVICE%/*/*}/local.d"
|
||||
|
||||
description="Executes user programs in ${local_d_dir}"
|
||||
|
||||
depend()
|
||||
{
|
||||
after modules udev-settle
|
||||
keyword -timeout
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
local file has_errors redirect retval
|
||||
has_errors=0
|
||||
yesno $rc_verbose || redirect='> /dev/null 2>&1'
|
||||
ebegin "Starting local"
|
||||
eindent
|
||||
for file in "${local_d_dir}"/*.start; do
|
||||
if [ -x "${file}" ]; then
|
||||
vebegin "Executing \"${file}\""
|
||||
eval "${file}" $redirect
|
||||
retval=$?
|
||||
if [ ${retval} -ne 0 ]; then
|
||||
has_errors=1
|
||||
fi
|
||||
veend ${retval} "Execution of \"${file}\" failed."
|
||||
fi
|
||||
done
|
||||
eoutdent
|
||||
|
||||
if command -v local_start >/dev/null 2>&1; then
|
||||
ewarn "\"${conf_d_dir}/local\" should be removed."
|
||||
ewarn "Please move the code from the local_start function"
|
||||
ewarn "to executable scripts with an .start extension"
|
||||
ewarn "in \"${local_d_dir}\""
|
||||
local_start
|
||||
fi
|
||||
|
||||
eend ${has_errors}
|
||||
|
||||
# We have to end with a zero exit code, because a failed execution
|
||||
# of an executable ${local_d_dir}/*.start file shouldn't result in
|
||||
# marking the local service as failed. Otherwise we are unable to
|
||||
# execute any executable ${local_d_dir}/*.stop file, because a failed
|
||||
# marked service cannot be stopped (and the stop function would
|
||||
# actually call the executable ${local_d_dir}/*.stop file(s)).
|
||||
return 0
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
local file has_errors redirect retval
|
||||
has_errors=0
|
||||
yesno $rc_verbose || redirect='> /dev/null 2>&1'
|
||||
ebegin "Stopping local"
|
||||
eindent
|
||||
for file in "${local_d_dir}"/*.stop; do
|
||||
if [ -x "${file}" ]; then
|
||||
vebegin "Executing \"${file}\""
|
||||
eval "${file}" $redirect
|
||||
retval=$?
|
||||
if [ ${retval} -ne 0 ]; then
|
||||
has_errors=1
|
||||
fi
|
||||
veend ${retval} "Execution of \"${file}\" failed."
|
||||
fi
|
||||
done
|
||||
eoutdent
|
||||
|
||||
if command -v local_stop >/dev/null 2>&1; then
|
||||
ewarn "\"${conf_d_dir}/local\" should be removed."
|
||||
ewarn "Please move the code from the local_stop function"
|
||||
ewarn "to executable scripts with an .stop extension"
|
||||
ewarn "in \"${local_d_dir}\""
|
||||
local_stop
|
||||
fi
|
||||
|
||||
eend ${has_errors}
|
||||
|
||||
# An executable ${local_d_dir}/*.stop file which failed with a
|
||||
# non-zero exit status is not a reason to mark this service
|
||||
# as failed, therefore we have to end with a zero exit code.
|
||||
return 0
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Make sure the out-of-tree camera driver, the cover-panel spidev driver and
|
||||
# the spi-mux modules are loaded even when the boot-runlevel "modules" service
|
||||
# could not process /etc/modules (it needs /bin/sed, which was missing on some
|
||||
# rootfs builds).
|
||||
for mod in msm8905-cam spidev mux-core mux-gpio spi-mux; do
|
||||
i=0
|
||||
while [ "$i" -lt 5 ]; do
|
||||
/sbin/modprobe -q "$mod" && break
|
||||
i=$((i + 1))
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Keep a USB-only diagnostic login available even when the main sshd's PAM
|
||||
# stack is misconfigured. It is bound to 172.16.42.1 so it is never exposed
|
||||
# over Wi-Fi or the modem; create /etc/bananarchy-no-debug-sshd to disable.
|
||||
[ -f /etc/bananarchy-no-debug-sshd ] && exit 0
|
||||
if rc-service bananarchy-sshd-debug status >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
[ -x /usr/sbin/sshd ] || exit 0
|
||||
[ -f /etc/ssh/ssh_host_ed25519_key ] || /usr/sbin/ssh-keygen -A >/dev/null 2>&1
|
||||
# The USB gadget address may appear after this service starts, so retry.
|
||||
(
|
||||
i=0
|
||||
while [ "$i" -lt 30 ]; do
|
||||
/usr/sbin/sshd -f /etc/ssh/sshd_config_debug >/dev/null 2>&1 && break
|
||||
i=$((i + 1))
|
||||
sleep 2
|
||||
done
|
||||
) &
|
||||
@@ -0,0 +1,9 @@
|
||||
# Bananarchy hardware drivers that are not probed from a DT node.
|
||||
# msm8905-cam registers /dev/video0 (GC2395/GC2385 rear camera).
|
||||
msm8905-cam
|
||||
# spidev binds to the 2720 Flip external-panel chip select (/dev/spidev0.1).
|
||||
spidev
|
||||
# The opt-in cover-panel DTB needs the gpio mux and spi-mux drivers.
|
||||
mux-core
|
||||
mux-gpio
|
||||
spi-mux
|
||||
@@ -0,0 +1,13 @@
|
||||
#%PAM-1.0
|
||||
# Bananarchy: Alpine ships two sshd binaries. The postmarketOS policy
|
||||
# drop-in (50-postmarketos-ui-policy.conf) sets "UsePAM yes", which makes
|
||||
# /etc/init.d/sshd pick /usr/sbin/sshd.pam + /usr/lib/ssh/sshd-auth.pam.
|
||||
# Without this service file Linux-PAM falls back to a nonexistent
|
||||
# /etc/pam.d/other and pam_start() aborts: password, keyboard-interactive
|
||||
# and even the account check for public-key logins all fail. Keep the stack
|
||||
# minimal so it works with or without elogind running.
|
||||
auth required pam_unix.so
|
||||
account required pam_unix.so
|
||||
password required pam_unix.so
|
||||
session optional pam_env.so
|
||||
session required pam_unix.so
|
||||
@@ -0,0 +1,346 @@
|
||||
# Global OpenRC configuration settings
|
||||
|
||||
# Set to "YES" if you want the rc system to try and start services
|
||||
# in parallel for a slight speed improvement. When running in parallel we
|
||||
# prefix the service output with its name as the output will get
|
||||
# jumbled up.
|
||||
# WARNING: whilst we have improved parallel, it can still potentially lock
|
||||
# the boot process. Don't file bugs about this unless you can supply
|
||||
# patches that fix it without breaking other things!
|
||||
#rc_parallel="NO"
|
||||
|
||||
# Set rc_interactive to "YES" and you'll be able to press the I key during
|
||||
# boot so you can choose to start specific services. Set to "NO" to disable
|
||||
# this feature. This feature is automatically disabled if rc_parallel is
|
||||
# set to YES.
|
||||
#rc_interactive="YES"
|
||||
|
||||
# Set to "NO" if you don't want pam_openrc autostarting user services. This
|
||||
# effectively disables the pam module, without the need of removing it from
|
||||
# the pam configuration files.
|
||||
#rc_autostart_user="YES"
|
||||
|
||||
# If we need to drop to a shell, you can specify it here.
|
||||
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
|
||||
# otherwise /bin/sh
|
||||
# Linux users could specify /sbin/sulogin
|
||||
#rc_shell=/bin/sh
|
||||
|
||||
# Do we allow any started service in the runlevel to satisfy the dependency
|
||||
# or do we want all of them regardless of state? For example, if net.eth0
|
||||
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
|
||||
# both will be started, but services that depend on 'net' will work if either
|
||||
# one comes up. With rc_depend_strict="YES" we would require them both to
|
||||
# come up.
|
||||
#rc_depend_strict="YES"
|
||||
|
||||
# rc_hotplug controls which services we allow to be hotplugged.
|
||||
# A hotplugged service is one started by a dynamic dev manager when a matching
|
||||
# hardware device is found.
|
||||
# Hotplugged services appear in the "hotplugged" runlevel.
|
||||
# If rc_hotplug is set to any value, we compare the name of this service
|
||||
# to every pattern in the value, from left to right, and we allow the
|
||||
# service to be hotplugged if it matches a pattern, or if it matches no
|
||||
# patterns. Patterns can include shell wildcards.
|
||||
# To disable services from being hotplugged, prefix patterns with "!".
|
||||
#If rc_hotplug is not set or is empty, all hotplugging is disabled.
|
||||
# Example - rc_hotplug="net.wlan !net.*"
|
||||
# This allows net.wlan and any service not matching net.* to be hotplugged.
|
||||
# Example - rc_hotplug="!net.*"
|
||||
# This allows services that do not match "net.*" to be hotplugged.
|
||||
|
||||
# rc_logger launches a logging daemon to log the entire rc process to
|
||||
# /var/log/rc.log
|
||||
# NOTE: Linux systems require the devfs service to be started before
|
||||
# logging can take place and as such cannot log the sysinit runlevel.
|
||||
#rc_logger="NO"
|
||||
|
||||
# Through rc_log_path you can specify a custom log file.
|
||||
# The default value is: /var/log/rc.log
|
||||
#rc_log_path="/var/log/rc.log"
|
||||
|
||||
# If you want verbose output for OpenRC, set this to yes. If you want
|
||||
# verbose output for service foo only, set it to yes in /etc/conf.d/foo.
|
||||
#rc_verbose=no
|
||||
|
||||
# By default we filter the environment for our running scripts. To allow other
|
||||
# variables through, add them here. Use a * to allow all variables through.
|
||||
#rc_env_allow="VAR1 VAR2"
|
||||
|
||||
# By default we assume that all daemons will start correctly.
|
||||
# However, some do not - a classic example is that they fork and return 0 AND
|
||||
# then child barfs on a configuration error. Or the daemon has a bug and the
|
||||
# child crashes. You can set the number of milliseconds start-stop-daemon
|
||||
# waits to check that the daemon is still running after starting here.
|
||||
# The default is 0 - no checking.
|
||||
#rc_start_wait=100
|
||||
|
||||
# rc_nostop is a list of services which will not stop when changing runlevels.
|
||||
# This still allows the service itself to be stopped when called directly.
|
||||
#rc_nostop=""
|
||||
|
||||
# rc will attempt to start crashed services by default.
|
||||
# However, it will not stop them by default as that could bring down other
|
||||
# critical services.
|
||||
#rc_crashed_stop=NO
|
||||
#rc_crashed_start=YES
|
||||
|
||||
# Set rc_nocolor to yes if you do not want colors displayed in OpenRC
|
||||
# output.
|
||||
#rc_nocolor=NO
|
||||
|
||||
##############################################################################
|
||||
# MISC CONFIGURATION VARIABLES
|
||||
# There variables are shared between many init scripts
|
||||
|
||||
# Set unicode to NO to turn off unicode support for keyboards and screens.
|
||||
#unicode="YES"
|
||||
|
||||
# This is how long fuser should wait for a remote server to respond. The
|
||||
# default is 60 seconds, but it can be adjusted here.
|
||||
#rc_fuser_timeout=60
|
||||
|
||||
# Below is the default list of network fstypes.
|
||||
#
|
||||
# afs ceph cifs coda davfs fuse fuse.glusterfs fuse.sshfs gfs glusterfs lustre
|
||||
# ncpfs nfs nfs4 ocfs2 shfs smbfs
|
||||
#
|
||||
# If you would like to add to this list, you can do so by adding your
|
||||
# own fstypes to the following variable.
|
||||
#extra_net_fs_list=""
|
||||
|
||||
##############################################################################
|
||||
# SERVICE CONFIGURATION VARIABLES
|
||||
# These variables are documented here, but should be configured in
|
||||
# /etc/conf.d/foo for service foo and NOT enabled here unless you
|
||||
# really want them to work on a global basis.
|
||||
# If your service has characters in its name which are not legal in
|
||||
# shell variable names and you configure the variables for it in this
|
||||
# file, those characters should be replaced with underscores in the
|
||||
# variable names as shown below.
|
||||
|
||||
# Some daemons are started and stopped via start-stop-daemon.
|
||||
# We can set some things on a per service basis, like the nicelevel.
|
||||
# These need to be exported
|
||||
#export SSD_NICELEVEL="0"
|
||||
# Or the ionice level. The format is class[:data] , just like the
|
||||
# --ionice start-stop-daemon parameter.
|
||||
#export SSD_IONICELEVEL="0:0"
|
||||
# Or the OOM score adjustment.
|
||||
#export SSD_OOM_SCORE_ADJ="0"
|
||||
|
||||
# Pass ulimit parameters
|
||||
# If you are using bash in POSIX mode for your shell, note that the
|
||||
# ulimit command uses a block size of 512 bytes for the -c and -f
|
||||
# options
|
||||
#rc_ulimit="-u 30"
|
||||
|
||||
# It's possible to define extra dependencies for services like so
|
||||
#rc_config="/etc/foo"
|
||||
#rc_need="openvpn"
|
||||
#rc_use="net.eth0"
|
||||
#rc_after="clock"
|
||||
#rc_before="local"
|
||||
#rc_provide="!net"
|
||||
|
||||
# You can also enable the above commands here for each service. Below is an
|
||||
# example for service foo.
|
||||
#rc_foo_config="/etc/foo"
|
||||
#rc_foo_need="openvpn"
|
||||
#rc_foo_after="clock"
|
||||
|
||||
# Below is an example for service foo-bar. Note that the '-' is illegal
|
||||
# in a shell variable name, so we convert it to an underscore.
|
||||
# example for service foo-bar.
|
||||
#rc_foo_bar_config="/etc/foo-bar"
|
||||
#rc_foo_bar_need="openvpn"
|
||||
#rc_foo_bar_after="clock"
|
||||
|
||||
# You can also remove dependencies.
|
||||
# This is mainly used for saying which services do NOT provide net.
|
||||
#rc_net_tap0_provide="!net"
|
||||
|
||||
# This is the subsystem type.
|
||||
# It is used to match against keywords set by the keyword call in the
|
||||
# depend function of service scripts.
|
||||
#
|
||||
# It should be set to the value representing the environment this file is
|
||||
# PRESENTLY in, not the virtualization the environment is capable of.
|
||||
# If it is commented out, automatic detection will be used.
|
||||
#
|
||||
# The list below shows all possible settings as well as the host
|
||||
# operating systems where they can be used and autodetected.
|
||||
#
|
||||
# "" - nothing special
|
||||
# "docker" - Docker container manager (Linux)
|
||||
# "podman" - Podman container manager (Linux)
|
||||
# "jail" - Jail (DragonflyBSD or FreeBSD)
|
||||
# "lxc" - Linux Containers
|
||||
# "openvz" - Linux OpenVZ
|
||||
# "prefix" - Prefix
|
||||
# "rkt" - CoreOS container management system (Linux)
|
||||
# "subhurd" - Hurd subhurds (to be checked)
|
||||
# "systemd-nspawn" - Container created by systemd-nspawn (Linux)
|
||||
# "uml" - Usermode Linux
|
||||
# "vserver" - Linux vserver
|
||||
# "xen0" - Xen0 Domain (Linux and NetBSD)
|
||||
# "xenU" - XenU Domain (Linux and NetBSD)
|
||||
#rc_sys=""
|
||||
|
||||
# if you use openrc-init, which is currently only available on Linux,
|
||||
# this is the default runlevel to activate after "sysinit" and "boot"
|
||||
# when booting.
|
||||
#rc_default_runlevel="default"
|
||||
|
||||
# on Linux and Hurd, this is the number of ttys allocated for logins
|
||||
# It is used in the consolefont, keymaps, numlock and termencoding
|
||||
# service scripts.
|
||||
rc_tty_number=12
|
||||
|
||||
##############################################################################
|
||||
# LINUX CGROUPS RESOURCE MANAGEMENT
|
||||
|
||||
# This sets the mode used to mount cgroups.
|
||||
# "hybrid" mounts cgroups version 2 on /sys/fs/cgroup/unified and
|
||||
# cgroups version 1 on /sys/fs/cgroup.
|
||||
# "legacy" mounts cgroups version 1 on /sys/fs/cgroup
|
||||
# "unified" mounts cgroups version 2 on /sys/fs/cgroup
|
||||
#rc_cgroup_mode="unified"
|
||||
|
||||
# This is a list of controllers which should be enabled for cgroups version 2
|
||||
# when hybrid mode is being used.
|
||||
# Controllers listed here will not be available for cgroups version 1.
|
||||
#rc_cgroup_controllers=""
|
||||
|
||||
# This variable contains the cgroups version 2 settings for your services.
|
||||
# If this is set in this file, the settings will apply to all services.
|
||||
# If you want different settings for each service, place the settings in
|
||||
# /etc/conf.d/foo for service foo.
|
||||
# The format is to specify the setting and value followed by a newline.
|
||||
# Multiple settings and values can be specified.
|
||||
# For example, you would use this to set the maximum memory and maximum
|
||||
# number of pids for a service.
|
||||
#rc_cgroup_settings="
|
||||
#memory.max 10485760
|
||||
#pids.max max
|
||||
#"
|
||||
#
|
||||
# For more information about the adjustments that can be made with
|
||||
# cgroups version 2, see Documentation/cgroups-v2.txt in the linux kernel
|
||||
# source tree.
|
||||
#rc_cgroup_settings=""
|
||||
|
||||
# This switch controls whether or not cgroups version 1 controllers are
|
||||
# individually mounted under
|
||||
# /sys/fs/cgroup in hybrid or legacy mode.
|
||||
#rc_controller_cgroups="YES"
|
||||
|
||||
# The following setting turns on the memory.use_hierarchy setting in the
|
||||
# root memory cgroup for cgroups v1.
|
||||
# It must be set to yes in this file if you want this functionality.
|
||||
#rc_cgroup_memory_use_hierarchy="NO"
|
||||
|
||||
# The following settings allow you to set up values for the cgroups version 1
|
||||
# controllers for your services.
|
||||
# They can be set in this file;, however, if you do this, the settings
|
||||
# will apply to all of your services.
|
||||
# If you want different settings for each service, place the settings in
|
||||
# /etc/conf.d/foo for service foo.
|
||||
# The format is to specify the names of the settings followed by their
|
||||
# values. Each variable can hold multiple settings.
|
||||
# For example, you would use this to set the cpu.shares setting in the
|
||||
# cpu controller to 512 for your service.
|
||||
# rc_cgroup_cpu="
|
||||
# cpu.shares 512
|
||||
# "
|
||||
#
|
||||
# For more information about the adjustments that can be made with
|
||||
# cgroups version 1, see Documentation/cgroups-v1/* in the linux kernel
|
||||
# source tree.
|
||||
|
||||
# Set the blkio controller settings for this service.
|
||||
#rc_cgroup_blkio=""
|
||||
|
||||
# Set the cpu controller settings for this service.
|
||||
#rc_cgroup_cpu=""
|
||||
|
||||
# Add this service to the cpuacct controller (any value means yes).
|
||||
#rc_cgroup_cpuacct=""
|
||||
|
||||
# Set the cpuset controller settings for this service.
|
||||
#rc_cgroup_cpuset=""
|
||||
|
||||
# Set the devices controller settings for this service.
|
||||
#rc_cgroup_devices=""
|
||||
|
||||
# Set the hugetlb controller settings for this service.
|
||||
#rc_cgroup_hugetlb=""
|
||||
|
||||
# Set the memory controller settings for this service.
|
||||
#rc_cgroup_memory=""
|
||||
|
||||
# Set the net_cls controller settings for this service.
|
||||
#rc_cgroup_net_cls=""
|
||||
|
||||
# Set the net_prio controller settings for this service.
|
||||
#rc_cgroup_net_prio=""
|
||||
|
||||
# Set the pids controller settings for this service.
|
||||
#rc_cgroup_pids=""
|
||||
|
||||
# Set this to YES if you want all of the processes in a service's cgroup
|
||||
# killed when the service is stopped or restarted.
|
||||
# Be aware that setting this to yes means all of a service's
|
||||
# child processes will be killed. Keep this in mind if you set this to
|
||||
# yes here instead of for the individual services in
|
||||
# /etc/conf.d/<service>.
|
||||
# To perform this cleanup manually for a stopped service, you can
|
||||
# execute cgroup_cleanup with /etc/init.d/<service> cgroup_cleanup or
|
||||
# rc-service <service> cgroup_cleanup.
|
||||
# If the kernel includes support for cgroup2's cgroup.kill, this is used
|
||||
# to reliably teardown the cgroup.
|
||||
# If this fails, the process followed in this cleanup is the following:
|
||||
# 1. send stopsig (sigterm if it isn't set) to all processes left in the
|
||||
# cgroup immediately followed by sigcont.
|
||||
# 2. Send sighup to all processes in the cgroup if rc_send_sighup is
|
||||
# yes.
|
||||
# 3. delay for rc_timeout_stopsec seconds.
|
||||
# 4. send sigkill to all processes in the cgroup unless disabled by
|
||||
# setting rc_send_sigkill to no.
|
||||
# rc_cgroup_cleanup="NO"
|
||||
|
||||
# If this is yes, we will send sighup to the processes in the cgroup
|
||||
# immediately after stopsig and sigcont.
|
||||
#rc_send_sighup="NO"
|
||||
|
||||
# This is the amount of time in seconds that we delay after sending sigcont
|
||||
# and optionally sighup, before we optionally send sigkill to all
|
||||
# processes in the # cgroup.
|
||||
# The default is 90 seconds.
|
||||
#rc_timeout_stopsec="90"
|
||||
|
||||
# If this is set to no, we do not send sigkill to all processes in the
|
||||
# cgroup.
|
||||
#rc_send_sigkill="YES"
|
||||
|
||||
##############################################################################
|
||||
# SUPERVISE DAEMON CONFIGURATION VARIABLES
|
||||
# These variables sets more reasonable defaults for supervise-daemon(8).
|
||||
# They may be overriden on a per service basis.
|
||||
|
||||
# Wait this number of seconds before restarting a daemon after it crashes.
|
||||
respawn_delay=2
|
||||
|
||||
# Sets the maximum number of times a daemon will be respawned during a respawn
|
||||
# period. If a daemon dies more than this number of times during a respawn
|
||||
# period, supervise-daemon(8) will give up trying to respawn it and exit.
|
||||
# 0 means unlimited.
|
||||
respawn_max=5
|
||||
|
||||
# Sets the length in seconds of a respawn period.
|
||||
respawn_period=1800
|
||||
|
||||
# Bananarchy starts independent OpenRC services in parallel. The stock local
|
||||
# service is patched to avoid "after *", which deadlocks with rc_parallel=YES.
|
||||
# X startup is also bounded by etc/conf.d/udev-settle.
|
||||
rc_parallel="YES"
|
||||
@@ -0,0 +1 @@
|
||||
/etc/init.d/bananarchy-cover-display
|
||||
@@ -0,0 +1 @@
|
||||
/etc/init.d/bananarchy-lid
|
||||
@@ -0,0 +1 @@
|
||||
/etc/init.d/bananarchy-sshd-debug
|
||||
@@ -0,0 +1 @@
|
||||
/etc/init.d/bananarchy-volume-keys
|
||||
@@ -124,6 +124,16 @@ fi
|
||||
# long-lived "nmcli device monitor" poller is started at idle. Disable the
|
||||
# superd unit too, in case an older session enabled it.
|
||||
superctl disable sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||
superctl stop sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||
bananarchy_kill_matches() {
|
||||
pattern="$1"
|
||||
for pid in $(ps | awk -v p="$pattern" 'index($0, p) && $0 !~ /awk/ {print $1}'); do
|
||||
[ "$pid" = "$$" ] && continue
|
||||
kill "$pid" >/dev/null 2>&1 || true
|
||||
done
|
||||
}
|
||||
bananarchy_kill_matches "nmcli device monitor"
|
||||
bananarchy_kill_matches "sxmo_networkmonitor.sh"
|
||||
|
||||
# The daemon that display notifications popup messages
|
||||
superctl start sxmo_notificationmonitor
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Bananarchy: the documented "user / 147147" USB SSH login must work.
|
||||
# The stock sshd_config only ships these as commented defaults and the
|
||||
# postmarketOS policy drop-in enables PAM, so state them explicitly.
|
||||
PasswordAuthentication yes
|
||||
KbdInteractiveAuthentication yes
|
||||
@@ -0,0 +1,18 @@
|
||||
# USB-only diagnostic SSH listener. Uses the non-PAM /usr/sbin/sshd (this
|
||||
# file deliberately contains no UsePAM directive, which that binary rejects)
|
||||
# so a broken PAM stack can never lock the developer out of the phone.
|
||||
Port 2222
|
||||
ListenAddress 172.16.42.1:2222
|
||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
PidFile /run/sshd-debug.pid
|
||||
PermitRootLogin yes
|
||||
PasswordAuthentication yes
|
||||
KbdInteractiveAuthentication no
|
||||
PubkeyAuthentication yes
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
PermitEmptyPasswords no
|
||||
UseDNS no
|
||||
AllowTcpForwarding no
|
||||
GatewayPorts no
|
||||
X11Forwarding no
|
||||
Subsystem sftp internal-sftp
|
||||
@@ -0,0 +1,6 @@
|
||||
# Let the user session drive the Nokia 2720 Flip external panel.
|
||||
# The daemon itself runs as root, but xcover and the Sxmo hooks talk to it
|
||||
# over /run/bananarchy/cover.sock (mode 0660, group user).
|
||||
SUBSYSTEM=="graphics", KERNEL=="fb1", GROUP="video", MODE="0660"
|
||||
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="video", MODE="0660"
|
||||
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="video", MODE="0660"
|
||||
@@ -0,0 +1,5 @@
|
||||
# Input event nodes must carry the seat tag so elogind can hand them to the
|
||||
# non-root X server through TakeDevice. Without it Xorg enumerates zero
|
||||
# physical devices and the keypad appears completely dead. udev must be
|
||||
# running in the sysinit runlevel for any rule to take effect.
|
||||
SUBSYSTEM=="input", KERNEL=="event*", TAG+="seat", GROUP="input", MODE="0660"
|
||||
Reference in new issue
Block a user