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
e5e3a0e3
Commit
e5e3a0e3
authored
Aug 04, 2017
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rootfs: set PTP's clockClass depending on a clock configuration
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
9def24ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
Kconfig
Kconfig
+12
-0
wrs-user-manual.in
doc/wrs-user-manual.in
+3
-0
assembly_ppsi_conf.sh
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
+14
-0
No files found.
Kconfig
View file @
e5e3a0e3
...
...
@@ -627,6 +627,10 @@ config TIME_GM
This options selects the White Rabbit Switch as a grandmaster,
i.e. it uses its input channels to track an Atomic or GPS and
claim to be a PTP authoritative source on the network.
The clockClass is set to 6 which designates a clock that is
synchronized to a primary reference time source.
The value of the clockClass can be overridden by the user in
a separate configuration parameter (CONFIG_PTP_OPT_CLOCK_CLASS).
config TIME_FM
bool "Free-Running Master"
...
...
@@ -634,6 +638,11 @@ config TIME_FM
The White Rabbit Switch pretends to be a master on his PTP
network, but it doesn't sync to an external source. Its own
internal clocks and counters are used to drive timing.
The clockClass is set to 52 which designates a clock that shall not
be a slave to another clock i the domain.
The value of the clockClass can be overridden by the user in
a separate configuration parameter (CONFIG_PTP_OPT_CLOCK_CLASS).
config TIME_BC
bool "Boundary Clock"
...
...
@@ -641,6 +650,9 @@ config TIME_BC
The White Rabbit Switch is a normal PTP Boundary Clock: it is
slave on one of its ports and master on the other ones, according
to the standard Best Master Clock algorithm.
The clockClass is set to 248 which is the default clockClass.
The value of the clockClass can be overridden by the user in
a separate configuration parameter (CONFIG_PTP_OPT_CLOCK_CLASS).
endchoice
...
...
doc/wrs-user-manual.in
View file @
e5e3a0e3
...
...
@@ -805,6 +805,9 @@ appropriate way, before the respective service is started.
external reference; or a normal ``boundary-clock'' (BC) device that
is slave on some ports and master on other ports.
The PTP's clockClass is set based on which option is selected.
For the GM the clockClass is 6, for the FM is 52, for the BC is 248.
@item CONFIG
_
PTP
_
PORT
_
PARAMS
@itemx CONFIG
_
PTP
_
CUSTOM
@itemx CONFIG
_
PTP
_
REMOTE
_
CONF
...
...
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
View file @
e5e3a0e3
...
...
@@ -21,8 +21,19 @@ echo "# This file will be overwritten at next boot." >> $OUTPUT_FILE
#copy top of ppsi.conf
cat
$PRE_FILE
>>
$OUTPUT_FILE
if
[
-n
"
$CONFIG_PTP_OPT_CLOCK_CLASS
"
]
;
then
echo
clock-class
"
$CONFIG_PTP_OPT_CLOCK_CLASS
"
>>
$OUTPUT_FILE
else
if
[
"
$CONFIG_TIME_GM
"
=
"y"
]
;
then
echo
clock-class 6
>>
$OUTPUT_FILE
fi
if
[
"
$CONFIG_TIME_FM
"
=
"y"
]
;
then
echo
clock-class 52
>>
$OUTPUT_FILE
fi
if
[
"
$CONFIG_TIME_BC
"
=
"y"
]
;
then
echo
clock-class 248
>>
$OUTPUT_FILE
fi
fi
if
[
-n
"
$CONFIG_PTP_OPT_CLOCK_ACCURACY
"
]
;
then
...
...
@@ -52,6 +63,9 @@ if [ -n "$CONFIG_PTP_OPT_PRIORITY2" ]; then
echo
priority2
"
$CONFIG_PTP_OPT_PRIORITY2
"
>>
$OUTPUT_FILE
fi
# 2 new lines
echo
-n
-e
"
\n\n
"
>>
$OUTPUT_FILE
for
i_zero
in
{
01..18
}
;
do
# unset parametes
unset
p_name
...
...
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