From 8c369def5ba0acbb95212e441b8b31a3ab05f3c8 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 1 Feb 2013 00:59:34 +0100 Subject: add instacam_yuv --- minikrebs/profiles/instacam_yuv/custom_make | 3 ++ .../customfiles/etc/config/mjpg-streamer | 7 +++ .../instacam_yuv/customfiles/etc/config/network | 9 ++++ .../customfiles/etc/dropbear/authorized_keys | 1 + .../customfiles/etc/init.d/mjpeg-streamer | 58 ++++++++++++++++++++++ .../profiles/instacam_yuv/customfiles/etc/rc.local | 1 + .../profiles/instacam_yuv/customfiles/etc/shadow | 5 ++ minikrebs/profiles/instacam_yuv/doc/README.md | 5 ++ 8 files changed, 89 insertions(+) create mode 100755 minikrebs/profiles/instacam_yuv/custom_make create mode 100644 minikrebs/profiles/instacam_yuv/customfiles/etc/config/mjpg-streamer create mode 100644 minikrebs/profiles/instacam_yuv/customfiles/etc/config/network create mode 120000 minikrebs/profiles/instacam_yuv/customfiles/etc/dropbear/authorized_keys create mode 100644 minikrebs/profiles/instacam_yuv/customfiles/etc/init.d/mjpeg-streamer create mode 100644 minikrebs/profiles/instacam_yuv/customfiles/etc/rc.local create mode 100644 minikrebs/profiles/instacam_yuv/customfiles/etc/shadow create mode 100644 minikrebs/profiles/instacam_yuv/doc/README.md diff --git a/minikrebs/profiles/instacam_yuv/custom_make b/minikrebs/profiles/instacam_yuv/custom_make new file mode 100755 index 00000000..c1750da4 --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/custom_make @@ -0,0 +1,3 @@ +#!/bin/sh + +make image PROFILE=TLWR703 PACKAGES="ip kmod-fs-ext4 wireless-tools block-mount kmod-usb-core kmod-usb2 kmod-video-uvc mjpg-streamer -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe -dnsmasq -radvd " FILES=customfiles/ diff --git a/minikrebs/profiles/instacam_yuv/customfiles/etc/config/mjpg-streamer b/minikrebs/profiles/instacam_yuv/customfiles/etc/config/mjpg-streamer new file mode 100644 index 00000000..6feb6165 --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/customfiles/etc/config/mjpg-streamer @@ -0,0 +1,7 @@ +config mjpg-streamer core + option enabled "1" + option device "/dev/video0" + option resolution "640x480" + option fps "10" + option www "/www/webcam" + option port "80" diff --git a/minikrebs/profiles/instacam_yuv/customfiles/etc/config/network b/minikrebs/profiles/instacam_yuv/customfiles/etc/config/network new file mode 100644 index 00000000..c459c4e0 --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/customfiles/etc/config/network @@ -0,0 +1,9 @@ +config interface 'loopback' + option ifname 'lo' + option proto 'static' + option ipaddr '127.0.0.1' + option netmask '255.0.0.0' + +config interface 'lan' + option ifname 'eth0' + option proto 'dhcp' diff --git a/minikrebs/profiles/instacam_yuv/customfiles/etc/dropbear/authorized_keys b/minikrebs/profiles/instacam_yuv/customfiles/etc/dropbear/authorized_keys new file mode 120000 index 00000000..9c87fc52 --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/customfiles/etc/dropbear/authorized_keys @@ -0,0 +1 @@ +/root/.ssh/authorized_keys \ No newline at end of file diff --git a/minikrebs/profiles/instacam_yuv/customfiles/etc/init.d/mjpeg-streamer b/minikrebs/profiles/instacam_yuv/customfiles/etc/init.d/mjpeg-streamer new file mode 100644 index 00000000..aef12489 --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/customfiles/etc/init.d/mjpeg-streamer @@ -0,0 +1,58 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009-2012 OpenWrt.org + +START=50 + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +PROG=/usr/bin/mjpg_streamer + +error() { + echo "${initscript}:" "$@" 1>&2 +} + +section_enabled() { + config_get_bool enabled "$1" 'enabled' 0 + [ $enabled -gt 0 ] +} + +start_instance() { + local s="$1" + + section_enabled "$s" || return 1 + + config_get device "$s" 'device' + config_get resolution "$s" 'resolution' + config_get fps "$s" 'fps' + config_get www "$s" 'www' + config_get port "$s" 'port' + + [ -c "$device" ] || { + error "device '$device' does not exist" + return 1 + } + + # run in yuv (legacy) mode, impacts performance but at least something is happening + service_start /usr/bin/mjpg_streamer --input "input_uvc.so \ + --device $device --fps $fps --resolution $resolution -yuv" \ + --output "output_http.so --www $www --port $port" +} + +stop_instance() { + local s="$1" + + section_enabled "$s" || return 1 + + service_stop /usr/bin/mjpg_streamer +} + +start() { + config_load 'mjpg-streamer' + config_foreach start_instance 'mjpg-streamer' +} + +stop() { + config_load 'mjpg-streamer' + config_foreach stop_instance 'mjpg-streamer' +} diff --git a/minikrebs/profiles/instacam_yuv/customfiles/etc/rc.local b/minikrebs/profiles/instacam_yuv/customfiles/etc/rc.local new file mode 100644 index 00000000..3e91b57c --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/customfiles/etc/rc.local @@ -0,0 +1 @@ +insmod uvcvideo diff --git a/minikrebs/profiles/instacam_yuv/customfiles/etc/shadow b/minikrebs/profiles/instacam_yuv/customfiles/etc/shadow new file mode 100644 index 00000000..9cc800dd --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/customfiles/etc/shadow @@ -0,0 +1,5 @@ +root:$1$WFDw.yoc$MuPQ4h/nu3WMpHmte5Yrp/:15719:0:99999:7::: +daemon:*:0:0:99999:7::: +ftp:*:0:0:99999:7::: +network:*:0:0:99999:7::: +nobody:*:0:0:99999:7::: diff --git a/minikrebs/profiles/instacam_yuv/doc/README.md b/minikrebs/profiles/instacam_yuv/doc/README.md new file mode 100644 index 00000000..63b3a5a2 --- /dev/null +++ b/minikrebs/profiles/instacam_yuv/doc/README.md @@ -0,0 +1,5 @@ +# Instacam China + +Support for a cheapo webcam which supports only yuv mode on a low resolution. + +Copy-paste fork of instacam -- cgit v1.2.3 From 12fa3df06555c4ad6973602998a42446fbb52e70 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 7 Feb 2013 20:23:55 +0100 Subject: bare profile which enables usb-extroot --- minikrebs/profiles/usb_ext/custom_make | 3 +++ .../profiles/usb_ext/customfiles/etc/config/fstab | 19 +++++++++++++++++++ .../profiles/usb_ext/customfiles/etc/config/network | 13 +++++++++++++ .../profiles/usb_ext/customfiles/etc/config/system | 8 ++++++++ .../usb_ext/customfiles/etc/dropbear/authorized_keys | 1 + minikrebs/profiles/usb_ext/customfiles/etc/shadow | 5 +++++ 6 files changed, 49 insertions(+) create mode 100755 minikrebs/profiles/usb_ext/custom_make create mode 100644 minikrebs/profiles/usb_ext/customfiles/etc/config/fstab create mode 100644 minikrebs/profiles/usb_ext/customfiles/etc/config/network create mode 100644 minikrebs/profiles/usb_ext/customfiles/etc/config/system create mode 120000 minikrebs/profiles/usb_ext/customfiles/etc/dropbear/authorized_keys create mode 100644 minikrebs/profiles/usb_ext/customfiles/etc/shadow diff --git a/minikrebs/profiles/usb_ext/custom_make b/minikrebs/profiles/usb_ext/custom_make new file mode 100755 index 00000000..5dea0cc7 --- /dev/null +++ b/minikrebs/profiles/usb_ext/custom_make @@ -0,0 +1,3 @@ +#!/bin/sh + +make image PROFILE=TLWR703 PACKAGES="wireless-tools block-mount kmod-usb-core kmod-usb2 kmod-usb-storage kmod-fs-ext4 -radvd -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe" FILES=customfiles/ diff --git a/minikrebs/profiles/usb_ext/customfiles/etc/config/fstab b/minikrebs/profiles/usb_ext/customfiles/etc/config/fstab new file mode 100644 index 00000000..b1e678dc --- /dev/null +++ b/minikrebs/profiles/usb_ext/customfiles/etc/config/fstab @@ -0,0 +1,19 @@ +config global automount + option from_fstab 1 + option anon_mount 1 + +config global autoswap + option from_fstab 1 + option anon_swap 0 + +config mount + option target /overlay + option device /dev/sda1 + option fstype ext4 + option options rw,sync + option enabled 1 + option enabled_fsck 0 + +config swap + option device /dev/sda2 + option enabled 1 diff --git a/minikrebs/profiles/usb_ext/customfiles/etc/config/network b/minikrebs/profiles/usb_ext/customfiles/etc/config/network new file mode 100644 index 00000000..e6a96379 --- /dev/null +++ b/minikrebs/profiles/usb_ext/customfiles/etc/config/network @@ -0,0 +1,13 @@ +config interface 'loopback' + option ifname 'lo' + option proto 'static' + option ipaddr '127.0.0.1' + option netmask '255.0.0.0' + +config interface 'lan' + option ifname 'eth0' + option proto 'dhcp' + +config interface 'wan' + option ifname 'wlan0' + option proto 'dhcp' diff --git a/minikrebs/profiles/usb_ext/customfiles/etc/config/system b/minikrebs/profiles/usb_ext/customfiles/etc/config/system new file mode 100644 index 00000000..3c5a6935 --- /dev/null +++ b/minikrebs/profiles/usb_ext/customfiles/etc/config/system @@ -0,0 +1,8 @@ +config system + option hostname bare + option timezone UTC + +config 'led' 'lan_led' + option 'name' 'blue-led' + option 'sysfs' 'tp-link:blue:system' + option 'trigger' 'default-on' diff --git a/minikrebs/profiles/usb_ext/customfiles/etc/dropbear/authorized_keys b/minikrebs/profiles/usb_ext/customfiles/etc/dropbear/authorized_keys new file mode 120000 index 00000000..9c87fc52 --- /dev/null +++ b/minikrebs/profiles/usb_ext/customfiles/etc/dropbear/authorized_keys @@ -0,0 +1 @@ +/root/.ssh/authorized_keys \ No newline at end of file diff --git a/minikrebs/profiles/usb_ext/customfiles/etc/shadow b/minikrebs/profiles/usb_ext/customfiles/etc/shadow new file mode 100644 index 00000000..9cc800dd --- /dev/null +++ b/minikrebs/profiles/usb_ext/customfiles/etc/shadow @@ -0,0 +1,5 @@ +root:$1$WFDw.yoc$MuPQ4h/nu3WMpHmte5Yrp/:15719:0:99999:7::: +daemon:*:0:0:99999:7::: +ftp:*:0:0:99999:7::: +network:*:0:0:99999:7::: +nobody:*:0:0:99999:7::: -- cgit v1.2.3