summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-01-04 10:00:20 +0700
committermakefu <github@syntax-fehler.de>2013-01-04 10:00:20 +0700
commitcccb26af3cf48fe74e506dd493806701bbdbed5e (patch)
treed6e5e66816c622a19457e97a24adedb31de2bf09
parent2bcf2f215b9b5e1caa3ec7934c7e7b9fb255147d (diff)
refactor minikrebs profiles
./prepare prepares the openwrt build environment and copies the requested profile files into build environment
-rw-r--r--minikrebs/.gitignore1
-rw-r--r--minikrebs/doc/Camkrebs19
-rw-r--r--minikrebs/doc/lazorcam_druck.svg (renamed from minikrebs/profiles/camkrebs/doc/lazorcam_druck.svg)0
-rw-r--r--minikrebs/oncology/README1
-rwxr-xr-xminikrebs/prepare35
-rw-r--r--minikrebs/profiles/README4
-rw-r--r--minikrebs/profiles/camkrebs/custom_make3
-rw-r--r--minikrebs/profiles/camkrebs/customfiles/etc/config/mjpg-streamer7
-rw-r--r--minikrebs/profiles/camkrebs/customfiles/etc/config/network9
-rw-r--r--minikrebs/profiles/camkrebs/customfiles/etc/rc.local1
-rw-r--r--minikrebs/profiles/camkrebs/customfiles/etc/shadow5
-rwxr-xr-xminikrebs/profiles/heckenkrebs/custom_make2
-rwxr-xr-xminikrebs/profiles/init25
13 files changed, 112 insertions, 0 deletions
diff --git a/minikrebs/.gitignore b/minikrebs/.gitignore
new file mode 100644
index 00000000..8d0fa061
--- /dev/null
+++ b/minikrebs/.gitignore
@@ -0,0 +1 @@
+builder/
diff --git a/minikrebs/doc/Camkrebs b/minikrebs/doc/Camkrebs
new file mode 100644
index 00000000..060bf60d
--- /dev/null
+++ b/minikrebs/doc/Camkrebs
@@ -0,0 +1,19 @@
+
+# packages
+kmod-video-uvc
+mjpg-streamer
+
+# mjpg-streamer
+original package not available in snapshot, grab it from old sources
+## opkg.conf
+
+ src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09-beta2/ar71xx/generic/packages/
+
+## running live
+
+ mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480" -o "output_http.so -p 8080 -w /www/webcam"
+
+## running in temp
+
+ opkg install -d ram mjpg_streamer
+ LD_LIBRARY_PATH=/tmp/lib:/tmp/usr/bin /tmp/usr/bin/mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480" -o "output_http.so -p 8080 -w /tmp/www/webcam"
diff --git a/minikrebs/profiles/camkrebs/doc/lazorcam_druck.svg b/minikrebs/doc/lazorcam_druck.svg
index 4f376059..4f376059 100644
--- a/minikrebs/profiles/camkrebs/doc/lazorcam_druck.svg
+++ b/minikrebs/doc/lazorcam_druck.svg
diff --git a/minikrebs/oncology/README b/minikrebs/oncology/README
new file mode 100644
index 00000000..60261618
--- /dev/null
+++ b/minikrebs/oncology/README
@@ -0,0 +1 @@
+# lcd4linux for DigitalPhotoFrame
diff --git a/minikrebs/prepare b/minikrebs/prepare
new file mode 100755
index 00000000..320e4516
--- /dev/null
+++ b/minikrebs/prepare
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -euf
+IMAGEBUILDER_URL="http://downloads.openwrt.org/attitude_adjustment/12.09-beta2/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2"
+
+cd $(dirname $(readlink -f $0))
+if [ x"${1:-}" == x ];then
+ echo "usage: $0 PROFILE"
+ echo
+ echo "Available Profiles:"
+ ls -1 profiles/ | grep -v '^init$' | while read profile; do
+ echo " $profile"
+ done
+ exit 1
+fi
+PROFILE=$1
+if [ ! -e builder/Makefile ]; then
+ wget -O- $IMAGEBUILDER_URL | tar xj -C builder OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486
+ mv OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486 builder
+ echo "Builder successfully downloaded"
+else
+ echo "Builder already installed, skipping download"
+fi
+echo
+echo "copying generic init:"
+cp --remove-destination profiles/init builder/init
+echo " profile/init -> builder/init"
+echo
+echo "copying profile:"
+find profiles/$PROFILE -mindepth 1 -maxdepth 1| while read file; do
+ echo " $file -> builder/$(basename $file)"
+ #rm -rf builder/$file
+ cp -r --remove-destination $file builder/
+done
+echo
+echo 'now run `builder/init`'
diff --git a/minikrebs/profiles/README b/minikrebs/profiles/README
new file mode 100644
index 00000000..fc1e8945
--- /dev/null
+++ b/minikrebs/profiles/README
@@ -0,0 +1,4 @@
+
+Every profile must have a `custom_make` script which builds the image for the
+profile. This script also can contain which customizes the image files before
+building.
diff --git a/minikrebs/profiles/camkrebs/custom_make b/minikrebs/profiles/camkrebs/custom_make
new file mode 100644
index 00000000..752a7bfe
--- /dev/null
+++ b/minikrebs/profiles/camkrebs/custom_make
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make image PROFILE=TLWR703 PACKAGES="tinc ip kmod-ipv6 radvd kmod-fs-ext4 wireless-tools kmod-usb-core kmod-usb2 -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe -dnsmasq kmod-video-uvc mjpg-streamer" FILES=customfiles/
diff --git a/minikrebs/profiles/camkrebs/customfiles/etc/config/mjpg-streamer b/minikrebs/profiles/camkrebs/customfiles/etc/config/mjpg-streamer
new file mode 100644
index 00000000..bb4f81ec
--- /dev/null
+++ b/minikrebs/profiles/camkrebs/customfiles/etc/config/mjpg-streamer
@@ -0,0 +1,7 @@
+config mjpg-streamer core
+ option enabled "1"
+ option device "/dev/video0"
+ option resolution "1280x1024"
+ option fps "5"
+ option www "/www/webcam"
+ option port "80"
diff --git a/minikrebs/profiles/camkrebs/customfiles/etc/config/network b/minikrebs/profiles/camkrebs/customfiles/etc/config/network
new file mode 100644
index 00000000..c459c4e0
--- /dev/null
+++ b/minikrebs/profiles/camkrebs/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/camkrebs/customfiles/etc/rc.local b/minikrebs/profiles/camkrebs/customfiles/etc/rc.local
new file mode 100644
index 00000000..3e91b57c
--- /dev/null
+++ b/minikrebs/profiles/camkrebs/customfiles/etc/rc.local
@@ -0,0 +1 @@
+insmod uvcvideo
diff --git a/minikrebs/profiles/camkrebs/customfiles/etc/shadow b/minikrebs/profiles/camkrebs/customfiles/etc/shadow
new file mode 100644
index 00000000..251abaf5
--- /dev/null
+++ b/minikrebs/profiles/camkrebs/customfiles/etc/shadow
@@ -0,0 +1,5 @@
+root:$1$spkPLKf6$KEM1l1DgouvYjeBfkT2wW1:0: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/heckenkrebs/custom_make b/minikrebs/profiles/heckenkrebs/custom_make
new file mode 100755
index 00000000..4694530b
--- /dev/null
+++ b/minikrebs/profiles/heckenkrebs/custom_make
@@ -0,0 +1,2 @@
+#!/bin/sh
+make image PROFILE=TLWR703 PACKAGES="tinc curl kmod-ipv6 kmod-fs-ext4 radvd ip wireless-tools block-mount kmod-usb-core kmod-usb2 kmod-usb-storage -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe" FILES=customfiles/
diff --git a/minikrebs/profiles/init b/minikrebs/profiles/init
new file mode 100755
index 00000000..b7c1e8e9
--- /dev/null
+++ b/minikrebs/profiles/init
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+cd $(dirname $(readlink -f $0))
+if [ ! -e Makefile ] ;then
+ echo "ImageBuilder not checked out yet"
+ echo "try running ../prepare $$PROFILE"
+ exit 1
+fi
+
+echo
+if [ -e ./custom_make ];then
+ echo "Starting Custom Make"
+ sh ./custom_make
+else
+ echo "No Custom Make Script exists, bailing out!"
+ exit 1
+fi
+
+echo
+cat << EOF
+finished building
+You can use the following images:
+ Factory : $PWD/bin/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin
+ System Upgrade: $PWD/bin/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin
+EOF