Browse files

refactor minikrebs profiles

./prepare prepares the openwrt build environment and copies the requested profile files into build environment
  • Loading branch information...
1 parent e4b196a commit ede8d5b88072001500f365eac0e367c3eff5fbbc @makefu makefu committed Jan 4, 2013
View
1 .gitignore
@@ -0,0 +1 @@
+builder/
View
19 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"
View
0 profiles/camkrebs/doc/lazorcam_druck.svg → doc/lazorcam_druck.svg
File renamed without changes.
View
1 oncology/README
@@ -0,0 +1 @@
+# lcd4linux for DigitalPhotoFrame
View
35 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`'
View
4 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.
View
3 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/
View
7 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"
View
9 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'
View
1 profiles/camkrebs/customfiles/etc/rc.local
@@ -0,0 +1 @@
+insmod uvcvideo
View
5 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:::
View
2 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/
View
25 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

0 comments on commit ede8d5b

Please sign in to comment.