Compare commits

...

17 Commits
main ... 1.0.37

Author SHA1 Message Date
b4acb6e7b4 final fix? 2025-07-22 12:39:20 +01:00
52423fcc9a updated toml 2025-07-22 12:31:08 +01:00
3f6dfb9017 needed toml 2025-07-22 12:27:58 +01:00
1c1ba35577 cleanup 2025-07-22 11:49:00 +01:00
466668553d potental correct wifi fix 2025-07-22 11:44:26 +01:00
d9d8fb3d5a another fix 2025-07-22 10:29:28 +01:00
249327a8cc final fix? 2025-07-22 09:24:31 +01:00
ca7a2b615f new wifi 2025-07-22 08:42:22 +01:00
c133508f3c try again for wifi 2025-07-22 08:39:09 +01:00
b82615813d wifi fix 2025-07-21 20:37:23 +01:00
2acec6eca9 fix wifi 2025-07-21 18:27:00 +01:00
beab8e7727 fix checksum logic 2025-07-21 17:43:20 +01:00
bf4d633f7b retry new iamge 2025-07-21 17:17:08 +01:00
8f80ff839a checksum fix 2025-07-21 16:38:30 +01:00
47a3da9781 cleanup cache 2025-07-21 16:30:44 +01:00
9c42befea5 move to newer iamge 2025-07-21 16:29:22 +01:00
e17af98cfc readme updates 2025-07-21 16:25:27 +01:00
11 changed files with 59 additions and 98 deletions

View File

@ -0,0 +1 @@
58a3ec57402c86332e67789a6b8f149aeeb4e7bb0a16c9388a66ea6e07012e45 2024-03-15-raspios-bookworm-arm64-lite.img.xz

View File

@ -3,6 +3,7 @@ N-AnotterKiosk (Not-AnotterKiosk)
### I have hacked this about alot from the main branch, mainly Raspberry Pi changes
- Removed x86 support
- Added scheduled screen on/off
- Added scheduled chrome page refresh
- Rpi3 Overclock settings

View File

@ -15,13 +15,16 @@ sudo mkdir -p "${BUILD_DIR}"
# download a modern RaspiOS build
if [ ! -f raspios.img.xz ]
then
wget -O raspios.img.xz "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz"
echo "bf982e56b0374712d93e185780d121e3f5c3d5e33052a95f72f9aed468d58fa7 raspios.img.xz" | sha256sum --check --status
wget -O raspios.img.xz "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz"
wget -O raspios.img.xz.sha256 "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz.sha256"
sed -i 's/2024-03-15-raspios-bookworm-arm64-lite.img.xz/raspios.img.xz/g' raspios.img.xz.sha256
sha256sum --check --status raspios.img.xz.sha256
if [ $? -ne 0 ]
then
echo "downloaded raspios does not match checksum";
return -1;
exit -1;
fi
rm raspios.img.xz.sha256
fi
rm -f raspios.img
@ -43,8 +46,11 @@ sudo mount /dev/loop0p2 "${BUILD_DIR}"
sudo mount /dev/loop0p1 "${BUILD_DIR}/boot"
# Copy the (raspberry pi-specific) skeleton files
sudo rsync -a "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}"
sudo rsync -a "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton"
sudo rsync -rl --exclude ".DS_Store" --exclude "boot" "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}"
sudo rsync -rl --exclude ".DS_Store" "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton"
sudo cp "${SCRIPT_DIR}/raspberry_pi_skeleton/boot/config.txt" "${BUILD_DIR}/boot/config.txt"
sudo cp "${SCRIPT_DIR}/raspberry_pi_skeleton/boot/ssh" "${BUILD_DIR}/boot/ssh"
sudo sed -i '$ s/$/ logo.nologo consoleblank=0 loglevel=0 quiet/' "${BUILD_DIR}/boot/cmdline.txt"
# Make fstab read-only
sed -i 's/vfat defaults/vfat ro,defaults/g' "${BUILD_DIR}/etc/fstab"
@ -59,14 +65,10 @@ sudo mount proc -t proc -o nosuid,noexec,nodev "${BUILD_DIR}/proc/"
sudo mount sys -t sysfs -o nosuid,noexec,nodev,ro "${BUILD_DIR}/sys/"
sudo mount devpts -t devtmpfs -o mode=0755,nosuid "${BUILD_DIR}/dev/"
# Raspbian currently ships only Debian 11. Let's upgrade to 12.
sudo chroot "${BUILD_DIR}" /raspberry_pi_bullseye.sh
# and then actually install everything.
sudo chroot "${BUILD_DIR}" /kiosk_skeleton/build.sh
sudo rm -r "${BUILD_DIR}/kiosk_skeleton"
sudo rm "${BUILD_DIR}/raspberry_pi_bullseye.sh"
cp "${BUILD_DIR}/version-info" version-info

