{"id":28995078,"url":"https://github.com/axiscommunications/ptpd2-acap","last_synced_at":"2026-02-13T03:09:15.058Z","repository":{"id":43792993,"uuid":"415980570","full_name":"AxisCommunications/ptpd2-acap","owner":"AxisCommunications","description":"Builds and packages the ptpd2 server into an ACAP for smooth deployment on an Axis device.","archived":false,"fork":false,"pushed_at":"2025-03-06T12:02:00.000Z","size":50,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T06:47:04.557Z","etag":null,"topics":["acap","axis","industry-4","industry-40","ptp"],"latest_commit_sha":null,"homepage":"https://www.axis.com/developer-community/industry-4-0-integration","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AxisCommunications.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-10-11T15:16:11.000Z","updated_at":"2025-03-06T12:02:04.000Z","dependencies_parsed_at":"2024-02-27T14:45:38.085Z","dependency_job_id":null,"html_url":"https://github.com/AxisCommunications/ptpd2-acap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AxisCommunications/ptpd2-acap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fptpd2-acap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fptpd2-acap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fptpd2-acap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fptpd2-acap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AxisCommunications","download_url":"https://codeload.github.com/AxisCommunications/ptpd2-acap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fptpd2-acap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274488719,"owners_count":25294779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acap","axis","industry-4","industry-40","ptp"],"created_at":"2025-06-25T04:06:28.620Z","updated_at":"2026-02-13T03:09:15.053Z","avatar_url":"https://github.com/AxisCommunications.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"*Copyright (C) 2022, Axis Communications AB, Lund, Sweden. All Rights Reserved.*\n\n# Precision Time Protocol daemon ACAP\n\n[![Build ACAP packages](https://github.com/AxisCommunications/ptpd2-acap/actions/workflows/build.yml/badge.svg)](https://github.com/AxisCommunications/ptpd2-acap/actions/workflows/build.yml)\n[![GitHub Super-Linter](https://github.com/AxisCommunications/ptpd2-acap/actions/workflows/super-linter.yml/badge.svg)](https://github.com/AxisCommunications/ptpd2-acap/actions/workflows/super-linter.yml)\n\n[Precision Time Protocol](https://en.wikipedia.org/wiki/Precision_Time_Protocol)\n(PTP) comes in handy in use cases where time synchronization with high\nprecision is needed. As of\n[AXIS OS 12.7](https://help.axis.com/en-us/axis-os-release-notes#axis-os-12-7),\nPTP is a standard feature in AXIS OS, but for devices running\n[AXIS OS LTS 2024 11.11](https://help.axis.com/en-us/axis-os) or older this\nrepository enables PTP functionality using\n[ACAP](https://www.axis.com/products/acap)\nto cross-compile and package\nthe open source PTP implementation\n[ptpd2](https://sourceforge.net/projects/ptpd2/).\n\n\u003e [!NOTE]\n\u003e The ptpd2 implementation does a startup check to explicitly make sure it is\n\u003e run as the *root* user\n\u003e ([startup.c#L748-L753](https://github.com/ptpd/ptpd/blob/42f68d8818304e0bc3873550317c9b302d4efff6/src/dep/startup.c#L748-L753)),\n\u003e which is not supported in AXIS OS 12 and later after the\n\u003e *[root removal](https://help.axis.com/en-us/axis-os-release-notes#axis-os-12)*.  \n\u003e *Since these newer versions already have PTP, you wouldn't need to install the\n\u003e ptpd2 ACAP package anyway. However, this repo is still a valid example of how\n\u003e to cross-compile and package other programs with ACAP, as long as they do not\n\u003e need to be run as root.*\n\n## Prerequisites\n\nThe build procedure assumes the existence of [Docker](https://www.docker.com/)\nor [Podman](https://podman.io/) (and Internet connectivity) on the build machine.\n\n## Build\n\n### On host with ACAP SDK installed\n\n```sh\n# With the environment initialized, use:\nacap-build -a ptpd2 -a ptpd2.conf .\n```\n\n### Using ACAP SDK build container and Docker (or Podman)\n\nThis repository has a [Makefile](Makefile) that wraps cross-compiling the\n`ptpd2` binary for the target architectures and to build for all targets,\nsimply type\n\n```sh\nmake\n```\n\nor perhaps\n\n```sh\nmake -j\n```\n\n(to build in parallel). Then you will find the built ACAP packages in the\n`./eap` directory upon successful build.\n\nIf you would like to build for, say, `armv7hf` *only*, please use\n\n```sh\nmake armv7hf.eap\n```\n\nThe Makefile has Docker as the default container runtime. If you would like to\nuse Podman instead, use the environment variable `CONTAINER_RUNTIME=podman`:\n\n```sh\nCONTAINER_RUNTIME=podman make\n```\n\nor\n\n```sh\nCONTAINER_RUNTIME=podman make -j\n```\n\nIf you do have Docker but no `make` on your system:\n\n```sh\n# 32-bit ARM, e.g. ARTPEC-6- and ARTPEC-7-based devices\nDOCKER_BUILDKIT=1 docker build --build-arg ARCH=armv7hf -o type=local,dest=eap .\n# 64-bit ARM, e.g. ARTPEC-8- and ARTPEC-9-based devices\nDOCKER_BUILDKIT=1 docker build --build-arg ARCH=aarch64 -o type=local,dest=eap .\n```\n\nIf you do have Podman but no `make` on your system:\n\n```sh\n# 32-bit ARM, e.g. ARTPEC-6- and ARTPEC-7-based devices\npodman build --build-arg ARCH=armv7hf -o type=local,dest=eap .\n# 64-bit ARM, e.g. ARTPEC-8- and ARTPEC-9-based devices\npodman build --build-arg ARCH=aarch64 -o type=local,dest=eap .\n```\n\n## Running\n\nInstall the application like you normally do (e.g. in the target device's web UI).\nIt will automatically start running with the default options set in\n[ptpd2.conf](ptpd2.conf). (More info about the configuration options can be\nfound in [ptpd2.conf (5)](https://www.systutorials.com/docs/linux/man/5-ptpd2.conf/).)\n\nIf you would like to alter the configuration, you will find it in the directory\n`/usr/local/packages/ptpd2/` on the target device. Please edit it and then\nrestart the ACAP for the new changes to be used.\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fptpd2-acap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxiscommunications%2Fptpd2-acap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fptpd2-acap/lists"}