Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
98
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
e5e3a0e3
Commit
e5e3a0e3
authored
7 years ago
by
Adam Wujek
Browse files
Options
Downloads
Patches
Plain Diff
rootfs: set PTP's clockClass depending on a clock configuration
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
9def24ca
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Kconfig
+12
-0
12 additions, 0 deletions
Kconfig
doc/wrs-user-manual.in
+3
-0
3 additions, 0 deletions
doc/wrs-user-manual.in
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
+14
-0
14 additions, 0 deletions
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
with
29 additions
and
0 deletions
Kconfig
+
12
−
0
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
...
...
This diff is collapsed.
Click to expand it.
doc/wrs-user-manual.in
+
3
−
0
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
...
...
This diff is collapsed.
Click to expand it.
userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh
+
14
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment