Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
cf4a9cf7
Commit
cf4a9cf7
authored
Jun 08, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filesystem template with updated config files
parent
e4077473
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
201 additions
and
347 deletions
+201
-347
TZ
userspace/rootfs_override/etc/TZ
+1
-0
fstab
userspace/rootfs_override/etc/fstab
+10
-0
ifplugd.action
userspace/rootfs_override/etc/ifplugd/ifplugd.action
+34
-0
S40network
userspace/rootfs_override/etc/init.d/S40network
+6
-2
S60wr
userspace/rootfs_override/etc/init.d/S60wr
+4
-0
S60wrsw_hal
userspace/rootfs_override/etc/init.d/S60wrsw_hal
+0
-40
inittab
userspace/rootfs_override/etc/inittab
+11
-7
interfaces
userspace/rootfs_override/etc/network/interfaces
+4
-0
profile
userspace/rootfs_override/etc/profile
+3
-0
hal_with_nic.conf
userspace/rootfs_override/wr/etc/hal_with_nic.conf
+0
-173
sfp_database.conf
userspace/rootfs_override/wr/etc/sfp_database.conf
+22
-0
wrsw_hal.conf
userspace/rootfs_override/wr/etc/wrsw_hal.conf
+85
-125
start-daemons.sh
userspace/rootfs_override/wr/sbin/start-daemons.sh
+10
-0
startup-mb.sh
userspace/rootfs_override/wr/sbin/startup-mb.sh
+11
-0
No files found.
userspace/rootfs_override/etc/TZ
0 → 100644
View file @
cf4a9cf7
GMT
\ No newline at end of file
userspace/rootfs_override/etc/fstab
0 → 100644
View file @
cf4a9cf7
# /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
userspace/rootfs_override/etc/ifplugd/ifplugd.action
0 → 100755
View file @
cf4a9cf7
#!/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
userspace/rootfs_override/etc/init.d/S40network
View file @
cf4a9cf7
...
...
@@ -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
userspace/rootfs_override/etc/init.d/S60wr
0 → 100755
View file @
cf4a9cf7
#!/bin/sh
#!/bin/bash
/wr/sbin/startup-mb.sh
\ No newline at end of file
userspace/rootfs_override/etc/init.d/S60wrsw_hal
deleted
100755 → 0
View file @
e4077473
#!/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
$?
userspace/rootfs_override/etc/inittab
View file @
cf4a9cf7
...
...
@@ -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
tty
G
S0::respawn:/bin/ash --login
#/sbin/getty -L ttyS0 115200 vt100
# Logging junk
...
...
userspace/rootfs_override/etc/network/interfaces
0 → 100644
View file @
cf4a9cf7
# Configure Loopback
auto lo
iface lo inet loopback
userspace/rootfs_override/etc/profile
View file @
cf4a9cf7
...
...
@@ -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 }'`#"
userspace/rootfs_override/wr/etc/hal_with_nic.conf
deleted
100644 → 0
View file @
e4077473
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
()
userspace/rootfs_override/wr/etc/sfp_database.conf
0 → 100644
View file @
cf4a9cf7
--
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
.
67871791665542
e
-
04
,
delta_tx
=
10
,
delta_rx
=
10
},
{
part_num
=
"AXGE-3454-0531"
,
alpha
= -
2
.
67800055584799
e
-
04
,
delta_tx
=
10
,
delta_rx
=
10
},
}
userspace/rootfs_override/wr/etc/wrsw_hal.conf
View file @
cf4a9cf7
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
*
80
0
;
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"
;
};
};
userspace/rootfs_override/wr/sbin/start-daemons.sh
0 → 100755
View file @
cf4a9cf7
#!/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 &
userspace/rootfs_override/wr/sbin/startup-mb.sh
0 → 100755
View file @
cf4a9cf7
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment