added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,58 @@
From e63949205682bbd2a0e33e256119472d704a2549 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 29 Jan 2023 22:03:01 -0800
Subject: [PATCH] Add missing header <cstdint> for uintXX_t types
This is detected by gcc-13
gcc 13 moved some includes around and as a result <cstdint> is no
longer transitively included [1]. Explicitly include it for uintXX_t.
[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
Upstream-Status: Submitted [https://android-review.googlesource.com/c/platform/external/perfetto/+/2399128]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
include/perfetto/ext/base/http/sha1.h | 1 +
include/perfetto/ext/base/uuid.h | 1 +
src/traced/probes/common/cpu_freq_info.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/include/perfetto/ext/base/http/sha1.h b/include/perfetto/ext/base/http/sha1.h
index c583d69d4..7e3a48c83 100644
--- a/include/perfetto/ext/base/http/sha1.h
+++ b/include/perfetto/ext/base/http/sha1.h
@@ -20,6 +20,7 @@
#include <stddef.h>
#include <array>
+#include <cstdint>
#include <string>
namespace perfetto {
diff --git a/include/perfetto/ext/base/uuid.h b/include/perfetto/ext/base/uuid.h
index 1b4c53815..472042fab 100644
--- a/include/perfetto/ext/base/uuid.h
+++ b/include/perfetto/ext/base/uuid.h
@@ -18,6 +18,7 @@
#define INCLUDE_PERFETTO_EXT_BASE_UUID_H_
#include <array>
+#include <cstdint>
#include <string>
#include "perfetto/ext/base/optional.h"
diff --git a/src/traced/probes/common/cpu_freq_info.h b/src/traced/probes/common/cpu_freq_info.h
index 36f7f9c09..8232cbf64 100644
--- a/src/traced/probes/common/cpu_freq_info.h
+++ b/src/traced/probes/common/cpu_freq_info.h
@@ -17,6 +17,7 @@
#ifndef SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_
#define SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_
+#include <cstdint>
#include <map>
#include <string>
#include <vector>
--
2.39.1

View File

@@ -0,0 +1,71 @@
From 3b7091243ec03054ca8800b51b85a1c09e7e3075 Mon Sep 17 00:00:00 2001
From: Sui Chen <suichen6@gmail.com>
Date: Mon, 13 Jun 2022 17:46:49 +0000
Subject: [PATCH] Remove "check_build_deps" build steps
When building with Bitbake, we want Bitbake to manage our dependencies,
so we remove the "check_build_deps" steps from Perfetto.
Also setting "is_cross_compiling" to true, so that the host-side tools
(such as protoc) will always be generated using the native toolchain,
rather than the Bitbake-generated one.
Signed-off-by: Sui Chen <suichen6@gmail.com>
---
gn/BUILD.gn | 1 -
gn/standalone/BUILD.gn | 12 ++++++------
gn/standalone/BUILDCONFIG.gn | 5 +++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 8a7ca72a8..e4a2d39f0 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -111,7 +111,6 @@ group("default_deps") {
deps = [ ":gen_buildflags" ]
if (perfetto_build_standalone) {
public_deps = [
- "//gn/standalone:check_build_deps",
"//gn/standalone/libc++:deps",
"//gn/standalone/sanitizers:deps",
]
diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn
index 582e9b867..9c77ac64c 100644
--- a/gn/standalone/BUILD.gn
+++ b/gn/standalone/BUILD.gn
@@ -441,10 +441,10 @@ config("android_liblog") {
}
# Checks that tools/install-build-deps has been run since it last changed.
-perfetto_check_build_deps("check_build_deps") {
- args = []
-}
+#perfetto_check_build_deps("check_build_deps") {
+# args = []
+#}
-perfetto_check_build_deps("check_build_deps_android") {
- args = [ "--android" ]
-}
+#perfetto_check_build_deps("check_build_deps_android") {
+# args = [ "--android" ]
+#}
diff --git a/gn/standalone/BUILDCONFIG.gn b/gn/standalone/BUILDCONFIG.gn
index 6f32686c1..c041989b0 100644
--- a/gn/standalone/BUILDCONFIG.gn
+++ b/gn/standalone/BUILDCONFIG.gn
@@ -59,8 +59,9 @@ declare_args() {
# the ossfuzz sanitizer overrides this to true. In that config the
# host/target cpu and arch are identical, but we want to build only the
# targets with the sanitizer/fuzzer flags
- is_cross_compiling =
- target_cpu != host_cpu || target_os != host_os || target_triplet != ""
+
+ # for Bitbake build
+ is_cross_compiling = true
}
default_configs = [
"//gn/standalone:debug_symbols",
--
2.37.1

View File

@@ -0,0 +1,47 @@
From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Mon, 17 Oct 2022 19:20:53 +0200
Subject: [PATCH] meson: add PC file for lib_perfetto
---
meson.build | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -19,9 +19,12 @@
project(
'perfetto',
['cpp'],
- default_options: ['cpp_std=c++17']
+ default_options: ['cpp_std=c++17'],
+ version: '31.0'
)
+soversion = meson.project_version()
+
fs = import('fs')
if not fs.is_dir('sdk')
@@ -36,8 +39,9 @@ if host_machine.system() == 'android'
deps_perfetto += cpp.find_library('log')
endif
-lib_perfetto = static_library(
+lib_perfetto = shared_library(
'perfetto',
+ version: soversion,
sources: 'sdk/perfetto.cc',
dependencies: deps_perfetto,
install: true,
@@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.cu
install_data(dir_perfetto_trace / 'perfetto_trace.proto')
+install_headers('sdk/perfetto.h')
+pkg = import('pkgconfig')
+pkg.generate(lib_perfetto)
+
dep_perfetto = declare_dependency(
link_with: lib_perfetto,
include_directories: inc_perfetto,

View File

@@ -0,0 +1,14 @@
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390"
require perfetto.inc
inherit meson
SRC_URI:append = " file://0001-meson-add-pc-file-for-lib_perfetto.patch"
LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
FILES:${PN} += "${datadir}"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,153 @@
LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390 \
file://buildtools/libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \
file://buildtools/libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \
file://buildtools/libunwind/LICENSE.TXT;md5=f66970035d12f196030658b11725e1a1 \
file://buildtools/protobuf/LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b \
file://buildtools/zlib/LICENSE;md5=f09575dbfb09420642318b413159496f \
file://debian/copyright;md5=4e08364c82141f181de69d0a2b89d612 \
file://python/LICENSE;md5=c602a632c34ade9c78a976734077bce7"
SRC_URI:append = " \
git://github.com/protocolbuffers/protobuf.git;branch=3.9.x;protocol=https;destsuffix=git/buildtools/protobuf;name=protobuf \
git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git;protocol=https;destsuffix=git/buildtools/libcxx;branch=main;name=libcxx \
git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git;protocol=https;destsuffix=git/buildtools/libcxxabi;branch=main;name=libcxxabi \
git://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git;protocol=https;destsuffix=git/buildtools/libunwind;branch=main;name=libunwind \
git://android.googlesource.com/platform/system/libbase.git;branch=master;protocol=https;destsuffix=git/buildtools/android-libbase;name=libbase \
git://android.googlesource.com/platform/system/unwinding.git;branch=master;protocol=https;destsuffix=git/buildtools/android-unwinding;name=unwinding \
git://android.googlesource.com/platform/system/logging.git;branch=master;protocol=https;destsuffix=git/buildtools/android-logging;name=logging \
git://android.googlesource.com/platform/system/libprocinfo.git;branch=master;protocol=https;destsuffix=git/buildtools/android-libprocinfo;name=libprocinfo \
git://android.googlesource.com/platform/system/core.git;branch=master;protocol=https;destsuffix=git/buildtools/android-core;name=core \
git://android.googlesource.com/platform/bionic.git;branch=master;protocol=https;destsuffix=git/buildtools/bionic;name=bionic \
git://android.googlesource.com/platform/external/zlib.git;branch=master;protocol=https;destsuffix=git/buildtools/zlib;name=zlib \
git://android.googlesource.com/platform/external/lzma.git;branch=master;protocol=https;destsuffix=git/buildtools/lzma;name=lzma \
https://storage.googleapis.com/perfetto/gn-linux64-1968-0725d782;subdir=git/buildtools/;name=gn \
\
file://0001-Remove-check_build_deps-build-steps.patch \
file://0001-Add-missing-header-cstdint-for-uintXX_t-types.patch"
SRCREV_bionic = "4b0e16bc72a82a63c699977376a7d6eadca1b206"
SRCREV_core = "9e6cef7f07d8c11b3ea820938aeb7ff2e9dbaa52"
SRCREV_lzma = "7851dce6f4ca17f5caa1c93a4e0a45686b1d56c3"
SRCREV_libprocinfo = "fd214c13ededecae97a3b15b5fccc8925a749a84"
SRCREV_logging = "7b36b566c9113fc703d68f76e8f40c0c2432481c"
SRCREV_unwinding = "d66882575ebe3700d6a6b10185f3aee28acc1051"
SRCREV_protobuf = "6a59a2ad1f61d9696092f79b6d74368b4d7970a3"
SRCREV_libbase = "78f1c2f83e625bdf66d55b48bdb3a301c20d2fb3"
SRCREV_libcxx = "f8571eaba606bde2eb8cd34b30104ca33e7c207e"
SRCREV_libcxxabi = "8dd405113a4f3694e910b79785dd7fb7535a888a"
SRCREV_libunwind = "aabcd8753678f1536e15eb6385a948470debdae4"
SRCREV_zlib = "5c85a2da4c13eda07f69d81a1579a5afddd35f59"
SRC_URI[gn.sha256sum] = "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f99efa2358177b64f5cd"
require perfetto.inc
DEPENDS += " ninja-native"
COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm).*-linux*"
CCACHE_DISABLE = "1"
# Some musl hacks gets through compiling it for musl
# Nullifying -DTEMP_FAILURE_RETRY might be grossest of them
TUNE_CCARGS:append:libc-musl = " -D_LIBCPP_HAS_MUSL_LIBC -Dgetprogname\(\)=program_invocation_name -DTEMP_FAILURE_RETRY="
FILES:${PN}:append = " \
${bindir}/tracebox \
"
B = "${WORKDIR}/build"
# Run the GN (Generate Ninja) script, and replace the compiler flags where applicable
do_configure () {
# Configuration needs to be done from the source directory
cd ${S}
# Rename a few build tools if they have not been renamed
cd buildtools
x="gn-linux64-1968-0725d782"
[ -f $x ] && mkdir linux64 && mv $x linux64/gn
chmod +x linux64/gn
cd ..
CC_BIN=`echo $CC | awk '{print $1}'`
CXX_BIN=`echo $CXX | awk '{print $1}'`
STRIP_BIN=`echo $STRIP | awk '{print $1}'`
ARGS="is_debug=false " # Tell gn to use release mode
if [ -z `echo ${TOOLCHAIN} | grep clang` ]; then
ARGS=$ARGS" is_clang=false"
else
ARGS=$ARGS" is_clang=true"
fi
# Architecture parameter accepted by Perfetto
arch=${TARGET_ARCH}
if [ $arch = "i686" ]; then
arch="x86"
elif [ $arch = "x86_64" ]; then
arch="x64"
elif [ $arch = "aarch64" ]; then
arch="arm64"
fi
ARGS=$ARGS" target_os=\"linux\""
ARGS=$ARGS" target_cpu=\"$arch\""
ARGS=$ARGS" target_cc=\"$CC_BIN ${TUNE_CCARGS}\""
ARGS=$ARGS" target_cxx=\"$CXX_BIN -std=c++11 ${TUNE_CCARGS}\""
ARGS=$ARGS" target_strip=\"$STRIP_BIN\"" #
ARGS=$ARGS" target_sysroot=\"${RECIPE_SYSROOT}\""
ARGS=$ARGS" target_linker=\"$CC_BIN ${TUNE_CCARGS} ${LDFLAGS}\""
ARGS=$ARGS" target_ar=\"$AR\""
ARGS="'$ARGS'"
cmd="tools/gn gen --args=$ARGS ${B}"
echo $cmd
# Use eval, not just call $cmd, due to escaping of single quotation marks
eval $cmd
cd ${B}
# Eliminate a few incompatible build flags
REPLACES="s/-Wl,--icf=all//g"
REPLACES=$REPLACES";s/-Werror//g"
REPLACES=$REPLACES";s/-fcolor-diagnostics//g"
REPLACES=$REPLACES";s/=format-security//g"
REPLACES=$REPLACES";s/-fdiagnostics-show-template-tree//g"
REPLACES=$REPLACES";s/-D_FORTIFY_SOURCE=2//g"
REPLACES=$REPLACES";s/-fuse-ld=\S*//g"
find . -name "*.ninja" | xargs sed $REPLACES -i
# If using the clang toolchain: use the clang host-side binaries built by Bitbake
if [ "${TOOLCHAIN}" = "clang" ]; then
BB_CLANGXX="${BUILD_CXX} ${BUILD_LDFLAGS}"
BB_CLANG="${BUILD_CC}"
BB_LLVM_OBJCOPY="${RECIPE_SYSROOT_NATIVE}/usr/bin/llvm-objcopy"
HOST_CLANGXX="${STAGING_DIR_NATIVE}/usr/bin/clang++ -stdlib=libc++ -rtlib=libgcc -unwindlib=libgcc"
HOST_CLANG="${STAGING_DIR_NATIVE}/usr/bin/clang"
HOST_LLVM_OBJCOPY="${STAGING_DIR_NATIVE}/usr/bin/llvm-objcopy"
cd gcc_like_host
REPLACES="s:\S*clang++ :$HOST_CLANGXX :g"
REPLACES=$REPLACES";s:\S*clang :$HOST_CLANG :g"
REPLACES=$REPLACES";s:\S*llvm-objcopy :$HOST_LLVM_OBJCOPY :g"
find . -name "*.ninja" | xargs sed "$REPLACES" -i
cd ..
fi
# Done processing the Ninja files
}
# Perfetto generates a few different binaries, such as traced and traced_probes and perfetto.
# The "tracebox" is a busybox that combines the 3 above and provides a single stop for trace capture, so we only build "tracebox" here.
do_compile () {
cd ${B}
ninja -C . tracebox
}
do_install () {
BIN_DIR=${D}${bindir}
install -d -m0755 $BIN_DIR
install ${B}/tracebox $BIN_DIR/tracebox
}

View File

@@ -0,0 +1,9 @@
SUMMARY = "Perfetto - System profiling, app tracing and trace analysis."
HOMEPAGE = "https://github.com/google/perfetto"
SRC_URI = "git://github.com/google/perfetto.git;protocol=https;name=perfetto;nobranch=1"
SRCREV_perfetto = "b8da07095979310818f0efde2ef3c69ea70d62c5"
PV = "31.0"
S = "${WORKDIR}/git"