diff options
Diffstat (limited to 'minikrebs')
60 files changed, 515 insertions, 6 deletions
diff --git a/minikrebs/prepare b/minikrebs/prepare index 320e4516..610c1299 100755 --- a/minikrebs/prepare +++ b/minikrebs/prepare @@ -7,15 +7,15 @@ if [ x"${1:-}" == x ];then echo "usage: $0 PROFILE" echo echo "Available Profiles:" - ls -1 profiles/ | grep -v '^init$' | while read profile; do + ls -1 profiles/ |grep -v '^README' | 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 + wget -O- $IMAGEBUILDER_URL | tar xj OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486 + mv -f OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486 builder echo "Builder successfully downloaded" else echo "Builder already installed, skipping download" @@ -28,8 +28,10 @@ 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/ + rm -rf builder/$(basename $file) + cp -r $file builder/ done + echo +echo $PROFILE > builder/current_profile echo 'now run `builder/init`' diff --git a/minikrebs/profiles/README b/minikrebs/profiles/README.md index fc1e8945..fc1e8945 100644 --- a/minikrebs/profiles/README +++ b/minikrebs/profiles/README.md diff --git a/minikrebs/profiles/camkrebs/custom_make b/minikrebs/profiles/camkrebs_uvc/custom_make index 752a7bfe..752a7bfe 100644..100755 --- a/minikrebs/profiles/camkrebs/custom_make +++ b/minikrebs/profiles/camkrebs_uvc/custom_make diff --git a/minikrebs/profiles/camkrebs_uvc/customfiles/etc/config/mjpg-streamer b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/config/mjpg-streamer new file mode 100644 index 00000000..298b06fe --- /dev/null +++ b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/config/mjpg-streamer @@ -0,0 +1,7 @@ +config mjpg-streamer core + option enabled "1" + option device "/dev/video0" + option resolution "1280x720" + option fps "25" + option www "/www/webcam" + option port "80" diff --git a/minikrebs/profiles/camkrebs/customfiles/etc/config/network b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/config/network index c459c4e0..c459c4e0 100644 --- a/minikrebs/profiles/camkrebs/customfiles/etc/config/network +++ b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/config/network diff --git a/minikrebs/profiles/camkrebs_uvc/customfiles/etc/dropbear/authorized_keys b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/dropbear/authorized_keys new file mode 120000 index 00000000..9c87fc52 --- /dev/null +++ b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/dropbear/authorized_keys @@ -0,0 +1 @@ +/root/.ssh/authorized_keys
\ No newline at end of file diff --git a/minikrebs/profiles/camkrebs_uvc/customfiles/etc/rc.d/S91mjpg-streamer b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/rc.d/S91mjpg-streamer new file mode 120000 index 00000000..11b1e90d --- /dev/null +++ b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/rc.d/S91mjpg-streamer @@ -0,0 +1 @@ +../init.d/mjpg-streamer
\ No newline at end of file diff --git a/minikrebs/profiles/camkrebs/customfiles/etc/rc.local b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/rc.local index 3e91b57c..3e91b57c 100644 --- a/minikrebs/profiles/camkrebs/customfiles/etc/rc.local +++ b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/rc.local diff --git a/minikrebs/profiles/camkrebs/customfiles/etc/shadow b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/shadow index 251abaf5..251abaf5 100644 --- a/minikrebs/profiles/camkrebs/customfiles/etc/shadow +++ b/minikrebs/profiles/camkrebs_uvc/customfiles/etc/shadow diff --git a/minikrebs/profiles/camkrebs_zc3xx/custom_make b/minikrebs/profiles/camkrebs_zc3xx/custom_make new file mode 100755 index 00000000..8f9faf10 --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/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-video-gspca-zc3xx mjpg-streamer -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe -dnsmasq" FILES=customfiles/ diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/mjpg-streamer b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/mjpg-streamer new file mode 100644 index 00000000..7417837e --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/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 "25" + option www "/www/webcam" + option port "80" diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network new file mode 100644 index 00000000..04722166 --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network @@ -0,0 +1,14 @@ + +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/camkrebs_zc3xx/customfiles/etc/config/system b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/system new file mode 100644 index 00000000..5371b6bb --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/system @@ -0,0 +1,11 @@ +config system + option hostname camkrebs + option timezone UTC + +config 'led' 'lan_led' + option 'name' 'LAN' + option 'sysfs' 'tp-link:blue:system' + option 'trigger' 'netdev' + option 'dev' 'eth0' + option 'mode' 'link tx rx' + diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/wireless b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/wireless new file mode 100644 index 00000000..e08a42ed --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/wireless @@ -0,0 +1,19 @@ + +config wifi-device 'radio0' + option type 'mac80211' + option hwmode '11ng' + option path 'platform/ar933x_wmac' + option htmode 'HT20' + list ht_capab 'SHORT-GI-20' + list ht_capab 'SHORT-GI-40' + list ht_capab 'RX-STBC1' + list ht_capab 'DSSS_CCK-40' + option disabled 1 + +config wifi-iface + option device 'radio0' + option network 'wan' + option encryption 'none' + option mode 'sta' + option ssid 'linksys' + diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/dropbear/authorized_keys b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/dropbear/authorized_keys new file mode 120000 index 00000000..9c87fc52 --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/dropbear/authorized_keys @@ -0,0 +1 @@ +/root/.ssh/authorized_keys
\ No newline at end of file diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/rc.local b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/rc.local new file mode 100644 index 00000000..847a029f --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/rc.local @@ -0,0 +1,4 @@ +[ ! -e /etc/hostid ] && /usr/bin/genhostid +[ ! -e /etc/tinc/retiolum ] && /usr/bin/autoinfest & +tincd -n retiolum +exit 0 diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/shadow b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/shadow new file mode 100644 index 00000000..251abaf5 --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/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/camkrebs_zc3xx/customfiles/usr/bin/autoinfest b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/autoinfest new file mode 100755 index 00000000..a30c1a2b --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/autoinfest @@ -0,0 +1,4 @@ +#!/bin/sh +printf "enter your tincname:" +HOSTNAME=$(uci get system.@system[0].hostname)_$(hostid) +wget -O- http://tinc.krebsco.de | HOSTN=$HOSTNAME sh diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/genhostid b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/genhostid new file mode 100755 index 00000000..463e04b7 --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/genhostid @@ -0,0 +1,2 @@ +#!/bin/sh +dd if=/dev/urandom bs=1 count=4> /etc/hostid diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/led b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/led new file mode 100755 index 00000000..e3e998a8 --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/led @@ -0,0 +1,3 @@ +#!/bin/sh +[ x${:-} = x ] && echo "usage: $0 [0|1]" && exit 1 +echo $1 > /sys/class/leds/tp-link\:blue\:system/brightness diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/tinc-update b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/tinc-update new file mode 100755 index 00000000..4ff46b8f --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/usr/bin/tinc-update @@ -0,0 +1,4 @@ +#!/bin/sh +if test -e /etc/tinc/retiolum; then + if ping -c 1 euer.krebsco.de -W 5 &>/dev/null; then (wget -O- http://euer.krebsco.de/retiolum/supernodes.tar.gz | tar xz -C /etc/tinc/retiolum/hosts/);fi +fi diff --git a/minikrebs/profiles/camkrebs_zc3xx/doc/README.md b/minikrebs/profiles/camkrebs_zc3xx/doc/README.md new file mode 100644 index 00000000..3f93bfda --- /dev/null +++ b/minikrebs/profiles/camkrebs_zc3xx/doc/README.md @@ -0,0 +1,4 @@ +# Documentation +Firmware for krebs with Logitech QuickCam Messenger attached. + +The profile is derived from krebs diff --git a/minikrebs/profiles/init b/minikrebs/profiles/init index f20e9b75..eb5fa2af 100755 --- a/minikrebs/profiles/init +++ b/minikrebs/profiles/init @@ -8,6 +8,7 @@ if [ ! -e Makefile ] ;then fi echo +rm -r bin/ || echo "no bindir, skipping removal" if [ -e ./custom_make ];then echo "Starting Custom Make" sh ./custom_make 2>/dev/null | while read line; do @@ -19,9 +20,20 @@ else fi echo -cat << EOF + +if [ -e bin/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin ]; +then + 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 +else + cat << EOF +It seems like the factory image has not been created, it is most +likely that the image would be too big and does not fit into the tiny FLASH. + +Try removing modules from \`custom_make\` and retry building. +EOF +fi diff --git a/minikrebs/profiles/krebs/custom_make b/minikrebs/profiles/krebs/custom_make new file mode 100755 index 00000000..cb70f4e8 --- /dev/null +++ b/minikrebs/profiles/krebs/custom_make @@ -0,0 +1,2 @@ +#!/bin/sh +make image PROFILE=TLWR703 PACKAGES="tinc kmod-ipv6 -dnsmasq -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/krebs/customfiles/etc/config/network b/minikrebs/profiles/krebs/customfiles/etc/config/network new file mode 100644 index 00000000..04722166 --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/config/network @@ -0,0 +1,14 @@ + +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/krebs/customfiles/etc/config/system b/minikrebs/profiles/krebs/customfiles/etc/config/system new file mode 100644 index 00000000..923755f7 --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/config/system @@ -0,0 +1,11 @@ +config system + option hostname krebsplug + option timezone UTC + +config 'led' 'lan_led' + option 'name' 'LAN' + option 'sysfs' 'tp-link:blue:system' + option 'trigger' 'netdev' + option 'dev' 'eth0' + option 'mode' 'link tx rx' + diff --git a/minikrebs/profiles/krebs/customfiles/etc/config/tinc b/minikrebs/profiles/krebs/customfiles/etc/config/tinc new file mode 100644 index 00000000..3a03196c --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/config/tinc @@ -0,0 +1,2 @@ +config tinc-net retiolum + option enabled 1 diff --git a/minikrebs/profiles/krebs/customfiles/etc/config/wireless b/minikrebs/profiles/krebs/customfiles/etc/config/wireless new file mode 100644 index 00000000..e08a42ed --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/config/wireless @@ -0,0 +1,19 @@ + +config wifi-device 'radio0' + option type 'mac80211' + option hwmode '11ng' + option path 'platform/ar933x_wmac' + option htmode 'HT20' + list ht_capab 'SHORT-GI-20' + list ht_capab 'SHORT-GI-40' + list ht_capab 'RX-STBC1' + list ht_capab 'DSSS_CCK-40' + option disabled 1 + +config wifi-iface + option device 'radio0' + option network 'wan' + option encryption 'none' + option mode 'sta' + option ssid 'linksys' + diff --git a/minikrebs/profiles/krebs/customfiles/etc/dropbear/authorized_keys b/minikrebs/profiles/krebs/customfiles/etc/dropbear/authorized_keys new file mode 120000 index 00000000..9c87fc52 --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/dropbear/authorized_keys @@ -0,0 +1 @@ +/root/.ssh/authorized_keys
\ No newline at end of file diff --git a/minikrebs/profiles/krebs/customfiles/etc/rc.d/tinc b/minikrebs/profiles/krebs/customfiles/etc/rc.d/tinc new file mode 120000 index 00000000..f08fe11d --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/rc.d/tinc @@ -0,0 +1 @@ +../init.d/tinc
\ No newline at end of file diff --git a/minikrebs/profiles/krebs/customfiles/etc/rc.local b/minikrebs/profiles/krebs/customfiles/etc/rc.local new file mode 100644 index 00000000..1f907dcb --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/etc/rc.local @@ -0,0 +1,3 @@ +/usr/bin/genhostid +[ ! -e /etc/tinc/retiolum ] && /usr/bin/autoinfest +exit 0 diff --git a/minikrebs/profiles/krebs/customfiles/etc/shadow b/minikrebs/profiles/krebs/customfiles/etc/shadow new file mode 100644 index 00000000..251abaf5 --- /dev/null +++ b/minikrebs/profiles/krebs/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/krebs/customfiles/usr/bin/autoinfest b/minikrebs/profiles/krebs/customfiles/usr/bin/autoinfest new file mode 100755 index 00000000..a30c1a2b --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/usr/bin/autoinfest @@ -0,0 +1,4 @@ +#!/bin/sh +printf "enter your tincname:" +HOSTNAME=$(uci get system.@system[0].hostname)_$(hostid) +wget -O- http://tinc.krebsco.de | HOSTN=$HOSTNAME sh diff --git a/minikrebs/profiles/krebs/customfiles/usr/bin/genhostid b/minikrebs/profiles/krebs/customfiles/usr/bin/genhostid new file mode 100755 index 00000000..463e04b7 --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/usr/bin/genhostid @@ -0,0 +1,2 @@ +#!/bin/sh +dd if=/dev/urandom bs=1 count=4> /etc/hostid diff --git a/minikrebs/profiles/krebs/customfiles/usr/bin/led b/minikrebs/profiles/krebs/customfiles/usr/bin/led new file mode 100755 index 00000000..e3e998a8 --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/usr/bin/led @@ -0,0 +1,3 @@ +#!/bin/sh +[ x${:-} = x ] && echo "usage: $0 [0|1]" && exit 1 +echo $1 > /sys/class/leds/tp-link\:blue\:system/brightness diff --git a/minikrebs/profiles/krebs/customfiles/usr/bin/tinc-update b/minikrebs/profiles/krebs/customfiles/usr/bin/tinc-update new file mode 100755 index 00000000..4ff46b8f --- /dev/null +++ b/minikrebs/profiles/krebs/customfiles/usr/bin/tinc-update @@ -0,0 +1,4 @@ +#!/bin/sh +if test -e /etc/tinc/retiolum; then + if ping -c 1 euer.krebsco.de -W 5 &>/dev/null; then (wget -O- http://euer.krebsco.de/retiolum/supernodes.tar.gz | tar xz -C /etc/tinc/retiolum/hosts/);fi +fi diff --git a/minikrebs/profiles/krebs/doc/README.md b/minikrebs/profiles/krebs/doc/README.md new file mode 100644 index 00000000..0d56524e --- /dev/null +++ b/minikrebs/profiles/krebs/doc/README.md @@ -0,0 +1,8 @@ +# Krebs Profile + +This is the base profile for krebs nodes. Copy it to create cool krebs images. + +# Hard Package dependencies +Make sure to include them in custom\_make + + tinc diff --git a/minikrebs/profiles/rickroller/custom_make b/minikrebs/profiles/rickroller/custom_make new file mode 100755 index 00000000..c22348b1 --- /dev/null +++ b/minikrebs/profiles/rickroller/custom_make @@ -0,0 +1,5 @@ +#!/bin/sh + +#HTTPD="mini-httpd" +HTTPD="uhttpd" +make image PROFILE=TLWR703 PACKAGES="$HTTPD dnsmasq wireless-tools -radvd -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe" FILES=customfiles/ diff --git a/minikrebs/profiles/rickroller/customfiles/etc/config/dhcp b/minikrebs/profiles/rickroller/customfiles/etc/config/dhcp new file mode 100644 index 00000000..b058f08f --- /dev/null +++ b/minikrebs/profiles/rickroller/customfiles/etc/config/dhcp @@ -0,0 +1,25 @@ +config dnsmasq + option domainneeded 1 + option boguspriv 1 + option filterwin2k 0 # enable for dial on demand + option localise_queries 1 + option rebind_protection 1 # disable if upstream must serve RFC191 +8 addresses + option rebind_localhost 1 # enable for RBL checking and similar se +rvices + #list rebind_domain example.lan # whitelist RFC1918 responses for +domains + option local '/lan/' + option domain 'lan' + option expandhosts 1 + option nonegcache 0 + option authoritative 1 + option readethers 1 + option leasefile '/tmp/dhcp.leases' + option resolvfile '/tmp/resolv.conf.auto' + +config dhcp wlan + option interface lan + option start 100 + option limit 150 + option leasetime 12h diff --git a/minikrebs/profiles/rickroller/customfiles/etc/config/firewall b/minikrebs/profiles/rickroller/customfiles/etc/config/firewall new file mode 100644 index 00000000..6e95b5cd --- /dev/null +++ b/minikrebs/profiles/rickroller/customfiles/etc/config/firewall @@ -0,0 +1,110 @@ +config defaults + option syn_flood 1 + option input ACCEPT + option output ACCEPT + option forward REJECT + +config zone |