Compare commits
15 Commits
df40dc9dfe
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
984e01440b | ||
|
|
0492140604 | ||
|
|
db850fa310 | ||
|
|
77358a6568 | ||
|
|
0d9b9c739d | ||
|
|
613294e345 | ||
|
|
cfba6398e6 | ||
|
|
702ab72ec9 | ||
|
|
3a5eec007b | ||
|
|
6c4238fb29 | ||
|
|
8598c71935 | ||
|
|
534f0465b6 | ||
|
|
6e40857ef0 | ||
|
|
42c7c6b39e | ||
|
|
6266e47b0a |
10
README
10
README
@@ -4,7 +4,7 @@ Photobooth OS
|
||||
make winf_photobooth_defconfig
|
||||
|
||||
- launch vm
|
||||
qemu-system-x86_64 -m 1024 -bios /usr/share/ovmf/OVMF.fd -drive file=output/images/disk.img,format=raw -vga virtio -nic user,hostfwd=tcp:127.0.0.1:2222-:22 -device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,hostbus=1,hostaddr=2
|
||||
qemu-system-x86_64 -m 1024 -bios /usr/share/ovmf/OVMF.fd -drive file=output/images/disk.img,format=raw -accel kvm -cpu host -smp 2,sockets=1,cores=2,threads=1 -vga none -device virtio-vga,xres=1280,yres=1024 -nic user,net=192.168.7.0/24,hostfwd=tcp:127.0.0.1:2222-192.168.7.1:22 -device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,hostbus=1,hostaddr=2
|
||||
|
||||
|
||||
- pure linux path
|
||||
@@ -16,6 +16,14 @@ make savedefconfig
|
||||
- after changing linux defconfig
|
||||
make linux-update-defconfig
|
||||
|
||||
- hostname
|
||||
winf-photobooth.local
|
||||
|
||||
- networking
|
||||
eth0: 192.168.7.1/24, DHCP 192.168.7.100-200
|
||||
plug in device -> gets IP; ssh root@192.168.7.1 / root@winf-photobooth.local
|
||||
qemu vm: ssh -p 2222 root@127.0.0.1
|
||||
|
||||
|
||||
|
||||
Original README:
|
||||
|
||||
39
board/winf-photobooth/genkey.sh
Executable file
39
board/winf-photobooth/genkey.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p "$HOME/.config/winf-photobooth"
|
||||
chmod 700 "$HOME/.config/winf-photobooth"
|
||||
|
||||
|
||||
(
|
||||
set -e
|
||||
if [ -f "$HOME/.config/winf-photobooth/signing-key.pem" ]; then
|
||||
echo "Signing key exists, skipping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
umask 077
|
||||
openssl genpkey \
|
||||
-algorithm RSA \
|
||||
-pkeyopt rsa_keygen_bits:3072 \
|
||||
-aes-256-cbc \
|
||||
-out "$HOME/.config/winf-photobooth/signing-key.pem"
|
||||
)
|
||||
|
||||
(
|
||||
if [ -f "board/winf-photobooth/signing.crt" ]; then
|
||||
echo "Certificate already exists, skipping..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
openssl req -new -x509 -sha256 -days 3650 \
|
||||
-key "$HOME/.config/winf-photobooth/signing-key.pem" \
|
||||
-subj "/CN=WINF Photobooth Secure Boot/" \
|
||||
-out board/winf-photobooth/signing.crt
|
||||
)
|
||||
|
||||
(
|
||||
openssl x509 \
|
||||
-in board/winf-photobooth/signing.crt \
|
||||
-outform DER \
|
||||
-out board/winf-photobooth/signing.cer
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
set default="0"
|
||||
set timeout="5"
|
||||
set timeout="0"
|
||||
|
||||
menuentry "WINF-Photobooth" {
|
||||
linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1
|
||||
linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1 net.ifnames=0
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_UHCI_HCD=y
|
||||
CONFIG_USB_PRINTER=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
|
||||
21
board/winf-photobooth/overlay/etc/dnsmasq.conf
Normal file
21
board/winf-photobooth/overlay/etc/dnsmasq.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
# DHCP server for devices plugged into the photobooth's ethernet port.
|
||||
# The photobooth is a standalone network host, not a client: no upstream
|
||||
# DNS, no forwarding.
|
||||
|
||||
interface=eth0
|
||||
except-interface=lo
|
||||
bind-interfaces
|
||||
|
||||
# No upstream resolvers (no client mode anymore)
|
||||
no-resolv
|
||||
local=/local/
|
||||
|
||||
# Serve the booth's own name over DNS as well (avahi does mDNS)
|
||||
address=/winf-photobooth.local/192.168.7.1
|
||||
address=/winf-photobooth/192.168.7.1
|
||||
|
||||
# Hand out 192.168.7.100-200 to plugged-in devices, 12h leases
|
||||
dhcp-range=192.168.7.100,192.168.7.200,255.255.255.0,12h
|
||||
dhcp-authoritative
|
||||
dhcp-option=option:router,192.168.7.1
|
||||
dhcp-option=option:dns-server,192.168.7.1
|
||||
@@ -2,13 +2,32 @@
|
||||
|
||||
export SLINT_BACKEND=linuxkms-software
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
mode=$(
|
||||
SLINT_DRM_MODE=list /usr/bin/winf-photobooth-app 2>&1 |
|
||||
awk '$1 == "Index:" && $4 == 1280 && $6 == 1024 {
|
||||
print $2
|
||||
exit
|
||||
}'
|
||||
)
|
||||
|
||||
if [ -z "$mode" ]; then
|
||||
echo "No 1280x1024 display mode available" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SLINT_DRM_MODE="$mode"
|
||||
start-stop-daemon -S -b -m \
|
||||
-p /run/winf-photobooth-app.pid \
|
||||
-x /usr/bin/winf-photobooth-app \
|
||||
>> /var/log/winf-photobooth-app.log 2>&1
|
||||
-O /var/log/winf-photobooth-app.log
|
||||
;;
|
||||
|
||||
stop)
|
||||
start-stop-daemon -K -p /run/winf-photobooth-app.pid
|
||||
;;
|
||||
|
||||
12
board/winf-photobooth/overlay/etc/network/interfaces
Normal file
12
board/winf-photobooth/overlay/etc/network/interfaces
Normal file
@@ -0,0 +1,12 @@
|
||||
# The photobooth is NOT a network client. It runs a DHCP server on its
|
||||
# ethernet port: plug a device into eth0 and it gets an address from
|
||||
# 192.168.7.0/24 (see /etc/dnsmasq.conf). The photobooth itself is
|
||||
# 192.168.7.1.
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.7.1
|
||||
netmask 255.255.255.0
|
||||
46
board/winf-photobooth/post-image.sh
Executable file
46
board/winf-photobooth/post-image.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ ! -z "$WINF_SKIP_SIGN" ]; then
|
||||
echo "WINF_SKIP_SIGN is set, skipping signing..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# Sign the bootx64.efi
|
||||
binary="$BINARIES_DIR/efi-part/EFI/BOOT/bootx64.efi"
|
||||
cert=$(realpath "board/winf-photobooth/signing.crt")
|
||||
key="$HOME/.config/winf-photobooth/signing-key.pem"
|
||||
|
||||
if [ ! -f "$binary" ]; then
|
||||
echo "ERROR: EFI binary $binary not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$cert" ]; then
|
||||
echo "ERROR: Certificate $cert does not exist"
|
||||
echo " run ./board/winf-photobooth/genkey.sh"
|
||||
echo " or set WINF_SKIP_SIGN"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$key" ]; then
|
||||
echo "ERROR: Signing key $key does not exist"
|
||||
echo " set WINF_SKIP_SIGN to skip signing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if sbverify --cert "$cert" "$binary" >/dev/null 2>&1; then
|
||||
echo "Already signed, bye!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# Create signed file, remove at exit
|
||||
signed=$(mktemp "${binary}.signed.XXXXXX")
|
||||
trap 'rm -f "$signed"' EXIT
|
||||
|
||||
sbsign --key "$key" --cert "$cert" --output "$signed" "$binary"
|
||||
sbverify --cert "$cert" "$signed"
|
||||
|
||||
mv "$signed" "$binary"
|
||||
BIN
board/winf-photobooth/signing.cer
Normal file
BIN
board/winf-photobooth/signing.cer
Normal file
Binary file not shown.
25
board/winf-photobooth/signing.crt
Normal file
25
board/winf-photobooth/signing.crt
Normal file
@@ -0,0 +1,25 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIELTCCApWgAwIBAgIUKzybBakJXymsyS6T07l8aX7DpnAwDQYJKoZIhvcNAQEL
|
||||
BQAwJjEkMCIGA1UEAwwbV0lORiBQaG90b2Jvb3RoIFNlY3VyZSBCb290MB4XDTI2
|
||||
MTExMTE4MTI1OFoXDTM2MTEwODE4MTI1OFowJjEkMCIGA1UEAwwbV0lORiBQaG90
|
||||
b2Jvb3RoIFNlY3VyZSBCb290MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKC
|
||||
AYEAmlYpsJt/itqE248WSY+W+VgNXcjYEYK1bkhRI3vLdyQKilUa/48cLIbVzQ+S
|
||||
2nPX1jun4PMdgLlclxtECrkpRFaMIwiUBvNFEDkDTkidkw0c5Eb0nacwpnVZFA+9
|
||||
bvyfgnhgZOyaX9fuJJ2afRmWV8qjc1nSAK9CEmNSq+FxzGmnHO2FhVdIJ2LM+Gh7
|
||||
2/JLQt7dg+CQtSPd/nFHrkZa0nn2ddM5KH28VflpiZMP/5iCfCPZpxBw9htUECNc
|
||||
gYehhYgTVeDJcz3xja0rUCsSwFeUBytExI829HkLdD48VMsqIthgsErlQD3Ofy9O
|
||||
jDRY+bwFhXruOmFWXgeAxbCNUUgsMrrsFlgIBbPChmoWzR0Dl9W8330SlF8dOdN3
|
||||
kgTQQVQY4qbnRysfOWOzqeTWpWDG7Xp8PxxmzTL9kdgChteRpjYyzMDVo1ulK9Gt
|
||||
f6T44yEiCD5AJZVYyTWcBMaW1JX+oN+NmTrhtNMxN+v/AqkfTs2ZmI/pUyC2BCy7
|
||||
LpXVAgMBAAGjUzBRMB0GA1UdDgQWBBQhOA5fyPyxFKF4M+E5kB3c6ASjPDAfBgNV
|
||||
HSMEGDAWgBQhOA5fyPyxFKF4M+E5kB3c6ASjPDAPBgNVHRMBAf8EBTADAQH/MA0G
|
||||
CSqGSIb3DQEBCwUAA4IBgQBRSFyZoJMua5QfpBwo2tW2kfC4GpdFcRnIOW4T6//v
|
||||
lr0hajEg/CigOKubvfw3ssa6eqapyBYzV5BXMTpDBhQfrhUhTe/K7q6JwheGr38X
|
||||
c3lq1/AYmbvzk9+4eV2c8+YVm879nkAEwSxRNCNUMxSxbJUO0Fte94zEdCLjdUP4
|
||||
wUEU+1yc51fkca8jMOLiLrOPNSXlb4SenbEE/xVyOtM7epG4XIl3eZZEeHxRqdEK
|
||||
o6s3hRXHhnU+KU9jF45wreFeVGUXbOREp4jkk5uB+oQSBvayRsUT8UB/mzvfxAM+
|
||||
HGxYPm70FHM+quTJ9h0M4ui55ulN7BB/TiAtE1rdIM3wIU9fChG4+k+Gwz31hW0y
|
||||
AWmbLmGIR9zXoI1bxD1khv+bRqZKNmgIUlQ0wFwDLJRzwarseQQ60jBMCz/IW9R1
|
||||
UdZUMbo59/u+jueT6a+0Wg1WkSseei4iZZXscXSgMbHacFOZaTEEYfIhF2DsbH12
|
||||
W0u2Hs4c5uR2+Ps9ZuoK4E4=
|
||||
-----END CERTIFICATE-----
|
||||
@@ -7,6 +7,7 @@ BR2_TARGET_GENERIC_HOSTNAME="winf-photobooth"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to WINF-Photobooth"
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
BR2_TARGET_GENERIC_ROOT_PASSWD="winf"
|
||||
BR2_SYSTEM_DHCP=""
|
||||
BR2_ROOTFS_OVERLAY="board/winf-photobooth/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/winf-photobooth/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pc/post-image-efi.sh"
|
||||
@@ -28,6 +29,7 @@ BR2_PACKAGE_DEJAVU=y
|
||||
BR2_PACKAGE_MESA3D=y
|
||||
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
|
||||
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
|
||||
BR2_PACKAGE_XKEYBOARD_CONFIG=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
|
||||
@@ -50,12 +52,13 @@ BR2_PACKAGE_ACPID=y
|
||||
BR2_PACKAGE_OPENCV4=y
|
||||
BR2_PACKAGE_OPENCV4_LIB_VIDEO=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_JPEG=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_PNG=y
|
||||
BR2_PACKAGE_OPENCV4_WITH_V4L=y
|
||||
BR2_PACKAGE_LIBV4L=y
|
||||
BR2_PACKAGE_LIBV4L_UTILS=y
|
||||
BR2_PACKAGE_CONNMAN=y
|
||||
BR2_PACKAGE_CONNMAN_WIFI=y
|
||||
BR2_PACKAGE_CONNMAN_CLIENT=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_DNSMASQ=y
|
||||
BR2_PACKAGE_OPENSSH=y
|
||||
BR2_PACKAGE_WIRELESS_REGDB=y
|
||||
BR2_PACKAGE_NANO=y
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
WINF_PHOTOBOOTH_VERSION = a99bd2e69c67cd63496818d1fc2aa15f2f750033
|
||||
WINF_PHOTOBOOTH_VERSION = 0383b4e8cc1085ccaf5556b6c65d24446c1fcde6
|
||||
WINF_PHOTOBOOTH_SITE = https://git.xn--k-0fa.se/mikee/winf-photobooth-app
|
||||
WINF_PHOTOBOOTH_SITE_METHOD = git
|
||||
WINF_PHOTOBOOTH_LICENSE = MIT
|
||||
|
||||
Reference in New Issue
Block a user