Update comment to describe the actual check (non-empty interface option,
not section existence). Switch from 'uci -q get ... >/dev/null' to
testing the value non-empty so 'option interface ''' also fails fast
before the clock-sync wait, matching what handle_interface enforces.
Signed-off-by: Aleks Mariusz <a+git-commit@alek.cx>
Check for the 'interface' option inside a ptp_interface section rather
than just section existence, so a section uncommented without its
interface option also fails fast before the clock-sync wait.
Signed-off-by: Aleks Mariusz <a+git-commit@alek.cx>
- ptp4l.init: add fast pre-check for ptp_interface UCI sections before
the clock-sync wait, so a misconfigured box fails in milliseconds
rather than burning the full max_tries budget inside rcS
- ptp4l.init: fix Waiting... progress line when clock_sync_max_tries
is 0 (was rendering as '3/0'; now shows 'attempt N, unlimited')
- ptp4l.init, phc2sys.init: downgrade 'not configured' log messages
from err to notice; an unconfigured package is expected state, not
a fault
- linuxptp.config: replace '~2 min' with the actual formula
(clock_sync_check_interval x (tries - 1)) so the comment stays
accurate when either knob is changed
Signed-off-by: Aleks Mariusz <a+git-commit@alek.cx>
- ptp4l.init: bound wait_disciplined with clock_sync_max_tries (default
8 attempts, ~2 min) so a server-role device with no time source does
not stall rcS indefinitely; set to 0 to wait without limit
- ptp4l.init: validate that at least one [interface] section was written
to ptp4l.conf (by counting section headers); a config with only
[global] is now rejected with a clear error rather than launching
ptp4l into a respawn loop
- phc2sys.init: require phc_device to be explicitly configured; removes
the /dev/ptp0 default so phc2sys does not auto-start on upgrade and
slew CLOCK_REALTIME from an undisciplined PHC
- linuxptp.config: comment out the config ptp_interface section header
so the shipped default contains no load-bearing anonymous section;
validation is now in the init script rather than the config structure
- linuxptp.config: comment out phc_device so both daemons require
explicit admin opt-in before starting
- linuxptp.config: document clock_sync_max_tries option
Signed-off-by: Aleks Mariusz <a+git-commit@alek.cx>
- ptp4l.init: move procd_open_instance block to after validation so
clock-sync wait and config-generation failures actually prevent startup
- ptp4l.init: add mkdir -p for /var/etc before writing ptp4l.conf
- phc2sys.init: propagate make_cmdline failure to prevent launch with
an incomplete command line
- Both init scripts: add service_triggers() for reload_config support
- ptp4l.init: quote all variable expansions in [ ] tests
- sysclock-discipline-check.c: zero-initialise struct timex via
memset, use int main(void), drop unused stdlib.h, cast txc.status
to unsigned int for printf
- linuxptp.config: comment out the active ptp_interface/interface
option so services do not auto-start on upgrade without explicit
admin opt-in
- linuxptp.config: comment out active list extra_args and document
clock_sync_check_interval and ptp4l extra_args options
- Fix typos: exitting->exiting, syncronized->synchronized
- ptp4l stop_service: remove generated config file on stop
Signed-off-by: Aleks Mariusz <a+git-commit@alek.cx>
This adds configuration and init scripts for ptp4l and phc2sys, the
daemons included with the linuxptp package.
A helper utility (sysclock-discipline-check) delays ptp4l startup when
in 'server' mode until the kernel confirms clock accuracy. This is
critical for systems without RTC that boot with incorrect timestamps.
Signed-off-by: Aleks Mariusz <a+git-commit@alek.cx>
- Replaced SF project and download URLs with nwtime ones.
The project is now hosted at https://linuxptp.nwtime.org/.
- Removed 020-gcc14.patch. Missing include was fixed upstream
in v4.2.
- Added patch to disable MAC library autodetection. That
can silently pick up unwanted dependencies, depending on
package build order. We can add linuxptp-<mac lib> variants
of this package later if there are users of authenticated
PTP.
Signed-off-by: Shenghao Yang <me@shenghaoyang.info>
From release notes:
"This release is the first of our regular quarterly releases.
It includes a new feature (multi-domain synchronization for phc2sys)
and several minor bug fixes. Users are encouraged to upgrade."
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
Major changes since version 3.1.1:
* Officially supports the 2019 version of IEEE 1588
* Improved unicast messaging
* Enhanced G.8275.2 profile
* More flexible Pulse Per Second (PPS) handling
* Virtual clock support
* Power profile support
* VLAN over bond support.
* Parallel Redundancy Protocol (PRP) trailer handling.
* Non-privileged read-only monitoring port.
* New statistics reporting.
[V2]
* reset package release
* adapt license name to the new format
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
Build is failing because HWTSTAMP_TX_ONESTEP_P2P is defined anymore on
linux net_tstamp.h.
Moreover, the usual way of linuxptp build is looking for system includes
unless user defines differently. That also was tried to fix.
PKG_RELEASE bumped to 3.
Signed-off-by: Paulo Machado <pffmachado@yahoo.com>
It seems ever since the switch to uClibc-ng, this builds perfectly fine.
Moved PKG_MAINTAINER variable for consistency between packages.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
fix Makefile chmod (644)
replace MD5SUM with HASH
add PKG_MIRROR_HASH when PKG_SOURCE_PROTO:=git
(PKG_SOURCE_PROTO:=svn tarballs are not reproducible for now)
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
This backports a patch that has been accepted upstream in linuxptp:
8b61aa2c3f3103db1d4ca1d1e49bb4f8831c1abf ("udp: Avoid including
netdb.h") to fix build errors with external glibc toolchains that
provide rpc/types.h.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
The checks in the incdefs.sh script do not fully work when cross
compiling. It probably checks the hosts libc. Just provide the settings
manually, as our musl at least supports all these features.
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
In file included from print.h:25:0,
from linreg.c:24:
util.h:364:32: error: unknown type name 'time_t'
int rate_limited(int interval, time_t *last);
^
Signed-off-by: Stephen Walker <stephendwalker+github@gmail.com>
Linuxptp is a user space software implementation of IEEE 1588
Precision Time Protocol standard.
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Reviewed-by: John Crispin<blogic@openwrt.org>