4 Commits

Author SHA1 Message Date
63cbcf9ca0 Merge pull request 'logging: Add logging command' (#2) from feature/add-log-command into main
Reviewed-on: http://git.home.arpa/arcade/bsp/pulls/2
2026-02-07 17:45:27 -10:00
f58cc7aded logging: Add logging command
Add new command and update startup scripts to use it

Signed-off-by: Nicholas Mello <nick@nmello.dev>
2026-02-07 21:45:06 -06:00
1bd2214dad gpio-keyboard-driver: Update script for errors
Print and exit correctly on error conditions

Signed-off-by: Nicholas Mello <nick@nmello.dev>
2026-02-07 16:14:29 -06:00
342b6c084f Merge pull request 'gpio-keyboard-driver: Add driver' (#1) from feature/add-gpio-driver into main
Reviewed-on: http://git.home.arpa/arcade/bsp/pulls/1
2026-02-06 21:47:32 -10:00
8 changed files with 73 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
menu "Arcade Machine Customizations"
source "$BR2_EXTERNAL_ARCADE_PATH/package/arcade-logger-cmd/Config.in"
source "$BR2_EXTERNAL_ARCADE_PATH/package/gpio-keyboard-driver/Config.in"
endmenu

View File

@@ -1,4 +1,5 @@
# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
/etc d 755 0 0 - - - - -
/etc/init.d d 755 0 0 - - - - -
/etc/init.d/S20driver-setup f 755 0 0 - - - - -
/etc/init.d/S20arcade-logging-setup f 755 0 0 - - - - -
/etc/init.d/S25arcade-driver-setup f 755 0 0 - - - - -

View File

@@ -0,0 +1,24 @@
#!/bin/sh
LOG_DIR="/var/log/arcade/"
start() {
echo "Setting up logging directory: ${LOG_DIR}"
mkdir -p "${LOG_DIR}"
chmod 1777 "${LOG_DIR}"
}
case "$1" in
start)
start
;;
stop)
;;
restart)
start
;;
*)
echo "ERROR: Must be start, stop, or restart"
exit 1
;;
esac

View File

@@ -1,22 +0,0 @@
#!/bin/sh
start() {
modprobe gpio_keyboard_driver
}
stop() {
rmmod gpio_keyboard_driver
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
esac

View File

@@ -0,0 +1,30 @@
#!/bin/sh
start() {
log -n "startup-scripts" "Probing gpio_keyboard_driver"
modprobe gpio_keyboard_driver
log -n "startup-scripts" "Probed gpio_keyboard_driver with exit code $?"
}
stop() {
log -n "startup-scripts" "Removing gpio_keyboard_driver"
rmmod gpio_keyboard_driver
log -n "startup-scripts" "Removed gpio_keyboard_driver with exit code $?"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
log -l error -n "startup-scripts" "Must be start, stop, or restart"
exit 1
;;
esac

View File

@@ -34,3 +34,4 @@ BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_KMOD_XZ=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_GPIO_KEYBOARD_DRIVER=y
BR2_PACKAGE_ARCADE_LOGGER_CMD=y

View File

@@ -0,0 +1,4 @@
config BR2_PACKAGE_ARCADE_LOGGER_CMD
bool "arcade-logger-cmd"
help
CLI app for logging to the command logging library

View File

@@ -0,0 +1,11 @@
################################################################################
#
# arcade-logger-cmd
#
################################################################################
ARCADE_LOGGER_CMD_VERSION = 26698165ce1717f51eaa5175653e29d48e4ba2ba
ARCADE_LOGGER_CMD_SITE = gitea@ssh.git.home.arpa:arcade/log.git
ARCADE_LOGGER_CMD_SITE_METHOD = git
$(eval $(cargo-package))