View File

@ -0,0 +1,11 @@
# Raspberry Pi OS "Bookworm" First-Boot Configuration
# This file is ONLY used to get the device onto the network.
# All other kiosk configuration is handled by kioskbrowser.ini.
config_version = 1
[wlan]
ssid = "YOUR_WIFI_SSID"
password = "YOUR_WIFI_PASSWORD"
password_encrypted = false
country = "US"

View File

@ -24,14 +24,6 @@ reboot_time = 04:00
; apikey to be sent with commands to /api.php
key = "MyKey"
[wifi]
; If you need more complex WiFi settings (like WPA2-Enterprise, hidden SSIDs, etc.)
; create a file called wpa_supplicant.conf on this partition.
country=DE
; Leave SSID empty to disable WiFi
ssid="My WiFi"
; Leave PSK empty (or comment) to use an open network
psk="My Passphrase"
[browser]
url="https://kittenlabs.de/"

View File

@ -2,10 +2,10 @@
# This script is being run on the target debian platform
apt update
APT_LISTCHANGES_FRONTEND=none DEBIAN_FRONTEND=noninteractive apt dist-upgrade -y
DEBIAN_FRONTEND=noninteractive apt install -y lightdm openbox nginx php-fpm php-cli chromium autossh unclutter x11-xserver-utils xdotool htop nano openssh-server rsync x11vnc lm-sensors ntpdate scrot wireless-regdb fontconfig
DEBIAN_FRONTEND=noninteractive apt install -y lightdm openbox nginx php-fpm php-cli chromium autossh unclutter x11-xserver-utils xdotool htop nano openssh-server rsync x11vnc lm-sensors ntpdate scrot wireless-regdb fontconfig php-cli
rsync -a --chown=root:root "/kiosk_skeleton/." "/"
chmod +x /usr/bin/kiosk-* /usr/bin/get-ini /usr/bin/refresh-screen /usr/bin/schedule-* /usr/bin/setup-refresh-timer
# Add emoji support
mkdir -p /home/pi/.fonts
@ -54,11 +54,11 @@ echo "tmpfs /home/pi/.ssh/ tmpfs mode=0700,nosuid,nodev,uid=1000,gid=1000 0
echo "tmpfs /root/.ssh/ tmpfs mode=0700,nosuid,nodev,uid=0,gid=0 0 0" >> /etc/fstab
# Create symlinks for configuration files which will later get created at runtime (in /tmp)
rm /etc/hosts
rm /etc/hostname
mkdir -p /etc/wpa_supplicant/
ln -sf /tmp/hosts /etc/hosts
touch "${BUILD_DIR}/etc/hostname"
touch "${BUILD_DIR}/etc/hosts"
ln -sf /tmp/hostname /etc/hostname
ln -sf /tmp/hosts /etc/hosts
ln -sf /tmp/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
systemctl daemon-reload
@ -70,10 +70,11 @@ systemctl disable avahi-daemon || true
systemctl disable bluetooth || true
systemctl enable kiosk-ssh-keys
systemctl enable kiosk-wifi
systemctl enable NetworkManager
systemctl enable NetworkManager
systemctl enable kiosk-set-hostname
systemctl enable kiosk-autossh
systemctl enable kiosk-watchdog
systemctl enable kiosk-set-hostname
systemctl enable ntpdate
systemctl enable lightdm
systemctl enable nginx
@ -92,10 +93,15 @@ apt install -y hyperion
# Run Hyperion as the 'pi' user
mkdir -p /etc/systemd/system/hyperiond.service.d
echo -e "[Service]\nUser=pi\nGroup=pi" > /etc/systemd/system/hyperiond.service.d/override.conf
chown -R pi:pi /var/lib/hyperion || true
mkdir -p /var/lib/hyperion
mkdir -p /etc/hyperion
chown -R pi:pi /var/lib/hyperion
chown -R pi:pi /etc/hyperion
usermod -a -G video pi
# clean up apt cache to reduce image size
apt clean
# generate a version info/build info file
echo -n "Chromium version: " >> /version-info
dpkg --list | grep "ii chromium " >> /version-info

