diff options
author | Devaev Maxim <[email protected]> | 2018-06-30 05:55:02 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-06-30 06:04:43 +0300 |
commit | c0aee642467655952d701e37f284a7a589d638e2 (patch) | |
tree | 8099740f9a2c28b8354f3d2154fd857aa4d420a3 | |
parent | 0cfb3c5dbc91fa8f4c33114beb36c356965f497f (diff) |
reorganized project structure
-rw-r--r-- | kvmd/PKGBUILD | 3 | ||||
l---------[-rw-r--r--] | kvmd/kvmd.yaml | 64 | ||||
-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 |
8 files changed, 76 insertions, 74 deletions
diff --git a/kvmd/PKGBUILD b/kvmd/PKGBUILD index 612f8fd1..59873b39 100644 --- a/kvmd/PKGBUILD +++ b/kvmd/PKGBUILD @@ -15,7 +15,6 @@ depends=( "python-aiohttp" "python-raspberry-gpio" ) -backup=("etc/kvmd.yaml") makedepends=("python-setuptools" "wget") @@ -37,7 +36,5 @@ build() { package() { cd $srcdir/$pkgname-build python setup.py install --root=$pkgdir - - install -Dm644 kvmd.yaml $pkgdir/etc/kvmd.yaml install -Dm644 kvmd.service "$pkgdir"/usr/lib/systemd/system/kvmd.service } diff --git a/kvmd/kvmd.yaml b/kvmd/kvmd.yaml index 3dcc8d04..19ece673 100644..120000 --- a/kvmd/kvmd.yaml +++ b/kvmd/kvmd.yaml @@ -1,63 +1 @@ -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 +../os/platforms/v1/kvmd.yaml
\ No newline at end of file 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 |