Skip to content

Builds and packages the ptpd2 server into an ACAP for smooth deployment on an Axis device.

License

Notifications You must be signed in to change notification settings

AxisCommunications/ptpd2-acap

Copyright (C) 2022, Axis Communications AB, Lund, Sweden. All Rights Reserved.

Precision Time Protocol daemon ACAP

Build ACAPs GitHub Super-Linter

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.

Prerequisites

The build procedure assumes the existence of Docker (and Internet connectivity) on the build machine.

Build

On host with ACAP SDK installed

# With the environment initialized, use:
acap-build -a ptpd2 -a ptpd2.conf .

Using ACAP SDK build container and Docker

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 .

Running

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.

License

Apache 2.0