diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /target/linux/x86/rdc/base-files | |
download | trunk-36060-master.tar.gz trunk-36060-master.tar.bz2 trunk-36060-master.zip |
Diffstat (limited to 'target/linux/x86/rdc/base-files')
14 files changed, 481 insertions, 0 deletions
diff --git a/target/linux/x86/rdc/base-files/.svn/entries b/target/linux/x86/rdc/base-files/.svn/entries new file mode 100644 index 0000000..85ae582 --- /dev/null +++ b/target/linux/x86/rdc/base-files/.svn/entries @@ -0,0 +1,34 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/x86/rdc/base-files +svn://svn.openwrt.org/openwrt + + + +2013-02-18T10:38:05.820542Z +35664 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +lib +dir + +etc +dir + diff --git a/target/linux/x86/rdc/base-files/etc/.svn/entries b/target/linux/x86/rdc/base-files/etc/.svn/entries new file mode 100644 index 0000000..45d1560 --- /dev/null +++ b/target/linux/x86/rdc/base-files/etc/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/x86/rdc/base-files/etc +svn://svn.openwrt.org/openwrt + + + +2013-02-18T10:38:05.820542Z +35664 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +config +dir + +diag.sh +file + + + + +2013-03-17T12:12:36.000000Z +c5ffbe1a6a7a9e59ea997bc98a9f0fbe +2013-02-18T10:38:05.820542Z +35664 +florian + + + + + + + + + + + + + + + + + + + + + +197 + diff --git a/target/linux/x86/rdc/base-files/etc/.svn/text-base/diag.sh.svn-base b/target/linux/x86/rdc/base-files/etc/.svn/text-base/diag.sh.svn-base new file mode 100644 index 0000000..03796d7 --- /dev/null +++ b/target/linux/x86/rdc/base-files/etc/.svn/text-base/diag.sh.svn-base @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright (C) 2007-2013 OpenWrt.org + +. /lib/functions/leds.sh + +status_led="rdc321x:dmz" + +set_state() { + case "$1" in + preinit) + status_led_on + ;; + done) + status_led_off + ;; + esac +} diff --git a/target/linux/x86/rdc/base-files/etc/config/.svn/entries b/target/linux/x86/rdc/base-files/etc/config/.svn/entries new file mode 100644 index 0000000..206f130 --- /dev/null +++ b/target/linux/x86/rdc/base-files/etc/config/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/x86/rdc/base-files/etc/config +svn://svn.openwrt.org/openwrt + + + +2012-10-15T18:54:34.437751Z +33779 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +network +file + + + + +2013-03-17T12:12:36.000000Z +f94c429533efb051f50319c58c355030 +2012-10-15T18:54:34.437751Z +33779 +florian + + + + + + + + + + + + + + + + + + + + + +434 + diff --git a/target/linux/x86/rdc/base-files/etc/config/.svn/text-base/network.svn-base b/target/linux/x86/rdc/base-files/etc/config/.svn/text-base/network.svn-base new file mode 100644 index 0000000..44c5794 --- /dev/null +++ b/target/linux/x86/rdc/base-files/etc/config/.svn/text-base/network.svn-base @@ -0,0 +1,18 @@ +# Copyright (C) 2009 OpenWrt.org + +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 eth1 + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth0 + option proto dhcp diff --git a/target/linux/x86/rdc/base-files/etc/config/network b/target/linux/x86/rdc/base-files/etc/config/network new file mode 100644 index 0000000..44c5794 --- /dev/null +++ b/target/linux/x86/rdc/base-files/etc/config/network @@ -0,0 +1,18 @@ +# Copyright (C) 2009 OpenWrt.org + +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 eth1 + option type bridge + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth0 + option proto dhcp diff --git a/target/linux/x86/rdc/base-files/etc/diag.sh b/target/linux/x86/rdc/base-files/etc/diag.sh new file mode 100644 index 0000000..03796d7 --- /dev/null +++ b/target/linux/x86/rdc/base-files/etc/diag.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright (C) 2007-2013 OpenWrt.org + +. /lib/functions/leds.sh + +status_led="rdc321x:dmz" + +set_state() { + case "$1" in + preinit) + status_led_on + ;; + done) + status_led_off + ;; + esac +} diff --git a/target/linux/x86/rdc/base-files/lib/.svn/entries b/target/linux/x86/rdc/base-files/lib/.svn/entries new file mode 100644 index 0000000..02fcb39 --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/.svn/entries @@ -0,0 +1,34 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/x86/rdc/base-files/lib +svn://svn.openwrt.org/openwrt + + + +2012-12-19T16:07:53.948034Z +34794 +mirko + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +upgrade +dir + +preinit +dir + diff --git a/target/linux/x86/rdc/base-files/lib/preinit/.svn/entries b/target/linux/x86/rdc/base-files/lib/preinit/.svn/entries new file mode 100644 index 0000000..f3f7cac --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/preinit/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/x86/rdc/base-files/lib/preinit +svn://svn.openwrt.org/openwrt + + + +2012-12-19T16:07:53.948034Z +34794 +mirko + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +05_set_ether_mac_rdc +file + + + + +2013-03-17T12:12:36.000000Z +96bcb56f5b5f6edcf1c7e20fcbc1178f +2012-12-19T16:07:53.948034Z +34794 +mirko + + + + + + + + + + + + + + + + + + + + + +1032 + diff --git a/target/linux/x86/rdc/base-files/lib/preinit/.svn/text-base/05_set_ether_mac_rdc.svn-base b/target/linux/x86/rdc/base-files/lib/preinit/.svn/text-base/05_set_ether_mac_rdc.svn-base new file mode 100644 index 0000000..0518766 --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/preinit/.svn/text-base/05_set_ether_mac_rdc.svn-base @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (C) 2009-2012 OpenWrt.org + +. /lib/functions.sh + +r6040_module() { + insmod libphy + insmod swconfig + insmod ip17xx + sleep 1 + insmod r6040 +} + +set_ether_mac() { + kernel=$(grep firmware /proc/mtd | awk -F: '{print $1}') + [ -n "$kernel" ] && hdr=$(dd if=/dev/$kernel count=4 bs=1 2> /dev/null) + [ "$hdr" = "CSYS" ] && config=$(find_mtd_part config) + if [ -n "$config" ]; then + mac0=$(hexdump -n 6 -e '6/1 ":%X"' -s 24583 $config | cut -c2-) + [ "$mac0" = "FF:FF:FF:FF:FF:FF" -o "$mac0" = "0:0:0:0:0:0" ] && unset mac0 + mac1=$(hexdump -n 6 -e '6/1 ":%X"' -s 24589 $config | cut -c2-) + [ "$mac1" = "FF:FF:FF:FF:FF:FF" -o "$mac1" = "0:0:0:0:0:0" ] && unset mac1 + fi + if [ -n "$mac0" ]; then + logger -t kernel -p user.info "r6040: Setting MAC for eth0 to $mac0" + ifconfig eth0 hw ether "$mac0" + fi + if [ -n "$mac1" ]; then + logger -t kernel -p user.info "r6040: Setting MAC for eth1 to $mac1" + ifconfig eth1 hw ether "$mac1" + fi +} + +boot_hook_add preinit_main r6040_module +boot_hook_add preinit_main set_ether_mac + diff --git a/target/linux/x86/rdc/base-files/lib/preinit/05_set_ether_mac_rdc b/target/linux/x86/rdc/base-files/lib/preinit/05_set_ether_mac_rdc new file mode 100644 index 0000000..0518766 --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/preinit/05_set_ether_mac_rdc @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (C) 2009-2012 OpenWrt.org + +. /lib/functions.sh + +r6040_module() { + insmod libphy + insmod swconfig + insmod ip17xx + sleep 1 + insmod r6040 +} + +set_ether_mac() { + kernel=$(grep firmware /proc/mtd | awk -F: '{print $1}') + [ -n "$kernel" ] && hdr=$(dd if=/dev/$kernel count=4 bs=1 2> /dev/null) + [ "$hdr" = "CSYS" ] && config=$(find_mtd_part config) + if [ -n "$config" ]; then + mac0=$(hexdump -n 6 -e '6/1 ":%X"' -s 24583 $config | cut -c2-) + [ "$mac0" = "FF:FF:FF:FF:FF:FF" -o "$mac0" = "0:0:0:0:0:0" ] && unset mac0 + mac1=$(hexdump -n 6 -e '6/1 ":%X"' -s 24589 $config | cut -c2-) + [ "$mac1" = "FF:FF:FF:FF:FF:FF" -o "$mac1" = "0:0:0:0:0:0" ] && unset mac1 + fi + if [ -n "$mac0" ]; then + logger -t kernel -p user.info "r6040: Setting MAC for eth0 to $mac0" + ifconfig eth0 hw ether "$mac0" + fi + if [ -n "$mac1" ]; then + logger -t kernel -p user.info "r6040: Setting MAC for eth1 to $mac1" + ifconfig eth1 hw ether "$mac1" + fi +} + +boot_hook_add preinit_main r6040_module +boot_hook_add preinit_main set_ether_mac + diff --git a/target/linux/x86/rdc/base-files/lib/upgrade/.svn/entries b/target/linux/x86/rdc/base-files/lib/upgrade/.svn/entries new file mode 100644 index 0000000..c6ebdda --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/upgrade/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/x86/rdc/base-files/lib/upgrade +svn://svn.openwrt.org/openwrt + + + +2012-10-15T18:54:34.437751Z +33779 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +platform.sh +file + + + + +2013-03-17T12:12:36.000000Z +5ed72d594c70fd01885fb1162b676a53 +2012-10-15T18:54:34.437751Z +33779 +florian + + + + + + + + + + + + + + + + + + + + + +255 + diff --git a/target/linux/x86/rdc/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base b/target/linux/x86/rdc/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base new file mode 100644 index 0000000..6348a69 --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base @@ -0,0 +1,10 @@ +PART_NAME=firmware + +platform_check_image() { + [ "$(get_magic_word $(find_mtd_part firmware))" -eq "$(get_magic_word "$1")" ] && return 0 + + echo "Invalid image type. Please use an appropriate .bin file" + return 1 +} + +# use default for platform_do_upgrade() diff --git a/target/linux/x86/rdc/base-files/lib/upgrade/platform.sh b/target/linux/x86/rdc/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000..6348a69 --- /dev/null +++ b/target/linux/x86/rdc/base-files/lib/upgrade/platform.sh @@ -0,0 +1,10 @@ +PART_NAME=firmware + +platform_check_image() { + [ "$(get_magic_word $(find_mtd_part firmware))" -eq "$(get_magic_word "$1")" ] && return 0 + + echo "Invalid image type. Please use an appropriate .bin file" + return 1 +} + +# use default for platform_do_upgrade() |