Skip to content

Commit 089c28d

Browse files
Robert BergerRobert Berger
authored andcommitted
crash 8.0.6 -> 9.0.2 + crash-memory-driver
1) crash-memory-driver: fixed typo to include proper patch 2) crash-memory-driver: keep license,... patch against comments on pull request: 1) HOMEPAGE updated 2) UPSTREAM_CHECK_URI updated 3) exports removed 4) if [ -f "gdb-16.2.patch" ]; then... removed 5) notes about QA Issue: reference to TMPDIR [buildpaths] added 6) notes ./crash --buildinfo removed 7) LIC_FILES_CHKSUM: use license text in crash.c 8) PV = "9.0.2+git${SRCPV}" -> SRCPV removed 9) removed unused patches 10) crash: LICENSE = GPL-3.0-only
1 parent 53cbcab commit 089c28d

18 files changed

Lines changed: 298 additions & 582 deletions

meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.6.bb

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
inherit cross-canadian
2+
3+
SUMMARY = "crash utility (cross-canadian crash for ${TARGET_ARCH} target)"
4+
PN = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}"
5+
BPN = "crash"
6+
7+
require crash.inc
8+
9+
DEPENDS:append = " \
10+
nativesdk-ncurses \
11+
nativesdk-expat \
12+
nativesdk-gettext \
13+
nativesdk-gmp \
14+
nativesdk-mpfr \
15+
nativesdk-readline \
16+
nativesdk-zlib \
17+
virtual/nativesdk-cross-cc \
18+
virtual/nativesdk-cross-binutils \
19+
virtual/nativesdk-compilerlibs \
20+
virtual/nativesdk-libc \
21+
"
22+
23+
RDEPENDS:${PN} = "nativesdk-liblzma"
24+
25+
EXTRA_OEMAKE:class-cross-canadian = ' \
26+
RPMPKG="${PV}" \
27+
CROSS_COMPILE="${HOST_PREFIX}" \
28+
HOSTCC="gcc" \
29+
CFLAGS="${CFLAGS} -fcommon --sysroot=${STAGING_DIR_HOST}" \
30+
CXXFLAGS="${CXXFLAGS} -fcommon --sysroot=${STAGING_DIR_HOST}" \
31+
LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_HOST}" \
32+
GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \
33+
GDB_HOST="${HOST_SYS}" \
34+
GDB_MAKE_JOBS="${PARALLEL_MAKE}" \
35+
GDB_CONF_FLAGS="--host=${HOST_SYS} \
36+
--build=${BUILD_SYS} \
37+
--target=${TARGET_SYS} \
38+
--disable-gdbserver \
39+
--disable-gprofng \
40+
--with-sysroot=${STAGING_DIR_TARGET} \
41+
ac_cv_type_gregset_t=yes \
42+
ac_cv_type_fpregset_t=yes \
43+
ac_cv_header_sys_procfs_h=yes" \
44+
'
45+
46+
# Force the SDK cross-compiler during the command execution phase
47+
do_compile() {
48+
oe_runmake ${EXTRA_OEMAKE} CC="${HOST_PREFIX}gcc ${HOST_CC_ARCH}" CXX="${HOST_PREFIX}g++ ${HOST_CC_ARCH}" RECIPE_SYSROOT=${RECIPE_SYSROOT}
49+
}
50+
51+
# To ship crash into your sdk, you should create/update a packagegroup-cross-canadian.bbappend and
52+
# add the following
53+
# CRASH = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}"
54+
# RDEPENDS:${PN} += "${@all_multilib_tune_values(d, 'CRASH')}"
55+
#
56+
# You should also add some kernel packages in your sdk, add the followng in your conf/local.conf:
57+
#
58+
# TOOLCHAIN_TARGET_TASK += "\
59+
# kernel-vmlinux \
60+
# kernel-dbg \
61+
# kernel-dev \
62+
# "
63+
#
64+
# After sourcing the sdk environment script, you can analyze a kernel panic dump with
65+
#
66+
# crash $OECORE_TARGET_SYSROOT/boot/<vmlinux file> $OECORE_TARGET_SYSROOT/boot/<System.map file> <your vmcore>
67+
68+
do_install:class-cross-canadian () {
69+
rm -rf ${D}
70+
install -d ${D}${bindir}
71+
install -m 0755 ${S}/crash ${D}${bindir}/crash
72+
cross_canadian_bindirlinks
73+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
From 4e33b3183f7ec903f73479600cfcb9014de1780e Mon Sep 17 00:00:00 2001
2+
From: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
3+
Date: Wed, 5 Mar 2025 06:28:02 +0000
4+
Subject: [PATCH] hacked Makefile for module.bbclass
5+
6+
Upstream-Status: Inappropriate [oe specific]
7+
8+
Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
9+
---
10+
memory_driver/Makefile | 26 +++++++++++++++++---------
11+
1 file changed, 17 insertions(+), 9 deletions(-)
12+
13+
diff --git a/memory_driver/Makefile b/memory_driver/Makefile
14+
index 61ee7c0..d8dd3b5 100644
15+
--- a/memory_driver/Makefile
16+
+++ b/memory_driver/Makefile
17+
@@ -7,15 +7,23 @@
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
-#
22+
-ifneq ($(KERNELRELEASE),)
23+
+
24+
obj-m := crash.o
25+
-else
26+
-PWD := $(shell pwd)
27+
-KVER ?= $(shell uname -r)
28+
-KDIR ?= /lib/modules/${KVER}/build
29+
+
30+
+SRC := $(shell pwd)
31+
+
32+
all:
33+
- ${MAKE} -C ${KDIR} M=${PWD} SUBDIRS=${PWD} modules
34+
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
35+
+
36+
+# if you would like to invoke sparse:
37+
+#
38+
+# all:
39+
+# $(MAKE) KBUILD_CHECKSRC=1 -C $(KERNEL_SRC) M=$(SRC)
40+
+
41+
+modules_install:
42+
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
43+
+
44+
clean:
45+
- test -e ${KDIR}/Makefile && ${MAKE} -C ${KDIR} M=${PWD} SUBDIRS=${PWD} clean || ${RM} *.mod.c *.ko *.o Module.*
46+
-endif
47+
+ rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
48+
+ rm -f Module.markers Module.symvers modules.order
49+
+ rm -rf .tmp_versions Modules.symvers
50+
--
51+
2.34.1
52+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 9ed4940f796fabd86ace513c67ea3208815c553b Mon Sep 17 00:00:00 2001
2+
From: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
3+
Date: Wed, 5 Mar 2025 12:02:38 +0000
4+
Subject: [PATCH] add sparse support
5+
6+
Upstream-Status: Inappropriate [oe specific]
7+
8+
Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
9+
---
10+
Makefile | 4 ++--
11+
1 file changed, 2 insertions(+), 2 deletions(-)
12+
13+
diff --git a/memory_driver/Makefile b/memory_driver/Makefile
14+
index 8b9bdbd..ae7151b 100644
15+
--- a/memory_driver/Makefile
16+
+++ b/memory_driver/Makefile
17+
@@ -7,8 +7,8 @@ all:
18+
19+
# if you would like to invoke sparse:
20+
#
21+
-# all:
22+
-# $(MAKE) KBUILD_CHECKSRC=1 -C $(KERNEL_SRC) M=$(SRC)
23+
+all:
24+
+ $(MAKE) KBUILD_CHECKSRC=1 -C $(KERNEL_SRC) M=$(SRC)
25+
26+
modules_install:
27+
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
28+
--
29+
2.34.1
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
DESCRIPTION = "Once installed, the /dev/crash driver will be used by default for live system crash sessions."
2+
SECTION = "devel"
3+
SUMMARY = "/dev/crash driver"
4+
HOMEPAGE = "https://github.com/crash-utility/crash/tree/master/memory_driver"
5+
RECIPE_MAINTAINER = "Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>"
6+
LICENSE = "GPL-2.0-only"
7+
LIC_FILES_CHKSUM = "file://crash.c;beginline=1;endline=25;md5=c278eae78e2bf99783849a90f03d0e43"
8+
9+
inherit module
10+
11+
SRCREV = "61fe107ff96a22e7df0029877529b7ce6da36850"
12+
SRC_URI = "git://github.com/crash-utility/crash;protocol=https;branch=master;subpath=memory_driver;destsuffix=${BP} \
13+
file://0001-hacked-Makefile-for-module.bbclass.patch;striplevel=2 \
14+
file://0002-add-sparse-support.patch;striplevel=2 \
15+
"
16+
PV = "9.0.2+git"
17+
18+
# The inherit of module.bbclass will automatically name module packages with
19+
# "kernel-module-" prefix as required by the oe-core build environment.
20+
21+
RPROVIDES:${PN} += "kernel-module-crash-memory-driver"
22+
23+
# to local.conf add:
24+
# to add the kernel module to the rootfs:
25+
# MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-crash-memory-driver"
26+
# to autoload it:
27+
# KERNEL_MODULE_AUTOLOAD += "crash"
28+
29+
# in case we use sparse in the kernel module makefile
30+
DEPENDS = "sparse-native"

0 commit comments

Comments
 (0)