Commit graph

13 commits

Author SHA1 Message Date
Artem Panfilov 1ab26a8264 package/linuxptp: fix build with new headers
net_tstamp.h in recent kernel versions requires time.h for clockid_t.

Fixes:
  http://autobuild.buildroot.net/results/93903e8abfeaa7df0b6525033fa63e29f2c9e7ae

Signed-off-by: Artem Panfilov <panfilov.artyom@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-05-27 00:04:36 +02:00
Matt Weber 590e9e05b6 packages: update sysv S* scripts to 644
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-08 11:35:22 +01:00
Fabrice Fontaine 9226efda76 package/linuxptp: bump to version 2.0
Add hash for license file

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-24 11:12:47 +01:00
Petr Kulhavy 85519fc692 package: linuxptp: enhance systemd service
linuxptp now pulls in the time-sync.target, which other services can
use to make sure they have a valid time before starting.

phc2sys (linuxptp-system-clock.service) starts after ptp4l
(linuxptp.service) so we have a valid time before writing it to the
hardware clock.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2018-10-21 23:02:24 +01:00
Thomas Petazzoni ae2cae70b8 linuxptp: add patch to fix no-thread/linuxthreads uClibc builds
linuxptp missing.h header implements a replacement clock_nanosleep()
function, which was used when the thread implementation was not NPTL,
because uClibc failed to provide clock_nanosleep() in such
configurations.

However, uClibc-ng has fixed this problem upstream, and has backported
this change in Buildroot in patch
package/uclibc/0002-librt-declare-clock_nanosleep-independent-of-thread-.patch
(the code is upstream and will be part of uClibc-ng 1.0.31). Due to
this, there is now a conflicting definition of clock_nanosleep()
between the C library and the linuxptp missing.h code, which manifests
itself by the following build failure:

missing.h:117:19: error: static declaration of 'clock_nanosleep' follows non-static declaration
 static inline int clock_nanosleep(clockid_t clock_id, int flags,
                   ^~~~~~~~~~~~~~~
In file included from clockadj.h:24:0,
                 from clockadj.c:24:

This commit fixes that by adding a patch that removes the replacement
clock_nanosleep() implementation from the linuxptp code base.

Fixes:

  http://autobuild.buildroot.net/results/bf400095a853f5beb28c77a50fcffefe52c3d769/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-05 15:29:56 +02:00
Petr Kulhavy a6672bb3ca package: linuxptp: bump to the latest GIT version
Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2018-01-30 23:00:22 +01:00
Petr Kulhavy 2f5dea383e linuxptp: bump to the latest version
Update Linuxptp to the latest version from 1. September 2017
This update brings bugfixes and minor enhancements.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-10 23:35:21 +02:00
Thomas Petazzoni 4b693c3c3f linuxptp: remove trailing backslashes
Thanks to Yann E. Morin for spotting these.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-06 22:00:00 +02:00
Thomas Petazzoni 3692b63fb1 linuxptp: refactor with LINUXPTP_MAKE_{ENV,OPTS} variables
Since there is quite some duplication in the variables to be passed in
the make environment and as make options between the build and install
steps, this commit introduces LINUXPTP_MAKE_ENV and LINUXPTP_MAKE_OPTS
to avoid the duplication.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-06 21:08:05 +02:00
Romain Naour 23a0f8808e package/linuxptp: set KBUILD_OUTPUT to STAGING_DIR
incdefs.sh try to define some flags with user_flags() and kernel_flags()
functions. The later is looking at the kernel headers installed on the host
when KBUILD_OUTPUT is not set. If no kernel headers are installed on the host,
the grep fail and HAVE_ONESTEP_SYNC is not set on the command line:
see: grep: /usr/include/linux/net_tstamp.h: No such file or directory
So the missing.h define HWTSTAMP_TX_ONESTEP_SYNC which is also present in the
kernel headers installed in STAGING_DIR (toolchain w/ headers >= 3.2).

Indeed KBUILD_OUTPUT is empty because it's reset in the makefile, so move
KBUILD_OUTPUT in the enviroment while calling "make"/

Also set KBUILD_OUTPUT to STAGING_DIR to find net_tstamp.h.

While at it, use the same arguments for BUILD_CMDS and
INSTALL_TARGET_CMDS.

Thanks to Yann for the live review during the Buildroot summer camp.

Fixes:
http://autobuild.buildroot.net/results/364/36470db2c262d2e1fda5144a08cfe221831e093e

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Petr Kulhavy <brain@jikos.cz>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-06 21:05:57 +02:00
Romain Naour d6a3175e83 package/linuxptp: fix coding style issue
Thanks to Yann for the live review during the Buildroot summer camp.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Petr Kulhavy <brain@jikos.cz>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-06 21:05:35 +02:00
Baruch Siach 85bf5750fe linuxptp: don't check host headers for target features
The incdefs.sh script runs ${CROSS_COMPILE}cpp to get a list of default
headers directories. Make sure CROSS_COMPILE is set correctly to avoid check
of host headers.

Also, drop the CC command line override. Upstream makefile sets CC to
$(CROSS_COMPILE)gcc.

Should fix:
http://autobuild.buildroot.net/results/394/394414df25b0b7261b27ca5d4901fde0f639e73c/
http://autobuild.buildroot.net/results/6ad/6adbc8c77c2ca70246b31600ab66b37c56c1e89e/
http://autobuild.buildroot.net/results/70d/70dfd05acc9d951169267f2820ecedb37f0711fe/

Cc: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-02 00:36:25 +02:00
Petr Kulhavy 09f1b8011b linuxptp: new package
Add the Linux PTP Project package.
http://linuxptp.sourceforge.net/

The SysV and systemd init scripts start the daemon in slave-only mode on eth0
and synchronize the system clock to PTP.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-06-11 15:57:16 +02:00