Commit cf4a9cf7 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

filesystem template with updated config files

parent e4077473
GMT
\ No newline at end of file
# /etc/fstab: static file system information.
#
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/log tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
#!/bin/sh
# $Id: ifplugd.action 99 2004-02-08 20:17:59Z lennart $
# This file is part of ifplugd.
#
# ifplugd is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# ifplugd is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with ifplugd; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
set -e
if [ -z "$1" ] || [ -z "$2" ] ; then
echo "Wrong arguments" > /dev/stderr
exit 1
fi
[ "$2" = "up" ] && exec /sbin/udhcpc -n $1
if [ "$2" = "down" ]; then
exec /sbin/ifconfig $1 down
killall udhcpc
fi
exit 1
......@@ -3,6 +3,10 @@
# Start the network....
#
# don't run dhcp-client if root is nfs.
grep -q '/ nfs' /proc/mounts || udhcpc
#MAC=`/wr/bin/get_board_mac`
#echo "Management port MAC address: $MAC"
#ifconfig eth0 hw ether $MAC
#ifplugd -i eth0
#udhcpc -n
/usr/sbin/ifplugd -I -f -i eth0
\ No newline at end of file
#!/bin/sh
#!/bin/bash
/wr/sbin/startup-mb.sh
\ No newline at end of file
#!/bin/sh
#
# Starts dropbear sshd.
#
# Make sure the dropbearkey progam exists
[ -f /wr/bin/wrsw_hal ] || exit 0
start() {
echo -n "Starting WR Hardware Abstraction Layer daemon: "
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/wr/lib" /wr/bin/wrsw_hal -d -f -c /wr/etc/wrsw_hal.conf
# /wr/bin/wrsw_rtud -d
}
stop() {
killall wrsw_rtud
killall wrsw_hal
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
......@@ -14,14 +14,18 @@
# process == program to run
# Startup the system
null::sysinit:/bin/mount -o remount,rw /
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
#null::sysinit:/bin/mount -o remount,rw /
#null::sysinit:/etc/init.d/rc.sysinit
#/bin/mount -t proc proc /proc
#null::sysinit:/bin/mount -a
#null::sysinit:/bin/mount -o remount,rw /
#null::sysinit:/bin/hostname -F /etc/hostname
#null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
#null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
# now run any rc scripts
::sysinit:/etc/init.d/rc.sysinit
::sysinit:/etc/init.d/rcS
# Set up a couple of getty's
......@@ -29,7 +33,7 @@ null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
#tty2::respawn:/sbin/getty 38400 tty2
# Put a getty on the serial port
ttyS0::respawn:/bin/ash --login
ttyGS0::respawn:/bin/ash --login
#/sbin/getty -L ttyS0 115200 vt100
# Logging junk
......
# Configure Loopback
auto lo
iface lo inet loopback
......@@ -14,6 +14,7 @@ export LD_LIBRARY_PATH=\
/usr/lib:\
/wr/lib
# If running interactively, then:
if [ "$PS1" ]; then
......@@ -52,3 +53,5 @@ if [ "$PS1" ]; then
alias calc='calc -Cd '
alias bc='calc -Cd '
fi;
export PS1="wrs-`ifconfig eth0 | grep inet | awk -F: '{ print $2 }' | awk '{ print $1 }'`#"
global = {
hal_modules_path = "/wr/lib/modules";
hal_firmware_path = "/wr/firmware";
main_firmware="full";
clkb_firmware="dmtd_pll_test";
modules = {"wr_vic.ko", "wr_rtu.ko", "wr-nic.ko"};
};
timing = {
pps_width = 100000; -- PPS pulse width
use_external_clock = 0;
};
ports = {
wru0 = {
phy_rx_bias = 7700; -- phase measurement at which the phy delay is minimal
phy_rx_min = 20 * 800; -- minimal RX latency introduced by the PHY (in picoseconds)
-- for TLK1221 it's 20 UI of 0.8 ns each
phy_rx_range = 7 * 800; -- maximal range of RX latency nondeterminism (e.g. the difference
-- between the max and min. RX latency). Say, it's 3 UI.
-- the same parameters for TX path
phy_tx_bias = 3800;
phy_tx_min = 20 * 800;
phy_tx_range = 3 * 800;
mac_addr = "auto";
mode = "wr_master";
},
wru1 = {
phy_rx_bias = 7700; -- phase measurement at which the phy delay is minimal
phy_rx_min = 20 * 800; -- minimal RX latency introduced by the PHY (in picoseconds)
-- for TLK1221 it's 20 UI of 0.8 ns each
phy_rx_range = 7 * 800; -- maximal range of RX latency nondeterminism (e.g. the difference
-- between the max and min. RX latency). Say, it's 3 UI.
-- the same parameters for TX path
phy_tx_bias = 3800;
phy_tx_min = 20 * 800 + 1500;
phy_tx_range = 3 * 800;
mac_addr = "auto";
mode = "wr_slave";
},
wrd0 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd1 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd2 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd3 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd4 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd5 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd6 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd7 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
}
}
-- fixme: nicer detection of grandmaster mode
f=io.popen("ip -o address | grep 192.168.1.6");
if(f:read("*l") ~= nil) then
timing.use_external_clock = 1;
end
f:close()
-- The VENDOR_SERIAL field can be set to an empty string to provide class-level
-- information as opposed to device-level information.
sfpdb = {
{
part_num = "AXGE-1254-0531",
alpha = 2.67871791665542e-04,
delta_tx = 10,
delta_rx = 10
},
{
part_num = "AXGE-3454-0531",
alpha = -2.67800055584799e-04,
delta_tx = 10,
delta_rx = 10
},
}
global = {
hal_modules_path = "/wr/lib/modules";
hal_firmware_path = "/wr/firmware";
main_firmware="rtu_with_endpoints";
clkb_firmware="dmtd_pll_test";
modules = {"wr_vic.ko", "wr_minic.ko"};
sfp_database_path = "/wr/etc/sfp_database.conf";
};
timing = {
pps_width = 100000; -- PPS pulse width
use_external_clock = 0;
-- use_nmea = 1; -- take UTC seconds from NMEA GPS clock connected to /dev/ttyS2
-- mode = "GrandMaster"; -- grand-master with external reference
};
ports = {
wru0 = {
phy_rx_bias = 5600; -- phase measurement at which the phy delay is minimal
phy_rx_min = 20 * 800 - 3900; -- minimal RX latency introduced by the PHY (in picoseconds)
-- for TLK1221 it's 20 UI of 0.8 ns each
phy_rx_range = 7 * 800; -- maximal range of RX latency nondeterminism (e.g. the difference
-- between the max and min. RX latency). Say, it's 3 UI.
wr0 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
-- the same parameters for TX path
mac_addr = "auto";
mode = "wr_slave";
};
phy_tx_bias = 3800;
phy_tx_min = 20 * 800;
phy_tx_range = 3 * 800;
wr1 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
mac_addr = "auto";
mode = "wr_master";
},
wru1 = {
phy_rx_bias = 5600; -- phase measurement at which the phy delay is minimal
phy_rx_min = 20 * 800 - 3900; -- minimal RX latency introduced by the PHY (in picoseconds)
-- for TLK1221 it's 20 UI of 0.8 ns each
phy_rx_range = 7 * 800; -- maximal range of RX latency nondeterminism (e.g. the difference
-- between the max and min. RX latency). Say, it's 3 UI.
-- the same parameters for TX path
phy_tx_bias = 3800;
phy_tx_min = 20 * 800;
phy_tx_range = 3 * 800;
};
wr2 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
mac_addr = "auto";
mode = "wr_slave";
},
wrd0 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mode = "wr_master";
};
phy_tx_bias = 0;
wr3 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd1 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mode = "wr_master";
};
phy_tx_bias = 0;
wr4 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd2 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mode = "wr_master";
};
phy_tx_bias = 0;
wr5 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
mode = "wr_master";
};
wrd3 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
phy_tx_bias = 0;
wr6 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
mode = "wr_master";
};
wr7 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
wrd4 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mac_addr = "auto";
mode = "wr_master";
};
phy_tx_bias = 0;
wr8 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd5 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mode = "wr_master";
};
phy_tx_bias = 0;
wr9 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
mode = "wr_master";
};
wr10 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
wrd6 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mac_addr = "auto";
mode = "wr_master";
};
phy_tx_bias = 0;
wr11 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
},
wrd7 = {
phy_rx_bias = 0;
phy_rx_min = 0;
phy_rx_max = 0;
mode = "wr_master";
};
phy_tx_bias = 0;
wr12 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
phy_tx_max = 0;
mac_addr = "auto";
mode = "non_wr";
}
mode = "wr_master";
};
wr13 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
mac_addr = "auto";
mode = "wr_master";
};
}
wr14 = {
phy_rx_min = 160000; -- minimal RX latency introduced by the PHY (in picoseconds)
phy_tx_min = 0;
-- fixme: nicer detection of grandmaster mode
--f=io.popen("ip -o address | grep 192.168.1.6");
--if(f:read("*l") ~= nil) then
-- timing.use_external_clock = 1;
--end
--f:close()
mac_addr = "auto";
mode = "wr_master";
};
};
#!/bin/ash
echo "Starting up WR daemons..."
export WR_HOME="/wr"
$WR_HOME/bin/wrsw_hal -c $WR_HOME/etc/wrsw_hal.conf &> /dev/kmsg &
$WR_HOME/bin/wrsw_rtud >& /dev/kmsg &
$WR_HOME/bin/ptpd -A -c >& /dev/null &
#!/bin/ash
echo "Starting up WR Switch (18-ports MiniBackplane version)..."
export WR_HOME="/wr"
$WR_HOME/bin/load-fpga $WR_HOME/lib/firmware/8ports_mb.bin
$WR_HOME/bin/lm32-loader $WR_HOME/lib/firmware/rt_cpu.bin
insmod $WR_HOME/lib/modules/wr_vic.ko
insmod $WR_HOME/lib/modules/wr-nic.ko
insmod $WR_HOME/lib/modules/wr_rtu.ko
$WR_HOME/sbin/start-daemons.sh
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment