Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
From a621d8ee2a27ba44845f5232a3b2bf9b581623b1 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>
[Julien: rebased patch on version 2.7]
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
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 c5c3389..5ae1dd9 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -51,7 +51,7 @@
#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.45.2

View File

@@ -0,0 +1,50 @@
From 17ec1bce74419f8193c0246dbde2d2fdd6b1b4e3 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
[Julien: rebased patch on version 2.7]
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Makefile | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Makefile b/Makefile
index f656e34..1206f40 100644
--- a/Makefile
+++ b/Makefile
@@ -52,11 +52,6 @@ else
$(warning libcpupower disabled, building without --deepest-idle-state support.)
endif
-# 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.47.0

View File

@@ -0,0 +1,57 @@
From 280e198c39d1b17d0491d7c4e7afda97ae6c8e6f Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Wed, 29 Jan 2025 16:46:11 -0500
Subject: [PATCH] Fix rt-tests build with glibc-2.41
The sched_*attr APIs were added to glibc
https://sourceware.org/git/?p=glibc.git;a=commit;h=21571ca0d70302909cf72707b2a7736cf12190a0
This fixes the build conflict in rt-tests with glibc-2.4
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Upstream: https://web.git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/commit/?id=d3a23a0cc76789c3083df3bad78982cd49bc4c5e
Signed-off-by: Brandon Lumbra <brandon.lumbra@sense.com>
---
src/include/rt-sched.h | 2 ++
src/lib/rt-sched.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/include/rt-sched.h b/src/include/rt-sched.h
index 80171c76e0ee..dfd7f45f51cc 100644
--- a/src/include/rt-sched.h
+++ b/src/include/rt-sched.h
@@ -42,6 +42,7 @@
#define __NR_sched_getattr 275
#endif
+#if ! __GLIBC_PREREQ(2, 41)
struct sched_attr {
uint32_t size;
uint32_t sched_policy;
@@ -67,5 +68,6 @@ int sched_getattr(pid_t pid,
struct sched_attr *attr,
unsigned int size,
unsigned int flags);
+#endif
#endif /* __RT_SCHED_H__ */
diff --git a/src/lib/rt-sched.c b/src/lib/rt-sched.c
index 8023bc70c473..2500abde26e4 100644
--- a/src/lib/rt-sched.c
+++ b/src/lib/rt-sched.c
@@ -14,6 +14,7 @@
#include "rt-sched.h"
+#if ! __GLIBC_PREREQ(2, 41)
int sched_setattr(pid_t pid,
const struct sched_attr *attr,
unsigned int flags)
@@ -28,3 +29,4 @@ int sched_getattr(pid_t pid,
{
return syscall(__NR_sched_getattr, pid, attr, size, flags);
}
+#endif
--
2.47.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 13190fda63fae640a354d3378c16030f1bd4c243e514515810145dd9d1ae16d8 rt-tests-2.8.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/older
RT_TESTS_SOURCE = rt-tests-$(RT_TESTS_VERSION).tar.xz
RT_TESTS_VERSION = 2.8
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))