[Mod] First commit

This commit is contained in:
2022-10-31 22:18:58 +08:00
commit 1c8a3d9709
13090 changed files with 526733 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From 21e0c16a85c2e028a963703511d750d1751bc254 Mon Sep 17 00:00:00 2001
From: Alexey Brodkin <abrodkin@synopsys.com>
Date: Wed, 13 Jul 2016 23:46:38 +0200
Subject: [PATCH] Fix a build issue with uClibc-ng
uClibc-ng has clock_nanosleep() if built with UCLIBC_HAS_ADVANCED_REALTIME,
conflicting with emulation function.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Romain:
rebase on v1.0
remove uClibc legacy support, uClibc-ng provide utmpx.h]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
src/cyclictest/cyclictest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 00e5f3d..92fa3dd 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -58,7 +58,7 @@
#define gettid() syscall(__NR_gettid)
#define sigev_notify_thread_id _sigev_un._tid
-#ifdef __UCLIBC__
+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_ADVANCED_REALTIME__)
#define MAKE_PROCESS_CPUCLOCK(pid, clock) \
((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
#define CPUCLOCK_SCHED 2
--
2.5.5

View File

@ -0,0 +1,48 @@
From 84fea5d784e010f84c860b34e55ea2c855c17b3b Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Wed, 12 May 2021 09:18:33 +0200
Subject: [PATCH] Makefile: drop explicit undefine PYLIB for compatibility with
make 3.81
GNU make 3.81 does not like the explicit tab-indented undefine:
Makefile:41: *** commands commence before first target. Stop.
Dropping the indentation also doesn't work:
Makefile:41: *** missing separator. Stop.
So simply drop the undefine logic. As explained in the GNU make manual,
undefine is not commonly needed as E.G. ifdef checks for a non-zero string:
https://www.gnu.org/software/make/manual/html_node/Undefine-Directive.html
https://www.gnu.org/software/make/manual/html_node/Conditional-Syntax.html
Fixes:
http://autobuild.buildroot.net/results/cf7c4f360f5464c700788cc8299fd086544c80e8/build-end.log
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Upstream: https://marc.info/?l=linux-rt-users&m=162080462211139&w=2]
---
Makefile | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Makefile b/Makefile
index b17ac09..ec85ac8 100644
--- a/Makefile
+++ b/Makefile
@@ -36,11 +36,6 @@ LDFLAGS ?=
PYLIB ?= $(shell python3 -c 'import distutils.sysconfig; print (distutils.sysconfig.get_python_lib())')
-# Check for errors, such as python3 not available
-ifeq (${PYLIB},)
- undefine PYLIB
-endif
-
MANPAGES = src/cyclictest/cyclictest.8 \
src/pi_tests/pi_stress.8 \
src/ptsematest/ptsematest.8 \
--
2.20.1

View File

@ -0,0 +1,39 @@
config BR2_PACKAGE_RT_TESTS
bool "rt-tests"
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_*_4 intrisics
depends on BR2_TOOLCHAIN_HAS_ATOMIC # numactl
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
depends on BR2_USE_MMU # fork(), numactl
depends on !BR2_STATIC_LIBS # dlopen
depends on !BR2_TOOLCHAIN_USES_MUSL # cyclictest
select BR2_PACKAGE_NUMACTL
help
Set of utilities for testing the real-time behaviour of a
Linux system.
All tools are simple C programs with no dependencies, except
the hwlatdetect utility, which is a Python script and
therefore requires the Python interpreter. It will only be
installed if a Python interpreter has been selected in the
Buildroot configuration.
Note that this package requires a toolchain built with the
NPTL implementation of the pthread API (this is always the
case with glibc toolchains, but may not necessarily be the
case with uClibc toolchains, since the thread implementation
is configurable).
https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/rt-tests
comment "rt-tests may not work on MIPS with an external uClibc toolchain"
depends on BR2_PACKAGE_RT_TESTS
depends on BR2_TOOLCHAIN_EXTERNAL_UCLIBC
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
comment "rt-tests needs a uClibc or glibc toolchain w/ NPTL, headers >= 4.5, dynamic library"
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
|| BR2_TOOLCHAIN_USES_MUSL || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
depends on BR2_USE_MMU

View File

@ -0,0 +1,4 @@
# From https://mirrors.edge.kernel.org/pub/linux/utils/rt-tests/sha256sums.asc
sha256 b5e7959bcb5c703b2743030751af975ea4e04962e29fc1118f4b605987585735 rt-tests-2.3.tar.xz
# locally computed hash
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING

View File

@ -0,0 +1,31 @@
################################################################################
#
# rt-tests
#
################################################################################
RT_TESTS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/rt-tests
RT_TESTS_SOURCE = rt-tests-$(RT_TESTS_VERSION).tar.xz
RT_TESTS_VERSION = 2.3
RT_TESTS_LICENSE = GPL-2.0+
RT_TESTS_LICENSE_FILES = COPYING
RT_TESTS_DEPENDENCIES = numactl
RT_TESTS_CPE_ID_VENDOR = kernel
define RT_TESTS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
prefix=/usr
endef
define RT_TESTS_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
DESTDIR="$(TARGET_DIR)" \
prefix=/usr \
PYLIB="$(if $(BR2_PACKAGE_PYTHON3),/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/)" \
install
endef
$(eval $(generic-package))