Add a new recipe for crash-trace, a crash utility extension that
displays kernel tracing data and traced events prior to a panic.
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The upstream crash Makefile CONF_TARGET_ARCH mapping (used when
CROSS_COMPILE is set) enumerates most of OE supported arches
but omits 32-bit arm. Building with CROSS_COMPILE=arm-*
therefore aborts at Makefile parse time:
Makefile:75: *** The current Arch(arm) does not support cross compilation. Stop.
ARM is already a valid crash target (defs.h/configure.c), so add a patch
mapping the normalized "arm" arch to CONF_TARGET_ARCH=ARM like every
other supported arch.
Verified by cross building crash for qemuarm (arm-yoe-linux-gnueabi-):
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Cc: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
The cross-canadian variant did not build. Several issues:
1. DEPENDS used :append on top of crash.inc's target DEPENDS. cross-canadian
does not remap DEPENDS to nativesdk, so the target zlib/readline/ncurses/
gmp/mpfr stayed in the dependency set and staged a real target usr/lib into
the recipe sysroot, clashing with the nativesdk toolchain (clang-glue
provides usr/lib as a symlink) during do_prepare_recipe_sysroot. Override
DEPENDS with the nativesdk set instead (matching gdb-cross-canadian) and add
the -native build tools the build needs.
2. do_compile hardcoded ${HOST_PREFIX}gcc, which does not exist on clang based
SDKs (TOOLCHAIN = "clang"), giving "C compiler cannot create executables".
Use the toolchain-aware ${CC}/${CXX} like the other variants.
3. crash's gdb merge re-enters the top-level crash Makefile from gdb's link
rule ("make -C ../.. ... library") without passing the compiler, so crash's
own objects fell back to the Makefile default $(CROSS_COMPILE)gcc and failed
to find a compiler on clang SDKs. Forward CC/CXX through that recursion in
the bundled gdb-16.2.patch; this is harmless where ${cross}-gcc exists.
Verified by building crash, crash-native, crash-cross and
crash-cross-canadian-x86-64 for a clang based SDK (qemux86-64).
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The bundled gdb 16.2 hard-requires GMP and MPFR (crash 8.0.6 bundled gdb 10.2,
which did not). native.bbclass remaps DEPENDS to their -native variants
automatically, so crash-native builds, but cross.bbclass does not - so
crash-cross failed in gdb's configure with:
configure: error: Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
List the build-host dependencies (gmp/mpfr, plus readline/ncurses that crash
links) explicitly for class-cross.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The recipe passed --with-sysroot=${STAGING_DIR_TARGET} to the bundled gdb's
configure. gdb bakes that path in as its default target sysroot, so the
resulting /usr/bin/crash binary embedded the build-time recipe-sysroot path:
File /usr/bin/crash in package crash contains reference to TMPDIR [buildpaths]
This was worked around by demoting the buildpaths QA check to a warning
(ERROR_QA:remove / WARN_QA:append), which only hides the problem - the build
path is still wrong for a binary that runs on the target (or, for the
cross-canadian variant, in the SDK).
Set --with-sysroot=/ instead. crash takes the kernel/vmlinux and dump on its
command line, so gdb's compiled-in default sysroot is irrelevant at runtime;
"/" is both a sane default and contains no build path. With this the binary
no longer references TMPDIR, so the QA suppression can be removed and the
buildpaths check passes for real.
Verified with a clean build for qemux86-64: no buildpaths QA issue and no
TMPDIR references remain in the crash binary.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The do_compile:prepend ran "git init && git add . && git commit" inside the
staged gdb-16.2 tree. crash's build does not use git at all - the bundled gdb
is unpacked from a release tarball and merged with plain "patch -p0" - so this
served no purpose and only made the build depend on a working git identity.
In any environment where committer identity is unset, or where commit signing
is enabled globally (commit.gpgsign=true), do_compile fails with:
error: gpg failed to sign the data
fatal: failed to write commit object
Drop the git scaffolding entirely; the gdb patch still applies with patch(1).
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
std::allocator::construct was removed in C++20 (GCC 16 default).
Rewrite 0006-gdbsupport-fix-default-init-alloc to include <memory>
guard the using-declaration to pre-C++17, and add a forwarding
construct() overload.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The GDB 10.2 sources still rely on std::allocator::construct, which was
removed in C++20.
This causes the build to fail with errors such as:
default-init-alloc.h:52:12: error:
'construct' has not been declared in 'class std::allocator<...>'
Explicitly build the C++ sources with GNU C++17 to retain compatibility
with the bundled GDB sources.
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Fix the following error when using buildtools-extended:
va_server.c:20:10: fatal error: zlib.h: No such file or directory
20 | #include <zlib.h>
| ^~~~~~~~
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.
I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Fix reproducibility issue by retrieving the compiler version from the CC
env variable, which define the compiler used in the build and not from
the native gcc compiler install in the host machine.
Signed-off-by: Kéléfa Sané <kelefa.sane@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
OE-Core changed to to use virtual/nativesdk-cross-XXX replace the older
more complex cross providers. Update the recipes to match.
This fixes check layer failures on the autobuilder.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
According to crash help message, crash can decode the random address with
"--kaslr=auto". But it has a bug that when with "-S" in parameter, crash will
bypass the kaslr option.
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a
This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).
This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.
This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:
5 (26%) meta-xfce
6 (50%) meta-perl
15 (42%) meta-webserver
21 (36%) meta-gnome
25 (57%) meta-filesystems
26 (43%) meta-initramfs
45 (45%) meta-python
47 (55%) meta-multimedia
312 (63%) meta-networking
756 (61%) meta-oe
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
The patch to remove these options is removed therefore instrument them
via sed operations
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Mingli Yu <mingli.yu@windriver.com>
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Refresh the following patch:
donnot-extract-gdb-during-do-compile.patch
remove-unrecognized-gcc-option-m32-for-mips.patch
0001-printk-add-support-for-lockless-ringbuffer.patch
0002-printk-use-committed-finalized-state-values.patch
Removed since these are included in 7.3.0.
Signed-off-by: Zang Ruochen <zangrc.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This is the result of automated script (0.9.1) conversion:
oe-core/scripts/contrib/convert-overrides.py .
converting the metadata to use ":" as the override character instead of "_".
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
crash/0001-Fix-for-an-ARM64-gcc-10-compilation-error.-Without-t.patch
Removed since this is included in 7.2.9
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Remove -m32 from CFLAGS even for -cross recipe. Also remove
${GDB_CONF_FLAGS} from GDB_TARGET variable (that is passed to the gdb
configuration) since the use of GDB_CONF_FLAGS is removed by
0001-cross_add_configure_option.patch.
Signed-off-by: Goran Cengic <cengic@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This gives users a proper error message when trying to build
a known non-building package.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Since commit [21f84fc insane: add sanity checks to SRC_URI] applied
in oe-core, do not use unstable github archive tarballs
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
1)Upgrade crash from 7.1.9 to 7.2.0.
2)Delete 0004-crash-fix-build-failure-with-mips.patch, since it is integrated upstream.
Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This is because when using fortify warnings we need to have
some level of optimization, while we append warnings to CC
we dont do the same for optimization, which results in compile
failures when doing build with hardened flags
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>