Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
From 947bf03ec3d9eaa0bfc0269eed86b9364e94bc1a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sun, 5 Aug 2018 15:25:53 +0200
|
||||
Subject: [PATCH] missing.h: drop clock_nanosleep() replacement
|
||||
|
||||
Since uClibc-ng commits 68628fe7d463541bf3c33da6b214e63c0cc9feed
|
||||
("librt: declare clock_nanosleep not only for NPTL") and
|
||||
ddbb03e77ac1a48740688814b82f45c97ee81f37 ("librt: clock_nanosleep
|
||||
could be even used without threads"), clock_nanosleep() is always
|
||||
provided by uClibc, regardless of the thread implementation (none,
|
||||
linuxthreads, nptl). These commits will be part of the upcoming 1.0.31
|
||||
release of uClibc-ng.
|
||||
|
||||
Thanks to this, we can drop the replacement clock_nanosleep()
|
||||
implementation added by linuxptp. Without this, linuxptp fails to
|
||||
build with:
|
||||
|
||||
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:
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
missing.h | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/missing.h b/missing.h
|
||||
index 2f7adb9..60f89a3 100644
|
||||
--- a/missing.h
|
||||
+++ b/missing.h
|
||||
@@ -129,13 +129,6 @@ enum {
|
||||
|
||||
#define TFD_TIMER_ABSTIME (1 << 0)
|
||||
|
||||
-static inline int clock_nanosleep(clockid_t clock_id, int flags,
|
||||
- const struct timespec *request,
|
||||
- struct timespec *remain)
|
||||
-{
|
||||
- return syscall(__NR_clock_nanosleep, clock_id, flags, request, remain);
|
||||
-}
|
||||
-
|
||||
static inline int timerfd_create(int clockid, int flags)
|
||||
{
|
||||
return syscall(__NR_timerfd_create, clockid, flags);
|
||||
--
|
||||
2.14.4
|
||||
|
||||
17
bsp/buildroot/package/linuxptp/Config.in
Normal file
17
bsp/buildroot/package/linuxptp/Config.in
Normal file
@@ -0,0 +1,17 @@
|
||||
config BR2_PACKAGE_LINUXPTP
|
||||
bool "linuxptp"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # clock_nanosleep()
|
||||
help
|
||||
The Linux PTP Project is the Precision Time Protocol
|
||||
implementation according to IEEE standard 1588 for Linux.
|
||||
|
||||
The dual design goals are to provide a robust implementation
|
||||
of the standard and to use the most relevant and modern
|
||||
Application Programming Interfaces (API) offered by the
|
||||
Linux kernel. Supporting legacy APIs and other platforms is
|
||||
not a goal.
|
||||
|
||||
http://linuxptp.sourceforge.net/
|
||||
|
||||
comment "linuxptp needs a toolchain w/ NPTL"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
46
bsp/buildroot/package/linuxptp/S65linuxptp
Executable file
46
bsp/buildroot/package/linuxptp/S65linuxptp
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start linuxptp
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting linuxptp daemon: "
|
||||
start-stop-daemon -S -b -q -p /var/run/linuxptp-ptp4l.pid \
|
||||
-x /usr/sbin/ptp4l -- -f /etc/linuxptp.cfg
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
|
||||
printf "Starting linuxptp system clock synchronization: "
|
||||
start-stop-daemon -S -b -q -p /var/run/linuxptp-phc2sys.pid \
|
||||
-x /usr/sbin/phc2sys -- -s eth0 -c CLOCK_REALTIME -w -S 1.0
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping linuxptp system clock synchronization: "
|
||||
start-stop-daemon -K -q -p /var/run/linuxptp-phc2sys.pid \
|
||||
-x /usr/sbin/phc2sys
|
||||
echo "OK"
|
||||
|
||||
printf "Stopping linuxptp daemon: "
|
||||
start-stop-daemon -K -q -p /var/run/linuxptp-ptp4l.pid \
|
||||
-x /usr/sbin/ptp4l
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
11
bsp/buildroot/package/linuxptp/linuxptp-system-clock.service
Normal file
11
bsp/buildroot/package/linuxptp/linuxptp-system-clock.service
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Precision Time Protocol system clock synchronization
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=linuxptp.service
|
||||
19
bsp/buildroot/package/linuxptp/linuxptp.cfg
Normal file
19
bsp/buildroot/package/linuxptp/linuxptp.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
# LinuxPTP configuration file for synchronizing the system clock to
|
||||
# a remote PTP master in slave-only mode.
|
||||
#
|
||||
# By default synchronize time in slave-only mode using UDP and hardware time
|
||||
# stamps on eth0. If the difference to master is >1.0 second correct by
|
||||
# stepping the clock instead of adjusting the frequency.
|
||||
#
|
||||
# If you change the configuration don't forget to update the phc2sys
|
||||
# parameters accordingly in linuxptp-system-clock.service (systemd)
|
||||
# or the linuxptp SysV init script.
|
||||
|
||||
[global]
|
||||
slaveOnly 1
|
||||
delay_mechanism Auto
|
||||
network_transport UDPv4
|
||||
time_stamping hardware
|
||||
step_threshold 1.0
|
||||
|
||||
[eth0]
|
||||
2
bsp/buildroot/package/linuxptp/linuxptp.hash
Normal file
2
bsp/buildroot/package/linuxptp/linuxptp.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 d0ccc4591966e21819cdc248765ebbe02456bc8ca37845eb7c23c2d1ff9bcf6b linuxptp-303b08cbf55096aba55bd08a314e0701e5c33482.tar.gz
|
||||
50
bsp/buildroot/package/linuxptp/linuxptp.mk
Normal file
50
bsp/buildroot/package/linuxptp/linuxptp.mk
Normal file
@@ -0,0 +1,50 @@
|
||||
################################################################################
|
||||
#
|
||||
# linuxptp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LINUXPTP_VERSION = 303b08cbf55096aba55bd08a314e0701e5c33482
|
||||
LINUXPTP_SITE_METHOD = git
|
||||
LINUXPTP_SITE = git://git.code.sf.net/p/linuxptp/code
|
||||
LINUXPTP_LICENSE = GPL-2.0+
|
||||
LINUXPTP_LICENSE_FILES = COPYING
|
||||
|
||||
LINUXPTP_MAKE_ENV = \
|
||||
$(TARGET_MAKE_ENV) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
KBUILD_OUTPUT=$(STAGING_DIR)
|
||||
|
||||
LINUXPTP_MAKE_OPTS = \
|
||||
prefix=/usr \
|
||||
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
EXTRA_LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
|
||||
define LINUXPTP_BUILD_CMDS
|
||||
$(LINUXPTP_MAKE_ENV) $(MAKE) $(LINUXPTP_MAKE_OPTS) -C $(@D) all
|
||||
endef
|
||||
|
||||
define LINUXPTP_INSTALL_TARGET_CMDS
|
||||
$(LINUXPTP_MAKE_ENV) $(MAKE) $(LINUXPTP_MAKE_OPTS) \
|
||||
DESTDIR=$(TARGET_DIR) -C $(@D) install
|
||||
|
||||
$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.cfg \
|
||||
$(TARGET_DIR)/etc/linuxptp.cfg
|
||||
endef
|
||||
|
||||
define LINUXPTP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S65linuxptp \
|
||||
$(TARGET_DIR)/etc/init.d/S65linuxptp
|
||||
endef
|
||||
|
||||
define LINUXPTP_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/linuxptp.service
|
||||
$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp-system-clock.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/linuxptp-system-clock.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/linuxptp.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/linuxptp.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
11
bsp/buildroot/package/linuxptp/linuxptp.service
Normal file
11
bsp/buildroot/package/linuxptp/linuxptp.service
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Precision Time Protocol daemon
|
||||
After=syslog.target network.target
|
||||
Wants=linuxptp-system-clock.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user