Commit 50372a37 authored by Alessandro Rubini's avatar Alessandro Rubini

Merge branch 'ppsi-stuff'

parents c48988ce b0c99833
[submodule "userspace/ptp-noposix"]
path = userspace/ptp-noposix
url = git://ohwr.org/white-rabbit/ppsi/ptp-noposix.git
[submodule "userspace/mini-rpc"] [submodule "userspace/mini-rpc"]
path = userspace/mini-rpc path = userspace/mini-rpc
url = git://github.com/a-rubini/mini-rpc.git url = git://github.com/a-rubini/mini-rpc.git
......
...@@ -15,24 +15,9 @@ config BR2_CONFIGFILE ...@@ -15,24 +15,9 @@ config BR2_CONFIGFILE
scripts print a warning and use the default file. Incorrect scripts print a warning and use the default file. Incorrect
files lead to unpredicatable results. files lead to unpredicatable results.
choice
prompt "PTP daemon implementation"
config PTP_NOPOSIX
bool "Use ptp-noposix daemon"
help
This implementation is being phased out, because it became
unmaintainable over time. However, it is still the default
at this point in time, because it has been tested and used
for a long time.
config PPSI config PPSI
bool "Use PPSi daemon" bool "Use PPSi daemon"
help default y
PPSi (PTP Ported to Silicon) is the new implementation, which
is already the default PTP run in the White Rabbit node.
endchoice
menu "Local configuration" menu "Local configuration"
......
...@@ -9,23 +9,14 @@ fi ...@@ -9,23 +9,14 @@ fi
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR CROSS_COMPILE wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR CROSS_COMPILE
# This step is controlled by Kconfig: skip it if not selected
if [ "x$CONFIG_PTP_NOPOSIX" != "x" ]; then
old_ptp=true; new_ptp=false
ptpname="ptp-noposix"
fi
if [ "x$CONFIG_PPSI" != "x" ]; then
old_ptp=false; new_ptp=true
ptpname="ppsi"
fi
wrs_echo "--- PTP daemon ($ptpname repository as a submodule)" wrs_echo "--- PTP daemon (ppsi repository as a submodule)"
# checkout, in case the user didn't do that # checkout, in case the user didn't do that
cd ${WRS_BASE_DIR}/.. cd ${WRS_BASE_DIR}/..
git submodule init -q git submodule init -q
git submodule update -q git submodule update -q
cd userspace/$ptpname cd userspace/ppsi
make clean make clean
# we need LINUX and CROSS_COMPILE. The latter is there for sure # we need LINUX and CROSS_COMPILE. The latter is there for sure
...@@ -34,19 +25,8 @@ if [ "x$LINUX" == "x" ]; then ...@@ -34,19 +25,8 @@ if [ "x$LINUX" == "x" ]; then
fi fi
if [ $ptpname = ppsi ]; then make clean
make clean make wrs_defconfig
make wrs_defconfig make CROSS_COMPILE=$CROSS_COMPILE || wrs_die "Failure building PPSi"
make CROSS_COMPILE=$CROSS_COMPILE || wrs_die "Failure building PPSi" install -d "$WRS_OUTPUT_DIR/images/wr/bin"
install -d "$WRS_OUTPUT_DIR/images/wr/bin" install ppsi "$WRS_OUTPUT_DIR/images/wr/bin"
install ppsi "$WRS_OUTPUT_DIR/images/wr/bin"
else
make || wrs_die "Failure building $ptpname"
install -d "$WRS_OUTPUT_DIR/images/wr/bin"
install -d "$WRS_OUTPUT_DIR/images/wr/lib"
install -d "$WRS_OUTPUT_DIR/images/wr/include"
install ptpd "$WRS_OUTPUT_DIR/images/wr/bin"
install libptpnetif.a "$WRS_OUTPUT_DIR/images/wr/lib"
install libptpnetif/ptpd_netif.h "$WRS_OUTPUT_DIR/images/wr/include"
install libptpnetif/hal_client.h "$WRS_OUTPUT_DIR/images/wr/include"
fi
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# #
CONFIG_BR2_CONFIGFILE="wrs_release_br2_config" CONFIG_BR2_CONFIGFILE="wrs_release_br2_config"
# CONFIG_PTP_NOPOSIX is not set
CONFIG_PPSI=y CONFIG_PPSI=y
# #
......
...@@ -755,16 +755,14 @@ Currently, the package includes the following modules: ...@@ -755,16 +755,14 @@ Currently, the package includes the following modules:
@node PTPd @node PTPd
@subsection PTPd @subsection PTPd
Configuration supports two different PTP engines: either @t{ptp-noposix} Configuration used to support two different PTP engines, but now
(default at this point in time) or PPSi. The latter is we only support PPSi.
the default choice, and will later be the only choice, as we phase
out the former implementation.
Both implementations are hosted in their own respective different The code is hosted in its own
repository; both are registered as @i{git} submodules in this package. repository; it is a @i{git} submodules in this package.
The repositories are hosted on @code{ohwr}, like others. The repository is hosted on @code{ohwr}, like others.
A plain @i{make} in either @i{userspace/ptp-noposix} or A plain @i{make} in
@t{userspace/ppsi} will likely fail, because of @t{userspace/ppsi} will likely fail, because of
missing environment variables. missing environment variables.
......
...@@ -260,12 +260,6 @@ items. ...@@ -260,12 +260,6 @@ items.
@itemize @bullet @itemize @bullet
@item We should remove @i{ptp-noposix}. Keeping it around brings a number
of issues; mainly it prevents changes in WR libraries. That's because
any change and cleanup must now be verified against both PPSi and
@i{ptp-noposix}. But the latter is not being used routinely, so those
changes require extra effort and remain not very well tested anyways.
@item PPSi support for @t{arch-wrs} has some strange use for the timeouts, @item PPSi support for @t{arch-wrs} has some strange use for the timeouts,
and some of the code is more complex than it should. I need to audit and some of the code is more complex than it should. I need to audit
it and make it shine. This applies to both the WR servo and the it and make it shine. This applies to both the WR servo and the
...@@ -273,10 +267,6 @@ it and make it shine. This applies to both the WR servo and the ...@@ -273,10 +267,6 @@ it and make it shine. This applies to both the WR servo and the
after fixing the lost-frame problem. Still, some time must be devoted after fixing the lost-frame problem. Still, some time must be devoted
to this. to this.
@item We should drive the WR PLL when being slave to a non-WR master.
The performance of wr-switch as a slave of another PTP host is now
unacceptable, because we only jump time without adjusting frequency.
@item PPSi should be able to rescan its configuration file. This is needed @item PPSi should be able to rescan its configuration file. This is needed
to allow management actors to change the configuration and see it to allow management actors to change the configuration and see it
effective soon after. effective soon after.
......
...@@ -161,14 +161,6 @@ The following configuration options are available ...@@ -161,14 +161,6 @@ The following configuration options are available
@t{configs/buildroot} directory; an absolute pathname is used @t{configs/buildroot} directory; an absolute pathname is used
unchanged. unchanged.
@c FIXME: remove noposix option
@item CONFIG_PTP_NOPOSIX
@itemx CONFIG_PPSI
Users can select one of these options, to build with one or the other
flavour of @sc{wr-ptp}. PPSi is the default choice, and
@i{ptp-noposix} is scheduled for removal in a later release.
@item CONFIG_NTP_SERVER @item CONFIG_NTP_SERVER
The NTP server used to prime White Rabbit time, at system boot. The NTP server used to prime White Rabbit time, at system boot.
......
ppsi @ 4c8ddedf
Subproject commit 3a0780456abd484509c39dfdf2e8a949e1486864 Subproject commit 4c8ddedfa4028fecd548721cf943d266c29b1179
ptp-noposix @ b426591a
Subproject commit b426591a40158a0f039e02716ff8f9aa95973271
...@@ -29,11 +29,6 @@ export WR_HOME="/wr" ...@@ -29,11 +29,6 @@ export WR_HOME="/wr"
eval $WR_HOME/bin/wrsw_hal -c $WR_HOME/etc/wrsw_hal.conf $LOGPIPE_HAL \& eval $WR_HOME/bin/wrsw_hal -c $WR_HOME/etc/wrsw_hal.conf $LOGPIPE_HAL \&
eval $WR_HOME/bin/wrsw_rtud $LOGPIPE_RTU \& eval $WR_HOME/bin/wrsw_rtud $LOGPIPE_RTU \&
# run ptp-noposix or ppsi, whatever is installed
if [ -x $WR_HOME/bin/ptpd ]; then
eval $WR_HOME/bin/ptpd -A -c $LOGPIPE_PTP \&
exit 0
fi
if [ ! -x $WR_HOME/bin/ppsi ]; then if [ ! -x $WR_HOME/bin/ppsi ]; then
echo "No WR-PTP daemon found" >&2 echo "No WR-PTP daemon found" >&2
exit 1 exit 1
...@@ -48,4 +43,6 @@ for i in $(seq 1 10); do ...@@ -48,4 +43,6 @@ for i in $(seq 1 10); do
done done
eval $WR_HOME/bin/ppsi $LOGPIPE_PTP \& eval $WR_HOME/bin/ppsi $LOGPIPE_PTP \&
# ensure we receive UDP PTP frames, since ppsi supports UDP too.
(sleep 4; $WR_HOME/bin/rtu_stat add 01:00:5e:00:01:81 18 0) &
...@@ -29,7 +29,6 @@ CFLAGS = -O2 -g -Wall \ ...@@ -29,7 +29,6 @@ CFLAGS = -O2 -g -Wall \
-I../wrsw_rtud \ -I../wrsw_rtud \
-I../mini-rpc \ -I../mini-rpc \
-I../libsdb \ -I../libsdb \
-I../ptp-noposix/PTPWRd \
-I../include -I../include
ifdef WRS_TOOLS_DEBUG ifdef WRS_TOOLS_DEBUG
......
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