initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
From 5dab78341bd515692f1b9ff8716a911c3ebf9ee1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5dab78341bd515692f1b9ff8716a911c3ebf9ee1.1611839550.git.baruch@tkos.co.il>
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Thu, 28 Jan 2021 15:02:40 +0200
|
||||
Subject: [PATCH] sys_linux: fix build with older kernel headers
|
||||
|
||||
The renameat2 system call was introduced in kernel version 3.15. Fix
|
||||
build against older headers.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status: commit a2372b0c3abfc85d11c1684c0fb6370cc329e5c4
|
||||
|
||||
sys_linux.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/sys_linux.c b/sys_linux.c
|
||||
index 0b24445e173d..202da845edac 100644
|
||||
--- a/sys_linux.c
|
||||
+++ b/sys_linux.c
|
||||
@@ -547,7 +547,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
|
||||
SCMP_SYS(readlinkat),
|
||||
SCMP_SYS(rename),
|
||||
SCMP_SYS(renameat),
|
||||
+#ifdef __NR_renameat2
|
||||
SCMP_SYS(renameat2),
|
||||
+#endif
|
||||
SCMP_SYS(stat),
|
||||
SCMP_SYS(stat64),
|
||||
SCMP_SYS(statfs),
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_CHRONY
|
||||
bool "chrony"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
Chrony is a pair of programs which are used to maintain the
|
||||
accuracy of the system clock.
|
||||
|
||||
http://chrony.tuxfamily.org/
|
||||
|
||||
config BR2_PACKAGE_CHRONY_DEBUG_LOGGING
|
||||
bool "enable debug logging support"
|
||||
depends on BR2_PACKAGE_CHRONY
|
||||
help
|
||||
Enable support for debug logging output from Chrony when
|
||||
enabled at runtime. If disabled, code for debug logging will
|
||||
not be compiled in.
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start chrony
|
||||
|
||||
[ -r /etc/default/chrony ] && . /etc/default/chrony
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting chrony: "
|
||||
chronyd $CHRONY_ARGS && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping chrony: "
|
||||
killall chronyd && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart|reload)
|
||||
"$0" stop
|
||||
sleep 1
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
@@ -0,0 +1,4 @@
|
||||
# From https://listengine.tuxfamily.org/chrony.tuxfamily.org/chrony-announce/2020/10/msg00000.html
|
||||
sha256 be27ea14c55e7a4434b2fa51d53018c7051c42fa6a3198c9aa6a1658bae0c625 chrony-4.0.tar.gz
|
||||
# Locally calculated
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
|
||||
@@ -0,0 +1,86 @@
|
||||
################################################################################
|
||||
#
|
||||
# chrony
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CHRONY_VERSION = 4.0
|
||||
CHRONY_SITE = http://download.tuxfamily.org/chrony
|
||||
CHRONY_LICENSE = GPL-2.0
|
||||
CHRONY_LICENSE_FILES = COPYING
|
||||
CHRONY_CPE_ID_VENDOR = tuxfamily
|
||||
CHRONY_SELINUX_MODULES = chronyd
|
||||
CHRONY_DEPENDENCIES = host-pkgconf
|
||||
|
||||
CHRONY_CONF_OPTS = \
|
||||
--host-system=Linux \
|
||||
--host-machine=$(BR2_ARCH) \
|
||||
--prefix=/usr \
|
||||
--without-tomcrypt \
|
||||
$(if $(BR2_PACKAGE_CHRONY_DEBUG_LOGGING),--enable-debug,--disable-debug)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
||||
CHRONY_DEPENDENCIES += libcap
|
||||
else
|
||||
CHRONY_CONF_OPTS += --without-libcap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNSS),y)
|
||||
CHRONY_DEPENDENCIES += libnss
|
||||
else
|
||||
CHRONY_CONF_OPTS += --without-nss
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
CHRONY_CONF_OPTS += --enable-scfilter
|
||||
CHRONY_DEPENDENCIES += libseccomp
|
||||
else
|
||||
CHRONY_CONF_OPTS += --without-seccomp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBEDIT),y)
|
||||
CHRONY_DEPENDENCIES += libedit
|
||||
else
|
||||
CHRONY_CONF_OPTS += --without-editline --disable-readline
|
||||
endif
|
||||
|
||||
# If pps-tools is available, build it before so the package can use it
|
||||
# (HAVE_SYS_TIMEPPS_H).
|
||||
ifeq ($(BR2_PACKAGE_PPS_TOOLS),y)
|
||||
CHRONY_DEPENDENCIES += pps-tools
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
||||
CHRONY_DEPENDENCIES += gnutls
|
||||
else
|
||||
CHRONY_CONF_OPTS += --without-gnutls
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETTLE),y)
|
||||
CHRONY_DEPENDENCIES += nettle
|
||||
else
|
||||
CHRONY_CONF_OPTS += --without-nettle
|
||||
endif
|
||||
|
||||
define CHRONY_CONFIGURE_CMDS
|
||||
cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPTS)
|
||||
endef
|
||||
|
||||
define CHRONY_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define CHRONY_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
|
||||
endef
|
||||
|
||||
define CHRONY_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony
|
||||
endef
|
||||
|
||||
define CHRONY_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/chrony/chrony.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/chrony.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Chrony Network Time Daemon
|
||||
After=syslog.target network.target
|
||||
Conflicts=systemd-timesyncd.service
|
||||
|
||||
[Service]
|
||||
# Turn off DNSSEC validation for hostname look-ups, since those need the
|
||||
# correct time to work, but we likely won't acquire that without NTP. Let's
|
||||
# break this chicken-and-egg cycle here.
|
||||
Environment=SYSTEMD_NSS_RESOLVE_VALIDATE=0
|
||||
ExecStart=/usr/sbin/chronyd -n
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user