diff options
Diffstat (limited to 'target/linux/adm5120/base-files')
26 files changed, 941 insertions, 0 deletions
diff --git a/target/linux/adm5120/base-files/.svn/entries b/target/linux/adm5120/base-files/.svn/entries new file mode 100644 index 0000000..490c5eb --- /dev/null +++ b/target/linux/adm5120/base-files/.svn/entries @@ -0,0 +1,34 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/adm5120/base-files +svn://svn.openwrt.org/openwrt + + + +2013-02-18T09:56:26.396288Z +35649 +juhosg + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +lib +dir + +etc +dir + diff --git a/target/linux/adm5120/base-files/etc/.svn/entries b/target/linux/adm5120/base-files/etc/.svn/entries new file mode 100644 index 0000000..f62fd43 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/.svn/entries @@ -0,0 +1,99 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/adm5120/base-files/etc +svn://svn.openwrt.org/openwrt + + + +2013-02-18T09:56:26.396288Z +35649 +juhosg + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +config +dir + +inittab +file + + + + +2013-03-17T12:12:30.000000Z +fb5e27d753018f4d5f92963c5694237f +2012-12-03T16:18:40.654943Z +34469 +florian + + + + + + + + + + + + + + + + + + + + + +170 + +diag.sh +file + + + + +2013-03-17T12:12:30.000000Z +97749dc9818f8e4a6c8ea12f37440ea7 +2013-02-18T09:56:26.396288Z +35649 +juhosg +has-props + + + + + + + + + + + + + + + + + + + + +262 + diff --git a/target/linux/adm5120/base-files/etc/.svn/prop-base/diag.sh.svn-base b/target/linux/adm5120/base-files/etc/.svn/prop-base/diag.sh.svn-base new file mode 100644 index 0000000..03b5bfa --- /dev/null +++ b/target/linux/adm5120/base-files/etc/.svn/prop-base/diag.sh.svn-base @@ -0,0 +1,9 @@ +K 13 +svn:eol-style +V 6 +native +K 14 +svn:executable +V 1 +* +END diff --git a/target/linux/adm5120/base-files/etc/.svn/text-base/diag.sh.svn-base b/target/linux/adm5120/base-files/etc/.svn/text-base/diag.sh.svn-base new file mode 100644 index 0000000..dede589 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/.svn/text-base/diag.sh.svn-base @@ -0,0 +1,20 @@ +#!/bin/sh +# Copyright (C) 2007-2013 OpenWrt.org + +. /lib/functions/leds.sh +. /lib/adm5120.sh + +set_state() { + case "$1" in + preinit) + insmod leds-gpio + status_led_blink_preinit + ;; + failsafe) + status_led_blink_failsafe + ;; + done) + status_led_on + ;; + esac +} diff --git a/target/linux/adm5120/base-files/etc/.svn/text-base/inittab.svn-base b/target/linux/adm5120/base-files/etc/.svn/text-base/inittab.svn-base new file mode 100644 index 0000000..9f7c0ae --- /dev/null +++ b/target/linux/adm5120/base-files/etc/.svn/text-base/inittab.svn-base @@ -0,0 +1,5 @@ +::sysinit:/etc/init.d/rcS S boot +::shutdown:/etc/init.d/rcS K shutdown +tts/0::askfirst:/bin/ash --login +ttyAM0::askfirst:/bin/ash --login +tty1::askfirst:/bin/ash --login diff --git a/target/linux/adm5120/base-files/etc/config/.svn/entries b/target/linux/adm5120/base-files/etc/config/.svn/entries new file mode 100644 index 0000000..5001106 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/config/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/adm5120/base-files/etc/config +svn://svn.openwrt.org/openwrt + + + +2011-11-10T12:16:41.178346Z +28933 +jow + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +system +file + + + + +2013-03-17T12:12:30.000000Z +eae4835062513328f6db536fba1cd33c +2011-11-10T12:16:41.178346Z +28933 +jow + + + + + + + + + + + + + + + + + + + + + +742 + +network +file + + + + +2013-03-17T12:12:30.000000Z +aafe7d52c116e9f14265546cebed216a +2011-01-27T21:49:42.631475Z +25171 +florian + + + + + + + + + + + + + + + + + + + + + +481 + diff --git a/target/linux/adm5120/base-files/etc/config/.svn/text-base/network.svn-base b/target/linux/adm5120/base-files/etc/config/.svn/text-base/network.svn-base new file mode 100644 index 0000000..df2f201 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/config/.svn/text-base/network.svn-base @@ -0,0 +1,27 @@ +#### VLAN configuration +config switch + option eth0 "0 1 2 3" + option eth1 "4" + + +#### Loopback configuration +config interface loopback + option ifname "lo" + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + + +#### LAN configuration +config interface lan + option type bridge + option ifname "eth0" + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + + +#### WAN configuration +config interface wan + option ifname "eth1" + option proto dhcp diff --git a/target/linux/adm5120/base-files/etc/config/.svn/text-base/system.svn-base b/target/linux/adm5120/base-files/etc/config/.svn/text-base/system.svn-base new file mode 100644 index 0000000..ea54ca1 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/config/.svn/text-base/system.svn-base @@ -0,0 +1,40 @@ +config system + option hostname OpenWrt + option timezone UTC + +config timeserver ntp + list server 0.openwrt.pool.ntp.org + list server 1.openwrt.pool.ntp.org + list server 2.openwrt.pool.ntp.org + list server 3.openwrt.pool.ntp.org + +config led + option sysfs lan1 + option trigger port_state + option port_state link_act + +config led + option sysfs lan2 + option trigger port_state + option port_state link_act + +config led + option sysfs lan3 + option trigger port_state + option port_state link_act + +config led + option sysfs lan4 + option trigger port_state + option port_state link_act + +config led + option sysfs wan + option trigger port_state + option port_state link_act + +config led + option sysfs wlan + option trigger netdev + option dev wlan0 + diff --git a/target/linux/adm5120/base-files/etc/config/network b/target/linux/adm5120/base-files/etc/config/network new file mode 100644 index 0000000..df2f201 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/config/network @@ -0,0 +1,27 @@ +#### VLAN configuration +config switch + option eth0 "0 1 2 3" + option eth1 "4" + + +#### Loopback configuration +config interface loopback + option ifname "lo" + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + + +#### LAN configuration +config interface lan + option type bridge + option ifname "eth0" + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + + +#### WAN configuration +config interface wan + option ifname "eth1" + option proto dhcp diff --git a/target/linux/adm5120/base-files/etc/config/system b/target/linux/adm5120/base-files/etc/config/system new file mode 100644 index 0000000..ea54ca1 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/config/system @@ -0,0 +1,40 @@ +config system + option hostname OpenWrt + option timezone UTC + +config timeserver ntp + list server 0.openwrt.pool.ntp.org + list server 1.openwrt.pool.ntp.org + list server 2.openwrt.pool.ntp.org + list server 3.openwrt.pool.ntp.org + +config led + option sysfs lan1 + option trigger port_state + option port_state link_act + +config led + option sysfs lan2 + option trigger port_state + option port_state link_act + +config led + option sysfs lan3 + option trigger port_state + option port_state link_act + +config led + option sysfs lan4 + option trigger port_state + option port_state link_act + +config led + option sysfs wan + option trigger port_state + option port_state link_act + +config led + option sysfs wlan + option trigger netdev + option dev wlan0 + diff --git a/target/linux/adm5120/base-files/etc/diag.sh b/target/linux/adm5120/base-files/etc/diag.sh new file mode 100755 index 0000000..dede589 --- /dev/null +++ b/target/linux/adm5120/base-files/etc/diag.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Copyright (C) 2007-2013 OpenWrt.org + +. /lib/functions/leds.sh +. /lib/adm5120.sh + +set_state() { + case "$1" in + preinit) + insmod leds-gpio + status_led_blink_preinit + ;; + failsafe) + status_led_blink_failsafe + ;; + done) + status_led_on + ;; + esac +} diff --git a/target/linux/adm5120/base-files/etc/inittab b/target/linux/adm5120/base-files/etc/inittab new file mode 100644 index 0000000..9f7c0ae --- /dev/null +++ b/target/linux/adm5120/base-files/etc/inittab @@ -0,0 +1,5 @@ +::sysinit:/etc/init.d/rcS S boot +::shutdown:/etc/init.d/rcS K shutdown +tts/0::askfirst:/bin/ash --login +ttyAM0::askfirst:/bin/ash --login +tty1::askfirst:/bin/ash --login diff --git a/target/linux/adm5120/base-files/lib/.svn/entries b/target/linux/adm5120/base-files/lib/.svn/entries new file mode 100644 index 0000000..0e0625b --- /dev/null +++ b/target/linux/adm5120/base-files/lib/.svn/entries @@ -0,0 +1,68 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/adm5120/base-files/lib +svn://svn.openwrt.org/openwrt + + + +2011-03-21T16:52:14.042971Z +26257 +thepeople + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +adm5120.sh +file + + + + +2013-03-17T12:12:30.000000Z +fe05ba9a706e777a4875ec30622f7935 +2010-07-18T10:29:58.775541Z +22275 +florian +has-props + + + + + + + + + + + + + + + + + + + + +738 + +upgrade +dir + +preinit +dir + diff --git a/target/linux/adm5120/base-files/lib/.svn/prop-base/adm5120.sh.svn-base b/target/linux/adm5120/base-files/lib/.svn/prop-base/adm5120.sh.svn-base new file mode 100644 index 0000000..03b5bfa --- /dev/null +++ b/target/linux/adm5120/base-files/lib/.svn/prop-base/adm5120.sh.svn-base @@ -0,0 +1,9 @@ +K 13 +svn:eol-style +V 6 +native +K 14 +svn:executable +V 1 +* +END diff --git a/target/linux/adm5120/base-files/lib/.svn/text-base/adm5120.sh.svn-base b/target/linux/adm5120/base-files/lib/.svn/text-base/adm5120.sh.svn-base new file mode 100644 index 0000000..496fc06 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/.svn/text-base/adm5120.sh.svn-base @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Copyright (C) 2007 OpenWrt.org +# +# + +board_name="" +status_led="" +sys_mtd_part="" + +adm5120_detect() { + board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo) + + case "$board_name" in + "Cellvision"*) + status_led="status" + sys_mtd_part="firmware" + ;; + "Compex"*) + status_led="diag" + case "$board_name" in + *-WRT) + sys_mtd_part="trx" + ;; + *) + sys_mtd_part="partition1" + ;; + esac + ;; + "Edimax"*) + status_led="power" + sys_mtd_part="firmware" + ;; + "Infineon"*) + sys_mtd_part="firmware" + ;; + "Mikrotik"*) + status_led="power" + ;; + "ZyXEL"*) + status_led="power" + sys_mtd_part="trx" + ;; + "EB-214A"*) + status_led="power" + sys_mtd_part="firmware" + ;; + *) + ;; + esac +} + +adm5120_detect diff --git a/target/linux/adm5120/base-files/lib/adm5120.sh b/target/linux/adm5120/base-files/lib/adm5120.sh new file mode 100755 index 0000000..496fc06 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/adm5120.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Copyright (C) 2007 OpenWrt.org +# +# + +board_name="" +status_led="" +sys_mtd_part="" + +adm5120_detect() { + board_name=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo) + + case "$board_name" in + "Cellvision"*) + status_led="status" + sys_mtd_part="firmware" + ;; + "Compex"*) + status_led="diag" + case "$board_name" in + *-WRT) + sys_mtd_part="trx" + ;; + *) + sys_mtd_part="partition1" + ;; + esac + ;; + "Edimax"*) + status_led="power" + sys_mtd_part="firmware" + ;; + "Infineon"*) + sys_mtd_part="firmware" + ;; + "Mikrotik"*) + status_led="power" + ;; + "ZyXEL"*) + status_led="power" + sys_mtd_part="trx" + ;; + "EB-214A"*) + status_led="power" + sys_mtd_part="firmware" + ;; + *) + ;; + esac +} + +adm5120_detect diff --git a/target/linux/adm5120/base-files/lib/preinit/.svn/entries b/target/linux/adm5120/base-files/lib/preinit/.svn/entries new file mode 100644 index 0000000..14709b9 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/adm5120/base-files/lib/preinit +svn://svn.openwrt.org/openwrt + + + +2010-05-30T03:20:38.874894Z +21633 +cshore + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +05_preinit_do_adm5120.sh +file + + + + +2013-03-17T12:12:30.000000Z +c482516124bc60298e5667da7dcbb923 +2010-05-30T03:20:38.874894Z +21633 +cshore + + + + + + + + + + + + + + + + + + + + + +86 + +05_set_preinit_iface_adm5120 +file + + + + +2013-03-17T12:12:30.000000Z +86bfa6b89fb3dad0ea771086e8327654 +2010-05-30T03:20:27.510741Z +21632 +cshore + + + + + + + + + + + + + + + + + + + + + +98 + +05_reset_button_adm5120 +file + + + + +2013-03-17T12:12:30.000000Z +34731bb83de2c3da809994efe0ce3f65 +2010-01-28T19:28:02.201127Z +19370 +nbd + + + + + + + + + + + + + + + + + + + + + +172 + diff --git a/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_preinit_do_adm5120.sh.svn-base b/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_preinit_do_adm5120.sh.svn-base new file mode 100644 index 0000000..4fca1e7 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_preinit_do_adm5120.sh.svn-base @@ -0,0 +1,7 @@ +#!/bin/sh + +do_adm5120() { + . /lib/adm5120.sh +} + +boot_hook_add preinit_main do_adm5120 diff --git a/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_reset_button_adm5120.svn-base b/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_reset_button_adm5120.svn-base new file mode 100644 index 0000000..44f164a --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_reset_button_adm5120.svn-base @@ -0,0 +1,12 @@ +#!/bin/sh + +enable_reset_button() { + insmod input-core + insmod input-polldev + insmod gpio_buttons + insmod button-hotplug +} + +boot_hook_add preinit_main enable_reset_button + + diff --git a/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_set_preinit_iface_adm5120.svn-base b/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_set_preinit_iface_adm5120.svn-base new file mode 100644 index 0000000..ac2a7cb --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/.svn/text-base/05_set_preinit_iface_adm5120.svn-base @@ -0,0 +1,9 @@ +#!/bin/sh + +set_preinit_ifname() { + ifname=eth0 +} + +boot_hook_add preinit_main set_preinit_ifname + + diff --git a/target/linux/adm5120/base-files/lib/preinit/05_preinit_do_adm5120.sh b/target/linux/adm5120/base-files/lib/preinit/05_preinit_do_adm5120.sh new file mode 100644 index 0000000..4fca1e7 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/05_preinit_do_adm5120.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +do_adm5120() { + . /lib/adm5120.sh +} + +boot_hook_add preinit_main do_adm5120 diff --git a/target/linux/adm5120/base-files/lib/preinit/05_reset_button_adm5120 b/target/linux/adm5120/base-files/lib/preinit/05_reset_button_adm5120 new file mode 100644 index 0000000..44f164a --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/05_reset_button_adm5120 @@ -0,0 +1,12 @@ +#!/bin/sh + +enable_reset_button() { + insmod input-core + insmod input-polldev + insmod gpio_buttons + insmod button-hotplug +} + +boot_hook_add preinit_main enable_reset_button + + diff --git a/target/linux/adm5120/base-files/lib/preinit/05_set_preinit_iface_adm5120 b/target/linux/adm5120/base-files/lib/preinit/05_set_preinit_iface_adm5120 new file mode 100644 index 0000000..ac2a7cb --- /dev/null +++ b/target/linux/adm5120/base-files/lib/preinit/05_set_preinit_iface_adm5120 @@ -0,0 +1,9 @@ +#!/bin/sh + +set_preinit_ifname() { + ifname=eth0 +} + +boot_hook_add preinit_main set_preinit_ifname + + diff --git a/target/linux/adm5120/base-files/lib/upgrade/.svn/entries b/target/linux/adm5120/base-files/lib/upgrade/.svn/entries new file mode 100644 index 0000000..667ef14 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/upgrade/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/adm5120/base-files/lib/upgrade +svn://svn.openwrt.org/openwrt + + + +2011-03-21T16:52:14.042971Z +26257 +thepeople + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +platform.sh +file + + + + +2013-03-17T12:12:30.000000Z +bd1fe2af3a60bdac0e6eb241896d02c2 +2011-03-21T16:52:14.042971Z +26257 +thepeople + + + + + + + + + + + + + + + + + + + + + +732 + diff --git a/target/linux/adm5120/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base b/target/linux/adm5120/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base new file mode 100644 index 0000000..f067089 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/upgrade/.svn/text-base/platform.sh.svn-base @@ -0,0 +1,44 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# + +. /lib/adm5120.sh + +PART_NAME="firmware" +RAMFS_COPY_DATA=/lib/adm5120.sh + +platform_check_image() { + local magic="$(get_magic_word "$1")" + + [ "$ARGC" -gt 1 ] && return 1 + + case "$board_name" in + "ZyXEL"*|"Compex WP54 family") + # .trx files + [ "$magic" != "4844" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; + *) + ;; + esac + + echo "Sysupgrade is not yet supported on $board_name." + return 1 +} + +platform_do_upgrade() { + PART_NAME="$sys_mtd_part" + default_do_upgrade "$ARGV" +} + +disable_watchdog() { + killall watchdog + ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && { + echo 'Could not disable watchdog' + return 1 + } +} +append sysupgrade_pre_upgrade disable_watchdog diff --git a/target/linux/adm5120/base-files/lib/upgrade/platform.sh b/target/linux/adm5120/base-files/lib/upgrade/platform.sh new file mode 100644 index 0000000..f067089 --- /dev/null +++ b/target/linux/adm5120/base-files/lib/upgrade/platform.sh @@ -0,0 +1,44 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# + +. /lib/adm5120.sh + +PART_NAME="firmware" +RAMFS_COPY_DATA=/lib/adm5120.sh + +platform_check_image() { + local magic="$(get_magic_word "$1")" + + [ "$ARGC" -gt 1 ] && return 1 + + case "$board_name" in + "ZyXEL"*|"Compex WP54 family") + # .trx files + [ "$magic" != "4844" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; + *) + ;; + esac + + echo "Sysupgrade is not yet supported on $board_name." + return 1 +} + +platform_do_upgrade() { + PART_NAME="$sys_mtd_part" + default_do_upgrade "$ARGV" +} + +disable_watchdog() { + killall watchdog + ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && { + echo 'Could not disable watchdog' + return 1 + } +} +append sysupgrade_pre_upgrade disable_watchdog |