From 27b76ab0671089c47506615a796a261e993896a7 Mon Sep 17 00:00:00 2001 From: James <> Date: Sun, 17 Mar 2013 12:16:37 +0000 Subject: fish --- package/admswconfig/.svn/entries | 68 +++++++++++++++ .../admswconfig/.svn/text-base/Makefile.svn-base | 52 ++++++++++++ package/admswconfig/Makefile | 52 ++++++++++++ package/admswconfig/files/.svn/entries | 96 ++++++++++++++++++++++ .../files/.svn/text-base/admswconfig.svn-base | 68 +++++++++++++++ .../files/.svn/text-base/admswswitch.sh.svn-base | 28 +++++++ package/admswconfig/files/admswconfig | 68 +++++++++++++++ package/admswconfig/files/admswswitch.sh | 28 +++++++ package/admswconfig/patches/.svn/entries | 62 ++++++++++++++ .../.svn/text-base/001-matrix.patch.svn-base | 15 ++++ package/admswconfig/patches/001-matrix.patch | 15 ++++ 11 files changed, 552 insertions(+) create mode 100644 package/admswconfig/.svn/entries create mode 100644 package/admswconfig/.svn/text-base/Makefile.svn-base create mode 100644 package/admswconfig/Makefile create mode 100644 package/admswconfig/files/.svn/entries create mode 100644 package/admswconfig/files/.svn/text-base/admswconfig.svn-base create mode 100644 package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base create mode 100644 package/admswconfig/files/admswconfig create mode 100644 package/admswconfig/files/admswswitch.sh create mode 100644 package/admswconfig/patches/.svn/entries create mode 100644 package/admswconfig/patches/.svn/text-base/001-matrix.patch.svn-base create mode 100644 package/admswconfig/patches/001-matrix.patch (limited to 'package/admswconfig') diff --git a/package/admswconfig/.svn/entries b/package/admswconfig/.svn/entries new file mode 100644 index 0000000..ec67a60 --- /dev/null +++ b/package/admswconfig/.svn/entries @@ -0,0 +1,68 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/admswconfig +svn://svn.openwrt.org/openwrt + + + +2012-10-10T13:21:54.109631Z +33703 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +patches +dir + +Makefile +file + + + + +2013-03-17T12:13:10.000000Z +8b0f3f51c8f9149cbb208343369928d9 +2012-10-10T13:21:54.109631Z +33703 +florian + + + + + + + + + + + + + + + + + + + + + +1506 + diff --git a/package/admswconfig/.svn/text-base/Makefile.svn-base b/package/admswconfig/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..e16258f --- /dev/null +++ b/package/admswconfig/.svn/text-base/Makefile.svn-base @@ -0,0 +1,52 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=admswconfig +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_MD5SUM:=faafd4618f970119a665b11b21ac6a26 + +include $(INCLUDE_DIR)/package.mk + +define Package/admswconfig + SECTION:=utils + CATEGORY:=Utilities + TITLE:=ADM5120 Switch configuration tool + DEPENDS:=@TARGET_adm5120 + URL:=http://sharon.esrac.ele.tue.nl/users/pe1rxq/linux-adm/admswconfig/ + MAINTAINER:=Florian Fainelli +endef + +define Package/admswconfig/description + A program to configure the internal ethernet switch of an ADM5120 processor. + You need the corresponding driver for the switch in the kernel. + With this program you can configure which ports of the switch belong + to the different ethernet devices. +endef + +define Build/Configure +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -Os $(PKG_BUILD_DIR)/admswconfig.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/admswconfig/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/admswconfig $(1)/sbin/ + $(INSTALL_DIR) $(1)/lib/network/ + $(INSTALL_DATA) ./files/admswswitch.sh $(1)/lib/network/admswswitch.sh + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/admswconfig $(1)/etc/init.d/admswconfig +endef + +$(eval $(call BuildPackage,admswconfig)) diff --git a/package/admswconfig/Makefile b/package/admswconfig/Makefile new file mode 100644 index 0000000..e16258f --- /dev/null +++ b/package/admswconfig/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=admswconfig +PKG_VERSION:=0.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_MD5SUM:=faafd4618f970119a665b11b21ac6a26 + +include $(INCLUDE_DIR)/package.mk + +define Package/admswconfig + SECTION:=utils + CATEGORY:=Utilities + TITLE:=ADM5120 Switch configuration tool + DEPENDS:=@TARGET_adm5120 + URL:=http://sharon.esrac.ele.tue.nl/users/pe1rxq/linux-adm/admswconfig/ + MAINTAINER:=Florian Fainelli +endef + +define Package/admswconfig/description + A program to configure the internal ethernet switch of an ADM5120 processor. + You need the corresponding driver for the switch in the kernel. + With this program you can configure which ports of the switch belong + to the different ethernet devices. +endef + +define Build/Configure +endef + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) -Os $(PKG_BUILD_DIR)/admswconfig.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) +endef + +define Package/admswconfig/install + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/admswconfig $(1)/sbin/ + $(INSTALL_DIR) $(1)/lib/network/ + $(INSTALL_DATA) ./files/admswswitch.sh $(1)/lib/network/admswswitch.sh + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/admswconfig $(1)/etc/init.d/admswconfig +endef + +$(eval $(call BuildPackage,admswconfig)) diff --git a/package/admswconfig/files/.svn/entries b/package/admswconfig/files/.svn/entries new file mode 100644 index 0000000..3b8fe7d --- /dev/null +++ b/package/admswconfig/files/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/admswconfig/files +svn://svn.openwrt.org/openwrt + + + +2011-01-27T21:49:50.030327Z +25173 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +admswconfig +file + + + + +2013-03-17T12:13:10.000000Z +8d17c96209c6c9f3e9334e393040d629 +2008-03-20T20:11:21.745522Z +10635 +thepeople + + + + + + + + + + + + + + + + + + + + + +1460 + +admswswitch.sh +file + + + + +2013-03-17T12:13:10.000000Z +c9dc70f83d4bd6e997a5828bad6d4578 +2011-01-27T21:49:50.030327Z +25173 +florian + + + + + + + + + + + + + + + + + + + + + +456 + diff --git a/package/admswconfig/files/.svn/text-base/admswconfig.svn-base b/package/admswconfig/files/.svn/text-base/admswconfig.svn-base new file mode 100644 index 0000000..7231030 --- /dev/null +++ b/package/admswconfig/files/.svn/text-base/admswconfig.svn-base @@ -0,0 +1,68 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=05 + +start() { + [ -e /etc/config/network ] && exit 0 + + mkdir -p /etc/config + + board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo) + + case "$board_name" in + "Compex WP54"*) + board="Compex WP54";; + esac + + echo "$board" |awk ' + function p(cfgname, name) { + if (c[name] != "") print " option " cfgname " \"" c[name] "\"" + } + + BEGIN { + FS="=" + c["lan_ifname"]="eth0" + c["wan_ifname"]="eth1" + c["eth0ports"]="1 2 3 4" + c["eth1ports"]="0" + } + END { + board=$1 + if (board == "Compex WP54") { + c["eth0ports"]="0" + c["eth1ports"]="1" + } + + print "#### VLAN configuration " + print "config switch" + p("eth0", "eth0ports") + p("eth1", "eth1ports") + print "" + print "" + print "#### Loopback configuration" + print "config interface loopback" + print " option ifname \"lo\"" + print " option proto static" + print " option ipaddr 127.0.0.1" + print " option netmask 255.0.0.0" + print "" + print "" + print "#### LAN configuration" + print "config interface lan" + print " option type bridge" + p("ifname", "lan_ifname") + p("macaddr", "lan_macaddr") + print " option proto static" + print " option ipaddr 192.168.1.1" + print " option netmask 255.255.255.0" + print "" + print "" + print "#### WAN configuration" + print "config interface wan" + p("ifname", "wan_ifname") + p("macaddr", "wan_macaddr") + print " option proto dhcp" + }' > /etc/config/network +} + diff --git a/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base b/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base new file mode 100644 index 0000000..984d7ee --- /dev/null +++ b/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +setup_switch_vlan() { + config_get ports "$CONFIG_SECTION" "eth$1" + ports=`echo "$ports"| sed s/" "/""/g` + ifconfig eth$1 down + admswconfig eth$1 ${ports}c + ifconfig eth$1 up +} + +setup_switch() { + config_cb() { + case "$1" in + switch) + option_cb() { + case "$1" in + eth*) setup_switch_vlan "${1##eth}";; + esac + } + ;; + *) + option_cb() { return 0; } + ;; + esac + } + config_load network +} diff --git a/package/admswconfig/files/admswconfig b/package/admswconfig/files/admswconfig new file mode 100644 index 0000000..7231030 --- /dev/null +++ b/package/admswconfig/files/admswconfig @@ -0,0 +1,68 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=05 + +start() { + [ -e /etc/config/network ] && exit 0 + + mkdir -p /etc/config + + board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo) + + case "$board_name" in + "Compex WP54"*) + board="Compex WP54";; + esac + + echo "$board" |awk ' + function p(cfgname, name) { + if (c[name] != "") print " option " cfgname " \"" c[name] "\"" + } + + BEGIN { + FS="=" + c["lan_ifname"]="eth0" + c["wan_ifname"]="eth1" + c["eth0ports"]="1 2 3 4" + c["eth1ports"]="0" + } + END { + board=$1 + if (board == "Compex WP54") { + c["eth0ports"]="0" + c["eth1ports"]="1" + } + + print "#### VLAN configuration " + print "config switch" + p("eth0", "eth0ports") + p("eth1", "eth1ports") + print "" + print "" + print "#### Loopback configuration" + print "config interface loopback" + print " option ifname \"lo\"" + print " option proto static" + print " option ipaddr 127.0.0.1" + print " option netmask 255.0.0.0" + print "" + print "" + print "#### LAN configuration" + print "config interface lan" + print " option type bridge" + p("ifname", "lan_ifname") + p("macaddr", "lan_macaddr") + print " option proto static" + print " option ipaddr 192.168.1.1" + print " option netmask 255.255.255.0" + print "" + print "" + print "#### WAN configuration" + print "config interface wan" + p("ifname", "wan_ifname") + p("macaddr", "wan_macaddr") + print " option proto dhcp" + }' > /etc/config/network +} + diff --git a/package/admswconfig/files/admswswitch.sh b/package/admswconfig/files/admswswitch.sh new file mode 100644 index 0000000..984d7ee --- /dev/null +++ b/package/admswconfig/files/admswswitch.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +setup_switch_vlan() { + config_get ports "$CONFIG_SECTION" "eth$1" + ports=`echo "$ports"| sed s/" "/""/g` + ifconfig eth$1 down + admswconfig eth$1 ${ports}c + ifconfig eth$1 up +} + +setup_switch() { + config_cb() { + case "$1" in + switch) + option_cb() { + case "$1" in + eth*) setup_switch_vlan "${1##eth}";; + esac + } + ;; + *) + option_cb() { return 0; } + ;; + esac + } + config_load network +} diff --git a/package/admswconfig/patches/.svn/entries b/package/admswconfig/patches/.svn/entries new file mode 100644 index 0000000..b8b9a4a --- /dev/null +++ b/package/admswconfig/patches/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/admswconfig/patches +svn://svn.openwrt.org/openwrt + + + +2010-03-26T14:27:16.438756Z +20450 +juhosg + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +001-matrix.patch +file + + + + +2013-03-17T12:13:10.000000Z +728023700fc2530fe88998cc89f71bae +2010-03-26T14:27:16.438756Z +20450 +juhosg + + + + + + + + + + + + + + + + + + + + + +396 + diff --git a/package/admswconfig/patches/.svn/text-base/001-matrix.patch.svn-base b/package/admswconfig/patches/.svn/text-base/001-matrix.patch.svn-base new file mode 100644 index 0000000..e50d515 --- /dev/null +++ b/package/admswconfig/patches/.svn/text-base/001-matrix.patch.svn-base @@ -0,0 +1,15 @@ +--- a/admswconfig.c ++++ b/admswconfig.c +@@ -111,9 +111,9 @@ int main(int argc, char **argv) + } + } else { + /* display matrix */ +- printf("ethX\tport0\tport1\tport2\tport3\tport4"); +- if (info.ports == 6) +- printf("\tport5"); ++ printf("ethX"); ++ for (i = 0; i < info.ports; i++) ++ printf("\tport%d", i); + printf("\tCPU\n"); + for (i = 0; i < info.ports; i++) { + printf("%d", i); diff --git a/package/admswconfig/patches/001-matrix.patch b/package/admswconfig/patches/001-matrix.patch new file mode 100644 index 0000000..e50d515 --- /dev/null +++ b/package/admswconfig/patches/001-matrix.patch @@ -0,0 +1,15 @@ +--- a/admswconfig.c ++++ b/admswconfig.c +@@ -111,9 +111,9 @@ int main(int argc, char **argv) + } + } else { + /* display matrix */ +- printf("ethX\tport0\tport1\tport2\tport3\tport4"); +- if (info.ports == 6) +- printf("\tport5"); ++ printf("ethX"); ++ for (i = 0; i < info.ports; i++) ++ printf("\tport%d", i); + printf("\tCPU\n"); + for (i = 0; i < info.ports; i++) { + printf("%d", i); -- cgit v1.2.3