Compare commits

..

8 Commits
1.0.22 ... main

Author SHA1 Message Date
8ac881ffcf Add apt cleanup to reduce image size 2025-07-22 17:27:24 +01:00
b7e48f776e Display git tag on web interface 2025-07-22 17:25:47 +01:00
8e8f51f2d8 no need for x86 2025-07-21 15:11:39 +01:00
751a3fed26 rename to N-AnotterKiosk 2025-07-21 15:04:54 +01:00
8b25aa87db hyperion 2025-07-21 14:12:03 +01:00
e89639703d run hyperion as pi not root 2025-07-21 12:02:06 +01:00
b04d59338d allow rw filesystem 2025-07-19 13:38:38 +01:00
4ba1d6e916 Revert to 1.0.8 and add Hyperion 2025-07-19 09:39:17 +01:00
16 changed files with 54 additions and 188 deletions

View File

@ -34,6 +34,6 @@ jobs:
append_body: true append_body: true
body_path: ./version-info body_path: ./version-info
files: | files: |
./anotterkiosk-* ./n-anotterkiosk-*
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,7 +3,6 @@ N-AnotterKiosk (Not-AnotterKiosk)
### I have hacked this about alot from the main branch, mainly Raspberry Pi changes ### I have hacked this about alot from the main branch, mainly Raspberry Pi changes
- Removed x86 support
- Added scheduled screen on/off - Added scheduled screen on/off
- Added scheduled chrome page refresh - Added scheduled chrome page refresh
- Rpi3 Overclock settings - Rpi3 Overclock settings
@ -18,10 +17,9 @@ This project aims to solve a lot of those (at least for the author), it might al
#### Key features #### Key features
- [Images built via CI](https://github.com/Manawyrm/AnotterKiosk/blob/main/.github/workflows/main.yml) - [Images built via CI](https://github.com/Manawyrm/N-AnotterKiosk/blob/main/.github/workflows/main.yml)
- WiFi connection support - WiFi connection support
- Raspberry Pi (Arm64) compatibility - Raspberry Pi (Arm64) compatibility
- PC (x86) compatibility
- [USB flash drive, USB SSD, etc. compatible](#how-to-use) - [USB flash drive, USB SSD, etc. compatible](#how-to-use)
- aarch64 mode for Raspberry Pis (_significant_ performance improvements over armv7/32bit ARM) - aarch64 mode for Raspberry Pis (_significant_ performance improvements over armv7/32bit ARM)
- Read-only filesystem handling (no more broken SD cards) - Read-only filesystem handling (no more broken SD cards)
@ -33,6 +31,7 @@ This project aims to solve a lot of those (at least for the author), it might al
- VNC support - VNC support
- SSH tunneling support (for remote-access without port-forwarding, etc.) - SSH tunneling support (for remote-access without port-forwarding, etc.)
- Basic API for Rpi Actions - Basic API for Rpi Actions
- Hyperion-NG support for ambilight
#### Planned features: #### Planned features:
@ -48,13 +47,13 @@ This project aims to solve a lot of those (at least for the author), it might al
### How-To Use ### How-To Use
Like any other Raspberry Pi image: download the current .img file from the [Releases](https://github.com/Manawyrm/AnotterKiosk/releases) page and flash it to a storage device of your choice. Like any other Raspberry Pi image: download the current .img file from the [Releases](https://github.com/Manawyrm/N-AnotterKiosk/releases) page and flash it to a storage device of your choice.
SD cards, USB flash drives, USB SSDs, SATA SSDs, NVMe SSDs are all good options. SD cards, USB flash drives, USB SSDs, SATA SSDs, NVMe SSDs are all good options.
You can use a tool like the [Raspberry Pi Imager](https://www.raspberrypi.com/software/), [BalenaEtcher](https://etcher.balena.io/), [Win32DiskImager](https://sourceforge.net/projects/win32diskimager/) or plain "dd" on \*nix-like systems. You can use a tool like the [Raspberry Pi Imager](https://www.raspberrypi.com/software/), [BalenaEtcher](https://etcher.balena.io/), [Win32DiskImager](https://sourceforge.net/projects/win32diskimager/) or plain "dd" on \*nix-like systems.
When using the latter two, make sure to extract the .gz compression first (using a tool like 7zip). When using the latter two, make sure to extract the .gz compression first (using a tool like 7zip).
After flashing, re-plug the storage device and open the FAT32 partition. After flashing, re-plug the storage device and open the FAT32 partition.
Open the [`kioskbrowser.ini`](https://github.com/Manawyrm/AnotterKiosk/blob/main/kiosk_skeleton/boot/kioskbrowser.ini) file in a text editor and change everything to your needs. Open the [`kioskbrowser.ini`](https://github.com/Manawyrm/N-AnotterKiosk/blob/main/kiosk_skeleton/boot/kioskbrowser.ini) file in a text editor and change everything to your needs.
More complex WiFi setups (like WPA2-Enterprise) can be configured by creating a wpa_supplicant.conf. More complex WiFi setups (like WPA2-Enterprise) can be configured by creating a wpa_supplicant.conf.
Adding your own SSH keys can be done by creating a authorized_keys file. Adding your own SSH keys can be done by creating a authorized_keys file.
If you want to use the autossh tunneling features, copy an SSH private key as either "id_rsa" or "id_ed25519". If you want to use the autossh tunneling features, copy an SSH private key as either "id_rsa" or "id_ed25519".
@ -123,6 +122,11 @@ Starts the screen-refresh.service to refresh the screen.
`GET /script.php?action=reboot&key=YOUR_API_KEY` `GET /script.php?action=reboot&key=YOUR_API_KEY`
Reboots the Raspberry Pi. Reboots the Raspberry Pi.
### Hyperion-NG
The kiosk now supports Hyperion-NG for ambilight control.
Manage Hyperion via its web interface, which is available on port 8090.
### Inspiration / Other Kiosk-OSes: ### Inspiration / Other Kiosk-OSes:
- https://github.com/jareware/chilipie-kiosk/ - https://github.com/jareware/chilipie-kiosk/

View File

@ -15,12 +15,12 @@ sudo mkdir -p "${BUILD_DIR}"
# download a modern RaspiOS build # download a modern RaspiOS build
if [ ! -f raspios.img.xz ] if [ ! -f raspios.img.xz ]
then then
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 "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz"
echo "58a3ec57402c86332e67789a6b8f149aeeb4e7bb0a16c9388a66ea6e07012e45 raspios.img.xz" | sha256sum --check --status echo "bf982e56b0374712d93e185780d121e3f5c3d5e33052a95f72f9aed468d58fa7 raspios.img.xz" | sha256sum --check --status
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "downloaded raspios does not match checksum"; echo "downloaded raspios does not match checksum";
exit 1; return -1;
fi fi
fi fi
@ -30,7 +30,7 @@ xz -kd raspios.img.xz
# Repartition image # Repartition image
export LIBGUESTFS_BACKEND_SETTINGS=force_tcg export LIBGUESTFS_BACKEND_SETTINGS=force_tcg
truncate -r raspios.img raspikiosk.img truncate -r raspios.img raspikiosk.img
truncate -s +2G raspikiosk.img truncate -s +3G raspikiosk.img
virt-resize --expand /dev/sda2 raspios.img raspikiosk.img virt-resize --expand /dev/sda2 raspios.img raspikiosk.img
rm -f raspios.img rm -f raspios.img
@ -43,34 +43,40 @@ sudo mount /dev/loop0p2 "${BUILD_DIR}"
sudo mount /dev/loop0p1 "${BUILD_DIR}/boot" sudo mount /dev/loop0p1 "${BUILD_DIR}/boot"
# Copy the (raspberry pi-specific) skeleton files # Copy the (raspberry pi-specific) skeleton files
sudo rsync -a --no-owner --no-group "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}" sudo rsync -a "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}"
sudo rsync -a --no-owner --no-group "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton" sudo rsync -a "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton"
# Make fstab read-only # Make fstab read-only
sed -i 's/vfat defaults/vfat ro,defaults/g' "${BUILD_DIR}/etc/fstab" sed -i 's/vfat defaults/vfat ro,defaults/g' "${BUILD_DIR}/etc/fstab"
sed -i 's/ext4 defaults/ext4 ro,defaults/g' "${BUILD_DIR}/etc/fstab" sed -i 's/ext4 defaults/ext4 ro,defaults/g' "${BUILD_DIR}/etc/fstab"
# Include git repo version info # Include git repo version info
echo -n "AnotterKiosk Raspberry Pi version: " > "${BUILD_DIR}/version-info" echo -n "N-AnotterKiosk Raspberry Pi version: " > "${BUILD_DIR}/version-info"
git describe --abbrev=4 --dirty --always --tags >> "${BUILD_DIR}/version-info" git describe --abbrev=4 --dirty --always --tags >> "${BUILD_DIR}/version-info"
# Mount system partitions (from the build host) # Mount system partitions (from the build host)
sudo mount -t proc proc "${BUILD_DIR}/proc" sudo mount proc -t proc -o nosuid,noexec,nodev "${BUILD_DIR}/proc/"
sudo mount -t sysfs sysfs "${BUILD_DIR}/sys" sudo mount sys -t sysfs -o nosuid,noexec,nodev,ro "${BUILD_DIR}/sys/"
sudo mount -o bind /dev "${BUILD_DIR}/dev" sudo mount devpts -t devtmpfs -o mode=0755,nosuid "${BUILD_DIR}/dev/"
sudo mount -o bind /dev/pts "${BUILD_DIR}/dev/pts"
# Install everything. # 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 chroot "${BUILD_DIR}" /kiosk_skeleton/build.sh
sudo rm -r "${BUILD_DIR}/kiosk_skeleton" sudo rm -r "${BUILD_DIR}/kiosk_skeleton"
sudo rm "${BUILD_DIR}/raspberry_pi_bullseye.sh"
cp "${BUILD_DIR}/version-info" version-info cp "${BUILD_DIR}/version-info" version-info
sudo umount -fl "${BUILD_DIR}/dev/pts" || true sudo umount -fl "${BUILD_DIR}/proc"
sudo umount -fl "${BUILD_DIR}/dev" || true sudo umount -fl "${BUILD_DIR}/sys"
sudo umount -fl "${BUILD_DIR}/proc" || true sudo umount -fl "${BUILD_DIR}/dev"
sudo umount -fl "${BUILD_DIR}/sys" || true
sudo umount "${BUILD_DIR}/proc"
sudo umount "${BUILD_DIR}/sys"
sudo umount "${BUILD_DIR}/dev"
sudo umount "${BUILD_DIR}/boot" sudo umount "${BUILD_DIR}/boot"
sudo umount "${BUILD_DIR}" sudo umount "${BUILD_DIR}"
@ -78,5 +84,5 @@ sudo umount "${BUILD_DIR}"
sudo losetup -D /dev/loop0 sudo losetup -D /dev/loop0
tag=$(git describe --abbrev=4 --dirty --always --tags) tag=$(git describe --abbrev=4 --dirty --always --tags)
mv raspikiosk.img anotterkiosk-${tag}-arm64-raspberrypi.img mv raspikiosk.img n-anotterkiosk-${tag}-arm64-raspberrypi.img
pigz -4 anotterkiosk-${tag}-arm64-raspberrypi.img pigz -4 n-anotterkiosk-${tag}-arm64-raspberrypi.img

View File

@ -1,90 +0,0 @@
#!/bin/bash
# *sigh*, some docker containers don't seem to have sbin in their PATH
export PATH=$PATH:/usr/sbin
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
BUILD_DIR="${SCRIPT_DIR}/work/root/"
# cleanup any previous build attempts
umount -fl "${BUILD_DIR}" || true
rm -rf "${BUILD_DIR}" || true
mkdir -p "${BUILD_DIR}"
rm x86kiosk.img || true
truncate -s 10G x86kiosk.img
PARTLAYOUT=$(cat <<-END
label: gpt
label-id: 3BC7D7CD-4BF8-4E92-AAEB-2ACD5F8D05AA
device: x86kiosk.img
unit: sectors
first-lba: 34
last-lba: 20971486
sector-size: 512
x86kiosk.img1 : start= 2048, size= 2095105, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=9C99F1BB-11A8-4BB5-82C2-555D7A38F85C, name="EFI system partition"
x86kiosk.img2 : start= 2099200, size= 18870272, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=93A9AB2C-BC29-4C6C-B6DD-1B4EDDED9A1E, name="Linux filesystem"
END
)
echo "${PARTLAYOUT}" | sfdisk x86kiosk.img
# Setup loop device for x86 image (with partition scanning)
ld=$(sudo losetup -P --show -f x86kiosk.img)
# Create filesystems
sudo mkfs.ext4 "${ld}p2"
sudo mkfs.fat -F 32 "${ld}p1"
# Mount partitions
sudo mount "${ld}p2" "${BUILD_DIR}"
sudo mkdir "${BUILD_DIR}/boot"
sudo mount "${ld}p1" "${BUILD_DIR}/boot"
# Debootstrap debian
sudo debootstrap --include=linux-image-amd64,grub-efi,sudo --arch amd64 bookworm "${BUILD_DIR}" http://deb.debian.org/debian/
# Copy the skeleton files
sudo rsync -a "${SCRIPT_DIR}/x86_skeleton/." "${BUILD_DIR}"
sudo rsync -a "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton"
# Create fstab
fat_uuid=$(lsblk -no UUID "${ld}p1")
ext_uuid=$(lsblk -no UUID "${ld}p2")
echo "UUID=${fat_uuid} /boot vfat ro,defaults 0 2" | sudo tee "${BUILD_DIR}/etc/fstab"
echo "UUID=${ext_uuid} / ext4 ro,defaults,noatime 0 1" | sudo tee -a "${BUILD_DIR}/etc/fstab"
# Include git repo version info
echo -n "AnotterKiosk x86 version: " > "${BUILD_DIR}/version-info"
git describe --abbrev=4 --dirty --always --tags >> "${BUILD_DIR}/version-info"
# Mount system partitions (from the build host)
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/"
# and then actually install everything.
sudo chroot "${BUILD_DIR}" /setup.sh
sudo chroot "${BUILD_DIR}" /kiosk_skeleton/build.sh
sudo rm -r "${BUILD_DIR}/kiosk_skeleton"
cp "${BUILD_DIR}/version-info" version-info
sudo umount -fl "${BUILD_DIR}/proc"
sudo umount -fl "${BUILD_DIR}/sys"
sudo umount -fl "${BUILD_DIR}/dev"
sudo umount "${BUILD_DIR}/proc"
sudo umount "${BUILD_DIR}/sys"
sudo umount "${BUILD_DIR}/dev"
sudo umount "${BUILD_DIR}/boot"
sudo umount "${BUILD_DIR}"
sudo losetup -D "${ld}"
tag=$(git describe --abbrev=4 --dirty --always --tags)
mv x86kiosk.img anotterkiosk-${tag}-x86.img
pigz -4 anotterkiosk-${tag}-x86.img

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
# This script is being run on the target debian platform # This script is being run on the target debian platform
dpkg --configure -a
apt update apt update
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 curl gpg 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
rsync -a --chown=root:root "/kiosk_skeleton/." "/" rsync -a --chown=root:root "/kiosk_skeleton/." "/"
@ -78,10 +78,10 @@ systemctl enable ntpdate
systemctl enable lightdm systemctl enable lightdm
systemctl enable nginx systemctl enable nginx
systemctl enable ssh systemctl enable ssh
systemctl enable kiosk-schedule-screen.service systemctl enable kiosk-sechedule-screen.service
systemctl enable schedule-reboot.service systemctl enable schedule-reboot.service
systemctl enable setup-refresh-timer.service systemctl enable setup-refresh-timer.service
systemctl enable hyperiond
# Install Hyperion # Install Hyperion
curl -sSL https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg curl -sSL https://apt.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg
@ -89,6 +89,13 @@ echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-
apt update apt update
apt install -y hyperion 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
chown -R pi:pi /etc/hyperion
usermod -a -G video pi
# generate a version info/build info file # generate a version info/build info file
echo -n "Chromium version: " >> /version-info echo -n "Chromium version: " >> /version-info
dpkg --list | grep "ii chromium " >> /version-info dpkg --list | grep "ii chromium " >> /version-info
@ -97,6 +104,6 @@ echo -n "Linux kernel version: " >> /version-info
ls /lib/modules/ | sort -r | head -n 1 >> /version-info ls /lib/modules/ | sort -r | head -n 1 >> /version-info
echo >> /version-info echo >> /version-info
# Clean up to reduce image size # Clean up apt cache and remove unused packages
apt-get clean apt-get clean
rm -rf /var/lib/apt/lists/* apt-get autoremove -y

View File

@ -1,22 +0,0 @@
{
"general": {
"name": "AnotterKiosk"
},
"grabber": {
"type": "framebuffer",
"device": "/dev/fb0",
"pixelformat": "rgb24"
},
"leds": [
{
"type": "ws281x",
"gpio": 18,
"dmanum": 10,
"freq": 800000,
"leds": 256,
"rewriteTime": 1000,
"rgbw": false,
"strip": "GRB"
}
]
}

View File

@ -1 +0,0 @@
update_initramfs=no

View File

@ -1,2 +1,2 @@
AnotterKiosk \n \l N-AnotterKiosk \n \l

View File

@ -1,4 +1,3 @@
Welcome to AnotterKiosk! Welcome to N-AnotterKiosk!
Run "mount -o remount,rw /" to make the root filesystem writeable.
FAT32 / config partition is located in /boot. FAT32 / config partition is located in /boot.

View File

@ -1,4 +1,5 @@
<h1>Kioskbrowser</h1> <h1>Kioskbrowser</h1>
<h2>Version: <?php echo exec('git describe --tags --abbrev=0'); ?></h2>
CPU temperature: <br> CPU temperature: <br>
<?php passthru("sudo vcgencmd measure_temp"); ?> <?php passthru("sudo vcgencmd measure_temp"); ?>

View File

@ -1 +1 @@
console=serial0,115200 console=tty1 root=PARTUUID=544c6228-02 rootfstype=ext4 ro rootwait logo.nologo consoleblank=0 loglevel=0 quiet console=serial0,115200 console=tty1 root=PARTUUID=544c6228-02 rootfstype=ext4 rw rootwait logo.nologo consoleblank=0 loglevel=0 quiet

View File

@ -7,11 +7,11 @@
# uncomment to force a console size. By default it will be display's size minus # uncomment to force a console size. By default it will be display's size minus
# overscan. # overscan.
framebuffer_width=1920 #framebuffer_width=1280
framebuffer_height=1080 #framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output # uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1 #hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA) # uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1 #hdmi_group=1
@ -29,7 +29,6 @@ enable_uart=1
disable_splash=1 disable_splash=1
dtparam=audio=on dtparam=audio=on
gpu_mem=256 gpu_mem=256
#dtparam=spi=on
# Enable DRM VC4 V3D driver # Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d #dtoverlay=vc4-kms-v3d

View File

@ -1,10 +0,0 @@
deb http://deb.debian.org/debian bookworm main
deb-src http://deb.debian.org/debian bookworm main
deb http://deb.debian.org/debian-security/ bookworm-security main
deb-src http://deb.debian.org/debian-security/ bookworm-security main
deb http://deb.debian.org/debian bookworm-updates main
deb-src http://deb.debian.org/debian bookworm-updates main
deb http://deb.debian.org/debian bookworm-backports main

View File

@ -1 +0,0 @@
GRUB_DISTRIBUTOR="AnotterKiosk"

View File

@ -1,26 +0,0 @@
#!/bin/bash
apt update
# make sure we have all updates installed (from the -updates and -security repos)
APT_LISTCHANGES_FRONTEND=none DEBIAN_FRONTEND=noninteractive apt -o Dpkg::Options::="--force-confold" -f -y dist-upgrade
APT_LISTCHANGES_FRONTEND=none DEBIAN_FRONTEND=noninteractive apt install -f -y -t bookworm-backports linux-image-amd64
# to remove old kernel versions
apt --purge autoremove
apt install -y polkitd locales zstd dhcpcd wpasupplicant xserver-xorg-video-nouveau
locale-gen en_US.UTF-8
apt install -y firmware-amd-graphics firmware-iwlwifi firmware-brcm80211 firmware-atheros firmware-misc-nonfree firmware-realtek firmware-ath9k-htc
echo "grub-efi-amd64 grub2/force_efi_extra_removable boolean true" | debconf-set-selections
update-grub
grub-install --target=x86_64-efi --efi-directory=/boot --removable --bootloader-id=AnotterKiosk
useradd -U -m -s /bin/bash -u 1000 -G audio,video,users,input,adm,dialout,plugdev,render pi
systemctl enable dhcpcd
rm /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 2001:4860:4860::8888" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
echo "nameserver 2001:4860:4860::8844" >> /etc/resolv.conf