Copyright (C) 2022, Axis Communications AB, Lund, Sweden. All Rights Reserved.
Precision Time Protocol (PTP) comes in handy in use cases where time synchronization with high precision is needed. PTP open source implementations exist, were we use ptpd2 here: this repository cross-compiles it and packages it as an Axis ACAP application.
The build procedure assumes the existence of Docker (and Internet connectivity) on the build machine.
# With the environment initialized, use:
acap-build -a ptpd2 -a ptpd2.conf .
This repository has a Makefile that wraps cross-compiling the
ptpd2
binary for the target architectures and to build for all targets,
simply type
make
or perhaps
make -j
(to build in parallel). Then you will find the built ACAP packages in the
./eap
directory upon successful build.
If you would like to build for, say, armv7hf
only, please use
make armv7hf.eap
If you do have Docker but no make
on your system:
# 32-bit ARM, e.g. ARTPEC-6- and ARTPEC-7-based devices
DOCKER_BUILDKIT=1 docker build --build-arg ARCH=armv7hf -o type=local,dest=eap .
# 64-bit ARM, e.g. ARTPEC-8-based devices
DOCKER_BUILDKIT=1 docker build --build-arg ARCH=aarch64 -o type=local,dest=eap .
Install the application like you normally do (e.g. in the target device's web UI). It will automatically start running with the default options set in ptpd2.conf. (More info about the configuration options can be found in ptpd2.conf (5).)
If you would like to alter the configuration, you will find it in the directory
/usr/local/packages/ptpd2/
on the target device. Please edit it and then
restart the ACAP for the new changes to be used.