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
86
Issues
86
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
278b0fe9
Commit
278b0fe9
authored
May 17, 2011
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/rootfs_override from svn
parent
165b6459
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
651 additions
and
0 deletions
+651
-0
dropbear_dss_host_key
userspace/rootfs_override/etc/dropbear/dropbear_dss_host_key
+0
-0
dropbear_rsa_host_key
userspace/rootfs_override/etc/dropbear/dropbear_rsa_host_key
+0
-0
S20urandom
userspace/rootfs_override/etc/init.d/S20urandom
+54
-0
S40network
userspace/rootfs_override/etc/init.d/S40network
+7
-0
S50dropbear
userspace/rootfs_override/etc/init.d/S50dropbear
+56
-0
S60wrsw_hal
userspace/rootfs_override/etc/init.d/S60wrsw_hal
+40
-0
rcS
userspace/rootfs_override/etc/init.d/rcS
+28
-0
inittab
userspace/rootfs_override/etc/inittab
+49
-0
issue
userspace/rootfs_override/etc/issue
+5
-0
profile
userspace/rootfs_override/etc/profile
+54
-0
shadow
userspace/rootfs_override/etc/shadow
+12
-0
hal_with_nic.conf
userspace/rootfs_override/wr/etc/hal_with_nic.conf
+173
-0
wrsw_hal.conf
userspace/rootfs_override/wr/etc/wrsw_hal.conf
+173
-0
No files found.
userspace/rootfs_override/etc/dropbear/dropbear_dss_host_key
0 → 100644
View file @
278b0fe9
File added
userspace/rootfs_override/etc/dropbear/dropbear_rsa_host_key
0 → 100644
View file @
278b0fe9
File added
userspace/rootfs_override/etc/init.d/S20urandom
0 → 100755
View file @
278b0fe9
#! /bin/sh
#
# urandom This script saves the random seed between reboots.
# It is called from the boot, halt and reboot scripts.
#
# Version: @(#)urandom 1.33 22-Jun-1998 miquels@cistron.nl
#
[
-c
/dev/urandom
]
||
exit
0
#. /etc/default/rcS
case
"
$1
"
in
start|
""
)
if
[
"
$VERBOSE
"
!=
no
]
then
echo
-n
"Initializing random number generator... "
fi
# Load and then save 512 bytes,
# which is the size of the entropy pool
if
[
-f
/etc/random-seed
]
then
cat
/etc/random-seed
>
/dev/urandom
fi
# check for read only file system
if
!
touch
/etc/random-seed 2>/dev/null
then
echo
"read-only file system detected...done"
exit
fi
rm
-f
/etc/random-seed
umask
077
dd
if
=
/dev/urandom
of
=
/etc/random-seed
count
=
1
\
>
/dev/null 2>&1
||
echo
"urandom start: failed."
umask
022
[
"
$VERBOSE
"
!=
no
]
&&
echo
"done."
;;
stop
)
if
!
touch
/etc/random-seed 2>/dev/null
then
exit
fi
# Carry a random seed from shut-down to start-up;
# see documentation in linux/drivers/char/random.c
[
"
$VERBOSE
"
!=
no
]
&&
echo
-n
"Saving random seed... "
umask
077
dd
if
=
/dev/urandom
of
=
/etc/random-seed
count
=
1
\
>
/dev/null 2>&1
||
echo
"urandom stop: failed."
[
"
$VERBOSE
"
!=
no
]
&&
echo
"done."
;;
*
)
echo
"Usage: urandom {start|stop}"
>
&2
exit
1
;;
esac
userspace/rootfs_override/etc/init.d/S40network
0 → 100755
View file @
278b0fe9
#!/bin/sh
#
# Start the network....
#
udhcpc
userspace/rootfs_override/etc/init.d/S50dropbear
0 → 100755
View file @
278b0fe9
#!/bin/sh
#
# Starts dropbear sshd.
#
# Make sure the dropbearkey progam exists
[
-f
/usr/bin/dropbearkey
]
||
exit
0
start
()
{
echo
-n
"Starting dropbear sshd: "
# Make sure dropbear directory exists
if
[
!
-d
/etc/dropbear
]
;
then
mkdir
-p
/etc/dropbear
fi
# Check for the Dropbear RSA key
if
[
!
-f
/etc/dropbear/dropbear_rsa_host_key
]
;
then
echo
-n
"generating rsa key... "
/usr/bin/dropbearkey
-t
rsa
-f
/etc/dropbear/dropbear_rsa_host_key
>
/dev/null 2>&1
fi
# Check for the Dropbear DSS key
if
[
!
-f
/etc/dropbear/dropbear_dss_host_key
]
;
then
echo
-n
"generating dsa key... "
/usr/bin/dropbearkey
-t
dss
-f
/etc/dropbear/dropbear_dss_host_key
>
/dev/null 2>&1
fi
umask
077
start-stop-daemon
-S
-q
-p
/var/run/dropbear.pid
--exec
/usr/sbin/dropbear
echo
"OK"
}
stop
()
{
echo
-n
"Stopping dropbear sshd: "
start-stop-daemon
-K
-q
-p
/var/run/dropbear.pid
echo
"OK"
}
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/init.d/S60wrsw_hal
0 → 100755
View file @
278b0fe9
#!/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/init.d/rcS
0 → 100755
View file @
278b0fe9
#!/bin/sh
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for
i
in
/etc/init.d/S??
*
;
do
# Ignore dangling symlinks (if any).
[
!
-f
"
$i
"
]
&&
continue
case
"
$i
"
in
*
.sh
)
# Source shell script for speed.
(
trap
- INT QUIT TSTP
set
start
.
$i
)
;;
*
)
# No sh extension, so fork subprocess.
$i
start
;;
esac
done
userspace/rootfs_override/etc/inittab
0 → 100644
View file @
278b0fe9
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# 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
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Set up a couple of getty's
#tty1::respawn:/sbin/getty 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2
# Put a getty on the serial port
ttyS0::respawn:/bin/ash --login
#/sbin/getty -L ttyS0 115200 vt100
# Logging junk
null::sysinit:/bin/touch /var/log/messages
null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n
tty3::respawn:/usr/bin/tail -f /var/log/messages
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a
userspace/rootfs_override/etc/issue
0 → 100644
View file @
278b0fe9
Welcome to WhiteRabbit MCH!
userspace/rootfs_override/etc/profile
0 → 100644
View file @
278b0fe9
# ~/.bashrc: executed by bash(1) for non-login interactive shells.
export PATH=\
/bin:\
/sbin:\
/usr/bin:\
/usr/sbin:\
/usr/bin/X11:\
/usr/local/bin:\
/wr/bin
export LD_LIBRARY_PATH=\
/lib:\
/usr/lib:\
/wr/lib
# If running interactively, then:
if [ "$PS1" ]; then
if [ "$BASH" ]; then
export PS1="[\u@\h \W]\\$ "
alias ll='/bin/ls --color=tty -laFh'
alias ls='/bin/ls --color=tty -F'
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
else
if [ "`id -u`" -eq 0 ]; then
export PS1='# '
else
export PS1='$ '
fi
fi
export USER=`id -un`
export LOGNAME=$USER
export HOSTNAME=`/bin/hostname`
export HISTSIZE=1000
export HISTFILESIZE=1000
export PAGER='/bin/more '
export EDITOR='/bin/vi'
export INPUTRC=/etc/inputrc
export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
### Some aliases
alias ps2='ps facux '
alias ps1='ps faxo "%U %t %p %a" '
alias af='ps af'
alias cls='clear'
alias df='df -h'
alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
#alias bc='bc -l'
alias minicom='minicom -c on'
alias calc='calc -Cd '
alias bc='calc -Cd '
fi;
userspace/rootfs_override/etc/shadow
0 → 100644
View file @
278b0fe9
root:$1$y12oP.6b$/Ds3CzM9uKLS1YwkgJ1A81:0:0:99999:7:::
bin:*:10933:0:99999:7:::
daemon:*:10933:0:99999:7:::
adm:*:10933:0:99999:7:::
lp:*:10933:0:99999:7:::
sync:*:10933:0:99999:7:::
shutdown:*:10933:0:99999:7:::
halt:*:10933:0:99999:7:::
uucp:*:10933:0:99999:7:::
operator:*:10933:0:99999:7:::
nobody:*:10933:0:99999:7:::
default::10933:0:99999:7:::
userspace/rootfs_override/wr/etc/hal_with_nic.conf
0 → 100644
View file @
278b0fe9
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/wrsw_hal.conf
0 → 100644
View file @
278b0fe9
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"
};
};
timing
= {
pps_width
=
100000
; --
PPS
pulse
width
use_external_clock
=
0
;
};
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
.
--
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
=
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
;
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
()
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