diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/Makefile | 17 | ||||
-rw-r--r-- | os/platforms/v1/config.txt (renamed from os/kvm/config.txt) | 0 | ||||
-rw-r--r-- | os/platforms/v1/index.html (renamed from os/kvm/index.html) | 0 | ||||
-rw-r--r-- | os/platforms/v1/kvmd.yaml | 63 | ||||
-rw-r--r-- | os/platforms/v1/nginx.conf (renamed from os/kvm/nginx.conf) | 0 | ||||
-rwxr-xr-x | os/platforms/v1/run.sh (renamed from os/kvm/run.sh) | 3 |
6 files changed, 75 insertions, 8 deletions
diff --git a/os/Makefile b/os/Makefile index ffba4d0f..2ea1c0b1 100644 --- a/os/Makefile +++ b/os/Makefile @@ -1,16 +1,19 @@ all: cat Makefile -pi-builder: - git clone https://github.com/mdevaev/pi-builder --depth=1 +v1: + make _pikvm PIKVM=v1 -pi-kvm: pi-builder - rm -rf pi-builder/builder/scripts/kvm - cp -a kvm pi-builder/builder/scripts +_pikvm: pi-builder + rm -rf pi-builder/builder/scripts/pikvm + cp -a platforms/$(PIKVM_PLATFORM) pi-builder/builder/scripts/pikvm cd pi-builder && make _rpi \ PLATFORM=rpi-2 \ - BUILDER=kvm-builder \ - STAGES="base keys watchdog ro kvm" + BUILDER=pikvm-builder \ + STAGES="base keys watchdog ro pikvm" + +pi-builder: + git clone https://github.com/mdevaev/pi-builder --depth=1 format: pi-builder cd pi-builder && make format diff --git a/os/kvm/config.txt b/os/platforms/v1/config.txt index 494deb58..494deb58 100644 --- a/os/kvm/config.txt +++ b/os/platforms/v1/config.txt diff --git a/os/kvm/index.html b/os/platforms/v1/index.html index f08c0c12..f08c0c12 100644 --- a/os/kvm/index.html +++ b/os/platforms/v1/index.html diff --git a/os/platforms/v1/kvmd.yaml b/os/platforms/v1/kvmd.yaml new file mode 100644 index 00000000..3dcc8d04 --- /dev/null +++ b/os/platforms/v1/kvmd.yaml @@ -0,0 +1,63 @@ +kvmd: + server: + host: localhost + port: 8081 + heartbeat: 3.0 + + keyboard: + pinout: + clock: 17 + data: 4 + pulse: 0.0002 + + atx: + leds: + pinout: + power: 16 + hdd: 12 + poll: 0.1 + + switches: + pinout: + power: 26 + reset: 20 + click_delay: 0.1 + long_click_delay: 5.5 + + video: + pinout: + cap: 21 + conv: 25 + sync_delay: 1.0 + + shutdown_delay: 10.0 + + cmd: + - "/usr/bin/mjpg_streamer" + - "-i" + - "input_uvc.so -d /dev/video0 -e 2 -y -n -r 720x576" + - "-o" + - "output_http.so -l localhost -p 8082" + +logging: + version: 1 + disable_existing_loggers: false + + formatters: + console: + (): logging.Formatter + style: "{" + datefmt: "%H:%M:%S" + format: "[{asctime}] {name:20.20} {levelname:>7} --- {message}" + + handlers: + console: + level: DEBUG + class: logging.StreamHandler + stream: ext://sys.stdout + formatter: console + + root: + level: INFO + handlers: + - console diff --git a/os/kvm/nginx.conf b/os/platforms/v1/nginx.conf index a236b085..a236b085 100644 --- a/os/kvm/nginx.conf +++ b/os/platforms/v1/nginx.conf diff --git a/os/kvm/run.sh b/os/platforms/v1/run.sh index 904fd3ef..525d7756 100755 --- a/os/kvm/run.sh +++ b/os/platforms/v1/run.sh @@ -5,13 +5,14 @@ set -x . ../functions.sh -cat config.txt > "$FS/boot/config.txt" +cp config.txt "$FS/boot/config.txt" pkg_install \ kvmd \ mjpg-streamer-pikvm \ nginx cp index.html "$FS/srv/http/" +cp kvmd.yaml "$FS/etc/" cp nginx.conf "$FS/etc/nginx/" rpi systemctl enable kvmd rpi systemctl enable nginx |