View File

@ -0,0 +1,21 @@
[connection]
id=kiosk
uuid=a2a5c7d8-2e2b-4b2a-9c1d-3e4e5e6a7b8c
type=wifi
autoconnect=true
interface-name=wlan0
[wifi]
mode=infrastructure
ssid=YOUR_WIFI_SSID
[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=YOUR_WIFI_PASSWORD
[ipv4]
method=auto
[ipv6]
method=auto

View File

@ -1,10 +0,0 @@
[Unit]
Description=Generate wpa_supplicant.conf from kioskbrowser.ini
Before=wpa_supplicant.service dhcpcd.service
[Service]
Type=oneshot
ExecStart=/usr/bin/kiosk-wifi
[Install]
WantedBy=multi-user.target

View File

@ -1,22 +0,0 @@
#!/usr/bin/env php
<?php
if ($argc != 4 && $argc != 5)
{
error_log("Usage: get-ini FILE SECTION NAME [DEFAULT]");
error_log("Fetches a single configuration item from an ini file");
exit(1);
}
$config = parse_ini_file($argv[1], true, INI_SCANNER_NORMAL);
if (isset($config[$argv[2]]))
{
if (isset($config[$argv[2]][$argv[3]]))
{
echo $config[$argv[2]][$argv[3]];
exit(0);
}
}
echo $argv[4] ?? "";
exit(1);

View File

@ -1,27 +0,0 @@
#!/bin/bash
if [ -f "/boot/wpa_supplicant.conf" ]; then
ln -s /boot/wpa_supplicant.conf /tmp/wpa_supplicant.conf
exit
fi
WIFI_SSID=$(get-ini /boot/kioskbrowser.ini wifi ssid)
WIFI_PSK=$(get-ini /boot/kioskbrowser.ini wifi psk)
WIFI_COUNTRY=$(get-ini /boot/kioskbrowser.ini wifi country)
if [ -n "${WIFI_SSID}" ]
then
echo "country=${WIFI_COUNTRY}" > /tmp/wpa_supplicant.conf
echo "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev" >> /tmp/wpa_supplicant.conf
echo "update_config=1" >> /tmp/wpa_supplicant.conf
echo "network={" >> /tmp/wpa_supplicant.conf
echo " ssid=\"${WIFI_SSID}\"" >> /tmp/wpa_supplicant.conf
if [ -n "${WIFI_PSK}" ]
then
echo " psk=\"${WIFI_PSK}\"" >> /tmp/wpa_supplicant.conf
else
echo " key_mgmt=NONE" >> /tmp/wpa_supplicant.conf
fi
echo "}" >> /tmp/wpa_supplicant.conf
fi

View File

@ -1,14 +0,0 @@
#!/bin/bash
echo > /etc/apt/sources.list
echo "deb http://deb.debian.org/debian bookworm main contrib non-free" >> /etc/apt/sources.list
echo "deb http://security.debian.org/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list
echo "deb http://deb.debian.org/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list
apt update
APT_LISTCHANGES_FRONTEND=none DEBIAN_FRONTEND=noninteractive apt -o Dpkg::Options::="--force-confold" -f -y dist-upgrade
# This step is a bit risky, as the current kernel in https://github.com/raspberrypi/rpi-firmware might
# be less tested as the currently shipping kernel in the Raspberry Pi images.
apt install -y rpi-update
SKIP_CHECK_PARTITION=1 SKIP_WARNING=1 rpi-update