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,64 @@
From 4c7be1ec6ab74e973f8d18a9011fa349c3d9dd58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
Date: Mon, 2 Mar 2026 10:03:15 +0100
Subject: [PATCH] Fix build with LLVM-22
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
LLVM-22 changed the signatures of various createDiagnostics() calls [1].
Introduce a new version macro guard and adapt the code to the changed API.
Fixes #5483
[1] https://github.com/llvm/llvm-project/commit/30633f30894129919050f24fdd1f8f6bc46beae0
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Upstream: https://github.com/iovisor/bcc/commit/4c7be1ec6ab74e973f8d18a9011fa349c3d9dd58
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
src/cc/frontends/clang/loader.cc | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/cc/frontends/clang/loader.cc b/src/cc/frontends/clang/loader.cc
index 6f8387aaf017..1f706344724d 100644
--- a/src/cc/frontends/clang/loader.cc
+++ b/src/cc/frontends/clang/loader.cc
@@ -464,7 +464,10 @@ int ClangLoader::do_compile(
}
invocation0.getFrontendOpts().DisableFree = false;
-#if LLVM_VERSION_MAJOR >= 20
+#if LLVM_VERSION_MAJOR >= 22
+ compiler0.setVirtualFileSystem(llvm::vfs::getRealFileSystem());
+ compiler0.createDiagnostics(new IgnoringDiagConsumer());
+#elif LLVM_VERSION_MAJOR >= 20
compiler0.createDiagnostics(*llvm::vfs::getRealFileSystem(), new IgnoringDiagConsumer());
#else
compiler0.createDiagnostics(new IgnoringDiagConsumer());
@@ -487,7 +490,10 @@ int ClangLoader::do_compile(
add_main_input(invocation1, main_path, &*out_buf);
invocation1.getFrontendOpts().DisableFree = false;
-#if LLVM_VERSION_MAJOR >= 20
+#if LLVM_VERSION_MAJOR >= 22
+ compiler1.setVirtualFileSystem(llvm::vfs::getRealFileSystem());
+ compiler1.createDiagnostics();
+#elif LLVM_VERSION_MAJOR >= 20
compiler1.createDiagnostics(*llvm::vfs::getRealFileSystem());
#else
compiler1.createDiagnostics();
@@ -517,7 +523,10 @@ int ClangLoader::do_compile(
invocation2.getCodeGenOpts().setInlining(CodeGenOptions::NormalInlining);
// suppress warnings in the 2nd pass, but bail out on errors (our fault)
invocation2.getDiagnosticOpts().IgnoreWarnings = true;
-#if LLVM_VERSION_MAJOR >= 20
+#if LLVM_VERSION_MAJOR >= 22
+ compiler2.setVirtualFileSystem(llvm::vfs::getRealFileSystem());
+ compiler2.createDiagnostics();
+#elif LLVM_VERSION_MAJOR >= 20
compiler2.createDiagnostics(*llvm::vfs::getRealFileSystem());
#else
compiler2.createDiagnostics();

50
package/bcc/Config.in Normal file
View File

@@ -0,0 +1,50 @@
config BR2_PACKAGE_BCC
bool "bcc"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_USE_MMU # python3
depends on BR2_TOOLCHAIN_USES_GLIBC # hardcode GNU tuple (x86_64-unknown-linux-gnu)
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # clang
depends on BR2_INSTALL_LIBSTDCPP # clang
depends on BR2_HOST_GCC_AT_LEAST_7 # clang
depends on BR2_USE_WCHAR # clang, python3
depends on BR2_TOOLCHAIN_HAS_THREADS # clang, python3
depends on !BR2_STATIC_LIBS # clang, python3
select BR2_PACKAGE_CLANG
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_FLEX # needs FlexLexer.h
select BR2_PACKAGE_HOST_ZIP
select BR2_PACKAGE_LLVM
select BR2_PACKAGE_LLVM_BPF
select BR2_PACKAGE_PYTHON3
help
BPF Compiler Collection (BCC)
BCC is a toolkit for creating efficient kernel tracing and
manipulation programs, and includes several useful tools and
examples. It makes use of extended BPF (Berkeley Packet
Filters), formally known as eBPF, a new feature that was
first added to Linux 3.15. Much of what BCC uses requires
Linux 4.1 and above.
Note: Before using bcc, you need either need to :
- For kernel_ver = [4.1, 5.2) : Copy kernel source code
to target folder /lib/module/<kernel_ver>/build.
- Or kernel_ver >= 5.2 : Compile kernel with CONFIG_IKHEADERS
and use generated headers under /sys/kernel/kheaders.tar.xz
to populate /lib/module/<kernel_ver>/build.
That's because the clang frontend build eBPF code at runtime.
https://github.com/iovisor/bcc
http://www.ebpf.io
comment "bcc needs a glibc toolchain, C++, wchar, threads, dynamic libs, gcc >= 7, host gcc >= 7"
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_USES_GLIBC \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_7 \
|| !BR2_INSTALL_LIBSTDCPP \
|| !BR2_HOST_GCC_AT_LEAST_7 \
|| !BR2_USE_WCHAR \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| BR2_STATIC_LIBS

3
package/bcc/bcc.hash Normal file
View File

@@ -0,0 +1,3 @@
# locally calculated
sha256 ea8562246801c52a9c21c47076dae9ff1d3719bb86b96d7a6222b3724461f52c bcc-v0.36.1-git4.tar.gz
sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE.txt

53
package/bcc/bcc.mk Normal file
View File

@@ -0,0 +1,53 @@
################################################################################
#
# bcc
#
################################################################################
BCC_VERSION = v0.36.1
BCC_SITE = https://github.com/iovisor/bcc
BCC_SITE_METHOD = git
BCC_GIT_SUBMODULES = YES
BCC_LICENSE = Apache-2.0
BCC_LICENSE_FILES = LICENSE.txt
BCC_INSTALL_STAGING = YES
BCC_DEPENDENCIES = \
clang \
elfutils \
flex \
host-bison \
host-flex \
host-python-setuptools \
host-zip \
llvm \
python3
# ENABLE_LLVM_SHARED=ON to use llvm.so - we only support shared libs
# Force REVISION otherwise bcc will use git describe to generate a version number.
BCC_CONF_OPTS = \
-DENABLE_LLVM_SHARED:BOOL=ON \
-DREVISION:STRING=$(BCC_VERSION) \
-DENABLE_CLANG_JIT:BOOL=ON \
-DENABLE_MAN:BOOL=OFF \
-DENABLE_EXAMPLES:BOOL=OFF \
-DPY_SKIP_DEB_LAYOUT:BOOL=ON
define BCC_LINUX_CONFIG_FIXUPS
# Enable kernel support for eBPF
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF)
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_SYSCALL)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CLS_BPF)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_ACT_BPF)
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_JIT)
# [for Linux kernel versions 4.1 through 4.6]
$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_BPF_JIT)
# [for Linux kernel versions 4.7 and later]
$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_EBPF_JIT)
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_EVENTS)
# [for Linux kernel versions 5.2 and later]
$(call KCONFIG_ENABLE_OPT,CONFIG_IKHEADERS)
# bcc needs debugfs at runtime
$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
endef
$(eval $(cmake-package))