initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,32 @@
From ff29b837f21a69c79289c3a87b03f8c23e05616e Mon Sep 17 00:00:00 2001
From: Pierre Habouzit <madcoder@debian.org>
Date: Tue, 10 May 2011 23:11:45 +0200
Subject: [PATCH] workaround SIGSEGV on PPC.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
coregrind/m_machine.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c
index 6110c93..298a00e 100644
--- a/coregrind/m_machine.c
+++ b/coregrind/m_machine.c
@@ -27,6 +27,10 @@
The GNU General Public License is contained in the file COPYING.
*/
+#ifdef __powerpc__
+# pragma GCC optimize ("-O0")
+#endif
+
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_threadstate.h"
--
2.1.4
@@ -0,0 +1,37 @@
From 7311686d6286972ff97cc18b2416a4cdd7fc5c7e Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 31 Oct 2015 12:15:24 +0100
Subject: [PATCH] Define PTRACE_GETSIGINFO on PowerPC when not available
uClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even
though Buildroot has a uClibc patch doing that, it doesn't solve the
case of external uClibc toolchain from other sources (such as
Crosstool-NG). Therefore, this patch modifies Valgrind to define
PTRACE_GETSIGINFO on PowerPC to the right value, when such definition
is not available from the C library.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
coregrind/vgdb-invoker-ptrace.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c
index d65f59a..bdefac2 100644
--- a/coregrind/vgdb-invoker-ptrace.c
+++ b/coregrind/vgdb-invoker-ptrace.c
@@ -72,6 +72,12 @@
# endif
#endif
+#if defined(__powerpc__)
+# ifndef PTRACE_GETSIGINFO
+# define PTRACE_GETSIGINFO 0x4202
+# endif
+#endif
+
// 32-bit or 64-bit wide, depending on primary architecture.
typedef Addr CORE_ADDR;
typedef Addr PTRACE_XFER_TYPE;
--
2.1.4
+87
View File
@@ -0,0 +1,87 @@
config BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
bool
default y if BR2_aarch64
default y if BR2_ARM_CPU_ARMV7A
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
default y if BR2_i386 || BR2_x86_64
default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
depends on !BR2_MIPS_SOFT_FLOAT
comment "valgrind needs a toolchain w/ dynamic library"
depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
depends on BR2_STATIC_LIBS
config BR2_PACKAGE_VALGRIND
bool "valgrind"
depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
depends on !BR2_STATIC_LIBS
help
Tool for debugging and profiling Linux programs.
http://valgrind.org/
if BR2_PACKAGE_VALGRIND
config BR2_PACKAGE_VALGRIND_MEMCHECK
bool "Memcheck: a memory error detector"
default y
help
This option allows to install the Memcheck tool
config BR2_PACKAGE_VALGRIND_CACHEGRIND
bool "Cachegrind: a cache and branch-prediction profiler"
default y
help
This option allows to install the Cachegrind tool
config BR2_PACKAGE_VALGRIND_CALLGRIND
bool "Callgrind: a call-graph generating cache and branch prediction profiler"
default y
help
This option allows to install the Callgrind tool
config BR2_PACKAGE_VALGRIND_HELGRIND
bool "Helgrind: a thread error detector"
default y
help
This option allows to install the Helgrind tool
config BR2_PACKAGE_VALGRIND_DRD
bool "DRD: a thread error detector"
default y
help
This option allows to install the DRD tool
config BR2_PACKAGE_VALGRIND_MASSIF
bool "Massif: a heap profiler"
default y
help
This option allows to install the Massif tool
config BR2_PACKAGE_VALGRIND_DHAT
bool "DHAT: a dynamic heap analysis tool"
default y
help
This option allows to install the DHAT tool
config BR2_PACKAGE_VALGRIND_SGCHECK
bool "SGCheck: an experimental stack and global array overrun detector"
help
This option allows to install the SGCheck tool
config BR2_PACKAGE_VALGRIND_BBV
bool "BBV: an experimental basic block vector generation tool"
help
This option allows to install the BBV tool
config BR2_PACKAGE_VALGRIND_LACKEY
bool "Lackey: an example tool"
help
This option allows to install the Lackey tool
config BR2_PACKAGE_VALGRIND_NULGRIND
bool "Nulgrind: the minimal Valgrind tool"
help
This option allows to install the Nulgrind tool
endif
+212
View File
@@ -0,0 +1,212 @@
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_strdup
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_malloc
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Cond
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_get_ready_to_run
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_add_elf_hash_table
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_add_elf_hash_table
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_add_elf_hash_table
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_check_if_named_library_is_loaded
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_check_if_named_library_is_loaded
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_check_hashed_files
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_check_hashed_files
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_load_elf_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_load_elf_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_load_elf_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_load_shared_library
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr1
fun:_dl_find_hash
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_find_hash
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_fixup
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_fixup
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_linux_resolve
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_linux_resolver
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_parse_lazy_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr2
obj:/lib/ld-uClibc*
fun:_dl_parse_lazy_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_parse_lazy_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
obj:/lib/ld-uClibc*
fun:_dl_parse_lazy_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
fun:_dl_parse_lazy_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr2
obj:/lib/ld-uClibc*
fun:_dl_parse_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr2
fun:_dl_parse_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
fun:_dl_parse_relocation_information
obj:/lib/ld-uClibc*
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
fun:_dl_parse_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc*
obj:/lib/ld-uClibc*
fun:_dl_parse_relocation_information
}
{
<insert a suppression name here>
Memcheck:Addr2
obj:/lib/ld-uClibc-0.9.27.so
fun:*
}
{
<insert a suppression name here>
Memcheck:Addr4
obj:/lib/ld-uClibc-0.9.27.so
fun:*
}
+8
View File
@@ -0,0 +1,8 @@
# From https://valgrind.org/downloads/current.html
md5 de56a5532b0c81781db677ca712c585a valgrind-3.18.1.tar.bz2
# locally computed
sha256 00859aa13a772eddf7822225f4b46ee0d39afbe071d32778da4d99984081f7f5 valgrind-3.18.1.tar.bz2
# License files
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 56976e64523fa1e68db4e6f464f5b2cb89d7d08f54b1d012e317b8db286b3faf COPYING.DOCS
+160
View File
@@ -0,0 +1,160 @@
################################################################################
#
# valgrind
#
################################################################################
VALGRIND_VERSION = 3.18.1
VALGRIND_SITE = https://sourceware.org/pub/valgrind
VALGRIND_SOURCE = valgrind-$(VALGRIND_VERSION).tar.bz2
VALGRIND_LICENSE = GPL-2.0, GFDL-1.2
VALGRIND_LICENSE_FILES = COPYING COPYING.DOCS
VALGRIND_CPE_ID_VENDOR = valgrind
VALGRIND_CONF_OPTS = \
--disable-ubsan \
--without-mpicc
VALGRIND_INSTALL_STAGING = YES
# Valgrind must be compiled with no stack protection, so forcefully
# pass -fno-stack-protector to override what Buildroot may have in
# TARGET_CFLAGS if BR2_SSP_* support is enabled.
VALGRIND_CFLAGS = \
$(TARGET_CFLAGS) \
-fno-stack-protector
# When Valgrind detects a 32-bit MIPS architecture, it forcibly adds
# -march=mips32 to CFLAGS; when it detects a 64-bit MIPS architecture,
# it forcibly adds -march=mips64. This causes Valgrind to be built
# always for the first ISA revision level (R1), even when the user has
# configured Buildroot for the second ISA revision level (R2).
#
# Override the CFLAGS variable (which Valgrind appends to its CFLAGS)
# and pass the right -march option, so they take precedence over
# Valgrind's wrongfully detected value.
ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
VALGRIND_CFLAGS += -march="$(GCC_TARGET_ARCH)"
endif
VALGRIND_CONF_ENV = CFLAGS="$(VALGRIND_CFLAGS)"
# fix uclibc configure c99 support detection
VALGRIND_CONF_ENV += ac_cv_prog_cc_c99='-std=gnu99'
# On ARM, Valgrind only supports ARMv7, and uses the arch part of the
# host tuple to determine whether it's being built for ARMv7 or
# not. Therefore, we adjust the host tuple to specify we're on
# ARMv7. The valgrind package is guaranteed, through Config.in, to
# only be selected on ARMv7-A platforms.
ifeq ($(BR2_ARM_CPU_ARMV7A),y)
VALGRIND_CONF_OPTS += \
--host=$(patsubst arm-%,armv7-%,$(GNU_TARGET_NAME))
endif
ifeq ($(BR2_GCC_ENABLE_LTO),y)
VALGRIND_CONF_OPTS += --enable-lto
else
VALGRIND_CONF_OPTS += --disable-lto
endif
define VALGRIND_INSTALL_UCLIBC_SUPP
$(INSTALL) -D -m 0644 package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/uclibc.supp
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_INSTALL_UCLIBC_SUPP
ifeq ($(BR2_PACKAGE_VALGRIND_MEMCHECK),)
define VALGRIND_REMOVE_MEMCHECK
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*memcheck*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MEMCHECK
endif
ifeq ($(BR2_PACKAGE_VALGRIND_CACHEGRIND),)
define VALGRIND_REMOVE_CACHEGRIND
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*cachegrind*
for i in cg_annotate cg_diff cg_merge; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
done
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CACHEGRIND
endif
ifeq ($(BR2_PACKAGE_VALGRIND_CALLGRIND),)
define VALGRIND_REMOVE_CALLGRIND
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*callgrind*
for i in callgrind_annotate callgrind_control ; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
done
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CALLGRIND
endif
ifeq ($(BR2_PACKAGE_VALGRIND_HELGRIND),)
define VALGRIND_REMOVE_HELGRIND
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*helgrind*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_HELGRIND
endif
ifeq ($(BR2_PACKAGE_VALGRIND_DRD),)
define VALGRIND_REMOVE_DRD
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*drd*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DRD
endif
ifeq ($(BR2_PACKAGE_VALGRIND_MASSIF),)
define VALGRIND_REMOVE_MASSIF
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*massif*
rm -f $(TARGET_DIR)/usr/bin/ms_print
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MASSIF
endif
ifeq ($(BR2_PACKAGE_VALGRIND_DHAT),)
define VALGRIND_REMOVE_DHAT
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*dhat*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DHAT
endif
ifeq ($(BR2_PACKAGE_VALGRIND_SGCHECK),)
define VALGRIND_REMOVE_SGCHECK
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*sgcheck*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_SGCHECK
endif
ifeq ($(BR2_PACKAGE_VALGRIND_BBV),)
define VALGRIND_REMOVE_BBV
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*bbv*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_BBV
endif
ifeq ($(BR2_PACKAGE_VALGRIND_LACKEY),)
define VALGRIND_REMOVE_LACKEY
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*lackey*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_LACKEY
endif
ifeq ($(BR2_PACKAGE_VALGRIND_NULGRIND),)
define VALGRIND_REMOVE_NULGRIND
rm -f $(TARGET_DIR)/usr/libexec/valgrind/*none*
endef
VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_NULGRIND
endif
$(eval $(autotools-package))