Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
From d663a483c40939bad58301c256d86da1f3da6cc0 Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Tue, 13 Nov 2018 13:16:08 +0100
|
||||
Subject: [PATCH] Fix building with new kernel headers.
|
||||
|
||||
net_tstamp.h in recent kernel versions requires time.h for clockid_t.
|
||||
|
||||
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
---
|
||||
clock.c | 2 +-
|
||||
sk.c | 1 +
|
||||
timemaster.c | 1 +
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clock.c b/clock.c
|
||||
index 9c493c3..8533b39 100644
|
||||
--- a/clock.c
|
||||
+++ b/clock.c
|
||||
@@ -17,11 +17,11 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include <errno.h>
|
||||
+#include <time.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
#include <poll.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <time.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
#include "address.h"
|
||||
diff --git a/sk.c b/sk.c
|
||||
index e2b1f28..30162eb 100644
|
||||
--- a/sk.c
|
||||
+++ b/sk.c
|
||||
@@ -18,6 +18,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include <errno.h>
|
||||
+#include <time.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
#include <linux/sockios.h>
|
||||
#include <linux/ethtool.h>
|
||||
diff --git a/timemaster.c b/timemaster.c
|
||||
index 058678f..00db59f 100644
|
||||
--- a/timemaster.c
|
||||
+++ b/timemaster.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
+#include <time.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
#include <net/if.h>
|
||||
#include <signal.h>
|
||||
@@ -1,5 +1,6 @@
|
||||
config BR2_PACKAGE_LINUXPTP
|
||||
bool "linuxptp"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
The Linux PTP Project is the Precision Time Protocol
|
||||
implementation according to IEEE standard 1588 for Linux.
|
||||
@@ -11,3 +12,6 @@ config BR2_PACKAGE_LINUXPTP
|
||||
not a goal.
|
||||
|
||||
http://linuxptp.sourceforge.net/
|
||||
|
||||
comment "linuxptp needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/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 $?
|
||||
57
buildroot/package/linuxptp/S65ptp4l
Normal file
57
buildroot/package/linuxptp/S65ptp4l
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start linuxptp
|
||||
#
|
||||
|
||||
DAEMON="ptp4l"
|
||||
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
PTP4L_ARGS="-f /etc/linuxptp.cfg"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/ptp4l" ] && . "/etc/default/ptp4l"
|
||||
|
||||
start() {
|
||||
printf "Starting linuxptp daemon: "
|
||||
start-stop-daemon -S -b -q -m -p $PIDFILE \
|
||||
-x /usr/sbin/$DAEMON -- $PTP4L_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping linuxptp daemon: "
|
||||
start-stop-daemon -K -q -p $PIDFILE
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
57
buildroot/package/linuxptp/S66phc2sys
Normal file
57
buildroot/package/linuxptp/S66phc2sys
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start linuxptp
|
||||
#
|
||||
|
||||
DAEMON="phc2sys"
|
||||
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
PHC2SYS_ARGS="-a -r -S 1.0"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/phc2sys" ] && . "/etc/default/phc2sys"
|
||||
|
||||
start() {
|
||||
printf "Starting linuxptp system clock synchronization: "
|
||||
start-stop-daemon -S -b -q -m -p $PIDFILE \
|
||||
-x /usr/sbin/$DAEMON -- $PHC2SYS_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping linuxptp system clock synchronization: "
|
||||
start-stop-daemon -K -q -p $PIDFILE
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -1,9 +1,9 @@
|
||||
# From https://sourceforge.net/projects/linuxptp/files/v2.0/
|
||||
sha1 592ca42c6146a79c1fcabed7c19fa7af4803d4f6 linuxptp-2.0.tgz
|
||||
md5 d8bb7374943bb747db7786ac26f17f11 linuxptp-2.0.tgz
|
||||
# From https://sourceforge.net/projects/linuxptp/files/v3.0/
|
||||
sha1 9a3869dbd322252c9a6bc0dbdfe8941586810a7f linuxptp-3.1.tgz
|
||||
md5 2264cb69c9af947028835c12c89a7572 linuxptp-3.1.tgz
|
||||
|
||||
# Locally computed:
|
||||
sha256 0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d linuxptp-2.0.tgz
|
||||
sha256 f58f5b11cf14dc7c4f7c9efdfb27190e43d02cf20c3525f6639edac10528ce7d linuxptp-3.1.tgz
|
||||
|
||||
# Hash for license file:
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LINUXPTP_VERSION = 2.0
|
||||
LINUXPTP_VERSION = 3.1
|
||||
LINUXPTP_SOURCE = linuxptp-$(LINUXPTP_VERSION).tgz
|
||||
LINUXPTP_SITE = http://downloads.sourceforge.net/linuxptp
|
||||
LINUXPTP_LICENSE = GPL-2.0+
|
||||
@@ -33,15 +33,17 @@ define LINUXPTP_INSTALL_TARGET_CMDS
|
||||
endef
|
||||
|
||||
define LINUXPTP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S65linuxptp \
|
||||
$(TARGET_DIR)/etc/init.d/S65linuxptp
|
||||
$(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S65ptp4l \
|
||||
$(TARGET_DIR)/etc/init.d/S65ptp4l
|
||||
$(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S66phc2sys \
|
||||
$(TARGET_DIR)/etc/init.d/S66phc2sys
|
||||
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
|
||||
$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/ptp4l.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/ptp4l.service
|
||||
$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/phc2sys.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/phc2sys.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Precision Time Protocol system clock synchronization
|
||||
After=linuxptp.service
|
||||
After=ptp4l.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0
|
||||
@@ -3,7 +3,7 @@ Description=Precision Time Protocol daemon
|
||||
After=syslog.target network.target
|
||||
Before=time-sync.target
|
||||
Wants=time-sync.target
|
||||
Wants=linuxptp-system-clock.service
|
||||
Wants=phc2sys.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg
|
||||
Reference in New Issue
Block a user