Finalize verified 2720 Flip release source and untrack image outputs

This commit is contained in:
Luxferre committed 2026-11-09 23:04:13 +02:00
1 parent 2a3078e42c
commit 1c011b360a
121 files changed
+8467 -686

No files matched your search

+34
View File
@@ -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
}
+14
View File
@@ -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
View File
@@ -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
}
+96
View File
@@ -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
}