diff options
18 files changed, 298 insertions, 582 deletions
diff --git a/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.6.bb b/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.6.bb deleted file mode 100644 index bafe56d2c4..0000000000 --- a/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.6.bb +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 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 | |||
| 10 | DEPENDS = "\ | ||
| 11 | nativesdk-ncurses \ | ||
| 12 | nativesdk-expat \ | ||
| 13 | nativesdk-gettext \ | ||
| 14 | nativesdk-gmp \ | ||
| 15 | nativesdk-mpfr \ | ||
| 16 | nativesdk-readline \ | ||
| 17 | nativesdk-zlib \ | ||
| 18 | virtual/nativesdk-cross-cc \ | ||
| 19 | virtual/nativesdk-cross-binutils \ | ||
| 20 | virtual/nativesdk-compilerlibs \ | ||
| 21 | virtual/nativesdk-libc" | ||
| 22 | |||
| 23 | RDEPENDS:${PN} = "nativesdk-liblzma" | ||
| 24 | |||
| 25 | EXTRA_OEMAKE:class-cross-canadian = 'RPMPKG="${PV}" \ | ||
| 26 | GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \ | ||
| 27 | GDB_HOST="${HOST_SYS}" \ | ||
| 28 | GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ | ||
| 29 | LDFLAGS="${LDFLAGS}" \ | ||
| 30 | ' | ||
| 31 | |||
| 32 | # To ship crash into your sdk, you should create/update a packagegroup-cross-canadian.bbappend and | ||
| 33 | # add the following | ||
| 34 | # CRASH = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}" | ||
| 35 | # RDEPENDS:${PN} += "${@all_multilib_tune_values(d, 'CRASH')}" | ||
| 36 | # | ||
| 37 | # You should also add some kernel packages in your sdk, add the followng in your conf/local.conf: | ||
| 38 | # | ||
| 39 | # TOOLCHAIN_TARGET_TASK += "\ | ||
| 40 | # kernel-vmlinux \ | ||
| 41 | # kernel-dbg \ | ||
| 42 | # kernel-dev \ | ||
| 43 | # " | ||
| 44 | # | ||
| 45 | # After sourcing the sdk environment script, you can analyze a kernel panic dump with | ||
| 46 | # | ||
| 47 | # crash $OECORE_TARGET_SYSROOT/boot/<vmlinux file> $OECORE_TARGET_SYSROOT/boot/<System.map file> <your vmcore> | ||
| 48 | |||
| 49 | do_install:class-cross-canadian () { | ||
| 50 | install -m 0755 ${S}/crash ${D}/${bindir} | ||
| 51 | cross_canadian_bindirlinks | ||
| 52 | } | ||
diff --git a/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb b/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb new file mode 100644 index 0000000000..0ab18cb3d4 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-cross-canadian_9.0.2.bb | |||
| @@ -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 | } | ||
diff --git a/meta-oe/recipes-kernel/crash/crash-memory-driver/0001-hacked-Makefile-for-module.bbclass.patch b/meta-oe/recipes-kernel/crash/crash-memory-driver/0001-hacked-Makefile-for-module.bbclass.patch new file mode 100644 index 0000000000..72d28d280e --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-memory-driver/0001-hacked-Makefile-for-module.bbclass.patch | |||
| @@ -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 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash-memory-driver/0002-add-sparse-support.patch b/meta-oe/recipes-kernel/crash/crash-memory-driver/0002-add-sparse-support.patch new file mode 100644 index 0000000000..0833b01416 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-memory-driver/0002-add-sparse-support.patch | |||
| @@ -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 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash-memory-driver_9.0.2.bb b/meta-oe/recipes-kernel/crash/crash-memory-driver_9.0.2.bb new file mode 100644 index 0000000000..3666767ca6 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-memory-driver_9.0.2.bb | |||
| @@ -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" | ||
diff --git a/meta-oe/recipes-kernel/crash/crash.inc b/meta-oe/recipes-kernel/crash/crash.inc index 3c9a99ae4a..b1d9a720cc 100644 --- a/meta-oe/recipes-kernel/crash/crash.inc +++ b/meta-oe/recipes-kernel/crash/crash.inc | |||
| @@ -1,36 +1,32 @@ | |||
| 1 | SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles" | 1 | SUMMARY = "Kernel analysis utility for live systems and core dumpfiles" |
| 2 | DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\ | 2 | DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to \ |
| 3 | investigate either live systems, kernel core dumps created from the\ | 3 | investigate either live systems, kernel core dumps created from kdump, or mcore dumpfiles." |
| 4 | netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\ | 4 | HOMEPAGE = "https://crash-utility.github.io/" |
| 5 | offered by Mission Critical Linux, or the LKCD kernel patch." | ||
| 6 | |||
| 7 | HOMEPAGE = "http://people.redhat.com/anderson" | ||
| 8 | SECTION = "devel" | 5 | SECTION = "devel" |
| 9 | 6 | ||
| 10 | LICENSE = "GPL-3.0-only" | 7 | LICENSE = "GPL-3.0-only" |
| 11 | LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" | 8 | LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${BP}/COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ |
| 12 | 9 | file://${UNPACKDIR}/gdb/gdb-16.2/COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | |
| 13 | DEPENDS = "zlib readline coreutils-native ncurses-native" | 10 | " |
| 14 | 11 | ||
| 15 | INC_PR = "r1" | 12 | DEPENDS = "zlib readline ncurses gmp mpfr" |
| 13 | # Use append for cross-canadian on native packages | ||
| 14 | DEPENDS:append = " coreutils-native bison-native flex-native" | ||
| 16 | 15 | ||
| 17 | SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https \ | 16 | SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https;destsuffix=${BP} \ |
| 18 | ${GNU_MIRROR}/gdb/gdb-10.2.tar.gz;name=gdb;subdir=${BB_GIT_DEFAULT_DESTSUFFIX} \ | 17 | ${GNU_MIRROR}/gdb/gdb-16.2.tar.gz;name=gdb;subdir=gdb \ |
| 19 | file://7001force_define_architecture.patch \ | ||
| 20 | file://7003cross_ranlib.patch \ | 18 | file://7003cross_ranlib.patch \ |
| 21 | file://0001-cross_add_configure_option.patch \ | ||
| 22 | file://donnot-extract-gdb-during-do-compile.patch \ | ||
| 23 | file://gdb_build_jobs_and_not_write_crash_target.patch \ | 19 | file://gdb_build_jobs_and_not_write_crash_target.patch \ |
| 24 | file://0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch \ | 20 | file://0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch \ |
| 25 | file://0002-arm64-add-pac-mask-to-better-support-gdb-stack-unwin.patch \ | ||
| 26 | file://0003-Fix-build-failure-in-readline-lib.patch \ | ||
| 27 | file://0004-tools.c-do-not-use-keywords-nullptr-as-a-variable-in.patch \ | ||
| 28 | file://0005-Fix-build-failure-on-32bit-machine-i686.patch \ | ||
| 29 | file://0001-Use-CC-env-var-to-get-compiler-version.patch \ | 21 | file://0001-Use-CC-env-var-to-get-compiler-version.patch \ |
| 30 | " | 22 | " |
| 31 | SRCREV = "f13853cef53f5c5463a51021edbc81977e2b1405" | 23 | # 0001-Use-CC-env-var-to-get-compiler-version.patch: |
| 24 | # to get the right compiler info into ./crash --buildinfo | ||
| 25 | |||
| 26 | SRCREV = "61fe107ff96a22e7df0029877529b7ce6da36850" | ||
| 27 | #PV = "9.0.2" | ||
| 28 | SRC_URI[gdb.sha256sum] = "bdc1da4a033280ac752e7d34b0418efaa45bed093235cb88e62ea961752a37f8" | ||
| 32 | 29 | ||
| 33 | SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" | ||
| 34 | 30 | ||
| 35 | UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases" | 31 | UPSTREAM_CHECK_URI = "https://github.com/crash-utility/crash/releases" |
| 36 | 32 | ||
| @@ -38,43 +34,90 @@ inherit gettext | |||
| 38 | 34 | ||
| 39 | TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}" | 35 | TARGET_CC_ARCH:append = " ${SELECTED_OPTIMIZATION}" |
| 40 | 36 | ||
| 41 | # crash 7.1.3 and before don't support mips64/riscv64 | 37 | # Target machine constraints preserved from your original layout |
| 42 | COMPATIBLE_HOST:riscv64 = "null" | 38 | COMPATIBLE_HOST:riscv64 = "null" |
| 43 | COMPATIBLE_HOST:riscv32 = "null" | 39 | COMPATIBLE_HOST:riscv32 = "null" |
| 44 | COMPATIBLE_HOST:mipsarchn64 = "null" | 40 | COMPATIBLE_HOST:mipsarchn64 = "null" |
| 45 | COMPATIBLE_HOST:mipsarchn32 = "null" | 41 | COMPATIBLE_HOST:mipsarchn32 = "null" |
| 42 | COMPATIBLE_HOST:libc-musl = 'null' | ||
| 46 | 43 | ||
| 47 | 44 | # add gdb autoconf overrides | |
| 48 | EXTRA_OEMAKE = 'RPMPKG="${PV}" \ | 45 | EXTRA_OEMAKE = ' \ |
| 49 | GDB_TARGET="${TARGET_SYS}" \ | 46 | RPMPKG="${PV}" \ |
| 50 | GDB_HOST="${BUILD_SYS}" \ | 47 | CROSS_COMPILE="${TARGET_PREFIX}" \ |
| 51 | GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ | 48 | HOSTCC="gcc" \ |
| 52 | LDFLAGS="${LDFLAGS}" \ | 49 | CFLAGS="${CFLAGS} -fcommon --sysroot=${STAGING_DIR_TARGET}" \ |
| 53 | ' | 50 | CXXFLAGS="${CXXFLAGS} -fcommon --sysroot=${STAGING_DIR_TARGET}" \ |
| 51 | LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" \ | ||
| 52 | AR="${AR}" \ | ||
| 53 | RANLIB="${RANLIB}" \ | ||
| 54 | GDB_TARGET="${TARGET_SYS}" \ | ||
| 55 | GDB_HOST="${BUILD_SYS}" \ | ||
| 56 | GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ | ||
| 57 | GDB_CONF_FLAGS="--host=${HOST_SYS} \ | ||
| 58 | --target=${TARGET_SYS} \ | ||
| 59 | --disable-gdbserver \ | ||
| 60 | --disable-gprofng \ | ||
| 61 | --with-sysroot=${STAGING_DIR_TARGET} \ | ||
| 62 | ac_cv_type_gregset_t=yes \ | ||
| 63 | ac_cv_type_fpregset_t=yes \ | ||
| 64 | ac_cv_header_sys_procfs_h=yes" \ | ||
| 65 | ' | ||
| 66 | |||
| 67 | TARGET_CFLAGS:append = " -fcommon -fpermissive" | ||
| 68 | TARGET_CXXFLAGS:append = " -fcommon -fpermissive" | ||
| 54 | 69 | ||
| 55 | do_configure() { | 70 | do_configure() { |
| 56 | : | 71 | : |
| 57 | } | 72 | } |
| 58 | 73 | ||
| 59 | do_compile:prepend() { | 74 | do_compile:prepend() { |
| 75 | # 1. Map Yocto architecture strings to the strict naming convention expected by crash | ||
| 60 | case ${TARGET_ARCH} in | 76 | case ${TARGET_ARCH} in |
| 61 | aarch64*) ARCH=ARM64 ;; | 77 | aarch64*) ARCH_UPPER=ARM64 ;; |
| 62 | arm*) ARCH=ARM ;; | 78 | arm*) ARCH_UPPER=ARM ;; |
| 63 | i*86*) ARCH=X86 ;; | 79 | i*86*) ARCH_UPPER=X86 ;; |
| 64 | x86_64*) ARCH=X86_64 ;; | 80 | x86_64*) ARCH_UPPER=X86_64 ;; |
| 65 | powerpc64*) ARCH=PPC64 ;; | 81 | powerpc64*) ARCH_UPPER=PPC64 ;; |
| 66 | powerpc*) ARCH=PPC ;; | 82 | powerpc*) ARCH_UPPER=PPC ;; |
| 67 | mips*) ARCH=MIPS ;; | 83 | mips*) ARCH_UPPER=MIPS ;; |
| 84 | *) ARCH_UPPER=$(echo "${TARGET_ARCH}" | tr '[:lower:]' '[:upper:]') ;; | ||
| 68 | esac | 85 | esac |
| 69 | 86 | ||
| 70 | sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c | 87 | bbnote "Staging pre-unpacked GDB 16.2 source tree into active build workspace layout..." |
| 88 | rm -rf ${B}/gdb-16.2 | ||
| 89 | |||
| 90 | # 2. Copy the official clean GNU tarball source footprint into the active workspace mapping | ||
| 91 | cp -rf ${UNPACKDIR}/gdb/gdb-16.2 ${B}/gdb-16.2 | ||
| 92 | |||
| 93 | # 3. Initialize the localized tracking repository required by the crash build architecture | ||
| 94 | pushd ${B}/gdb-16.2/ | ||
| 95 | git init | ||
| 96 | git add . | ||
| 97 | git commit -m "initial commit" | ||
| 98 | popd | ||
| 99 | |||
| 100 | bbnote "Writing dynamic target layout architecture context: ${ARCH_UPPER}" | ||
| 101 | echo "${ARCH_UPPER}" > ${B}/gdb-16.2/crash.target | ||
| 102 | |||
| 103 | # 4. Apply your original configuration text manipulations natively | ||
| 104 | sed -i s/FORCE_DEFINE_ARCH/"${ARCH_UPPER}"/g ${S}/configure.c | ||
| 71 | sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c | 105 | sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c |
| 72 | sed -i -e 's/#define TARGET_CFLAGS_MIPS_ON_X86_64.*/#define TARGET_CFLAGS_MIPS_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c | 106 | sed -i -e 's/#define TARGET_CFLAGS_MIPS_ON_X86_64.*/#define TARGET_CFLAGS_MIPS_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c |
| 73 | sed -i 's/>/>/g' ${S}/Makefile | 107 | sed -i 's/>/>/g' ${S}/Makefile |
| 108 | |||
| 109 | # 5. Return to the active workspace build root to merge downstream additions | ||
| 110 | cd ${B} | ||
| 111 | bbnote "Applying the native upstream crash integration patch onto the GDB source tree..." | ||
| 112 | patch -p0 --fuzz=3 < gdb-16.2.patch | ||
| 113 | pushd ${B}/gdb-16.2/ | ||
| 114 | git add . | ||
| 115 | git commit -m "after upstream crash gdb-16.2.patch" | ||
| 116 | popd | ||
| 74 | } | 117 | } |
| 75 | 118 | ||
| 76 | do_compile() { | 119 | do_compile() { |
| 77 | oe_runmake ${EXTRA_OEMAKE} RECIPE_SYSROOT=${RECIPE_SYSROOT} | 120 | oe_runmake ${EXTRA_OEMAKE} CC="${CC}" CXX="${CXX}" RECIPE_SYSROOT=${RECIPE_SYSROOT} |
| 78 | } | 121 | } |
| 79 | 122 | ||
| 80 | do_install:prepend () { | 123 | do_install:prepend () { |
| @@ -88,9 +131,11 @@ do_install:prepend () { | |||
| 88 | 131 | ||
| 89 | RDEPENDS:${PN} += "liblzma" | 132 | RDEPENDS:${PN} += "liblzma" |
| 90 | 133 | ||
| 91 | # Causes gcc to get stuck and eat all available memory in qemuarm builds | ||
| 92 | # jenkins 15161 100 12.5 10389596 10321284 ? R 11:40 28:17 /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.2/cc1 -quiet -I . -I . -I ./common -I ./config -I ./../include/opcode -I ./../opcodes/.. -I ./../readline/.. -I ../bfd -I ./../bfd -I ./../include -I ../libdecnumber -I ./../libdecnumber -I ./gnulib/import -I build-gnulib/import -isysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -MMD eval.d -MF .deps/eval.Tpo -MP -MT eval.o -D LOCALEDIR="/usr/local/share/locale" -D CRASH_MERGE -D HAVE_CONFIG_H -D TUI=1 eval.c -quiet -dumpbase eval.c -march=armv5te -mthumb -mthumb-interwork -mtls-dialect=gnu -auxbase-strip eval.o -g -O2 -Wall -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -feliminate-unused-debug-types -o - | ||
| 93 | ARM_INSTRUCTION_SET = "arm" | 134 | ARM_INSTRUCTION_SET = "arm" |
| 94 | 135 | ||
| 95 | # http://errors.yoctoproject.org/Errors/Details/186964/ | 136 | # WARNING: crash-9.0.2-r0 do_package_qa: QA Issue: File /usr/bin/crash in package crash contains reference to TMPDIR [buildpaths] |
| 96 | COMPATIBLE_HOST:libc-musl = 'null' | 137 | # |
| 138 | # WARNING: crash-cross-canadian-aarch64-9.0.2-r0 do_package_qa: QA Issue: File /opt/phytec-ampliphy-resy-systemd/6.0.98-devel/sysroots/x86_64-resysdk-linux/usr/bin/aarch64-resy-linux/crash in package crash-cross-canadian-aarch64 contains reference to TMPDIR [buildpaths] | ||
| 139 | # | ||
| 140 | ERROR_QA:remove = "buildpaths" | ||
| 141 | WARN_QA:append = " buildpaths" | ||
diff --git a/meta-oe/recipes-kernel/crash/crash/0001-Use-CC-env-var-to-get-compiler-version.patch b/meta-oe/recipes-kernel/crash/crash/0001-Use-CC-env-var-to-get-compiler-version.patch index 773598def1..2e4b3fdd4f 100644 --- a/meta-oe/recipes-kernel/crash/crash/0001-Use-CC-env-var-to-get-compiler-version.patch +++ b/meta-oe/recipes-kernel/crash/crash/0001-Use-CC-env-var-to-get-compiler-version.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 6ad5e9302057e157ab701880a8543ca59058df2d Mon Sep 17 00:00:00 2001 | 1 | From df98eb38b680fd633a6e87679d7267252849764d Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?K=C3=A9l=C3=A9fa=20San=C3=A9?= <kelefa.sane@smile.fr> | 2 | From: =?UTF-8?q?K=C3=A9l=C3=A9fa=20San=C3=A9?= <kelefa.sane@smile.fr> |
| 3 | Date: Fri, 16 May 2025 16:18:28 +0200 | 3 | Date: Fri, 16 May 2025 16:18:28 +0200 |
| 4 | Subject: [PATCH v2] Use CC env var to get compiler version | 4 | Subject: [PATCH] Use CC env var to get compiler version |
| 5 | MIME-Version: 1.0 | 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 | 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit | 7 | Content-Transfer-Encoding: 8bit |
| @@ -19,15 +19,16 @@ compiler version, when the CC env var is define. | |||
| 19 | Upstream-Status: Submitted [https://lists.crash-utility.osci.io/archives/list/devel@lists.crash-utility.osci.io/thread/V3G3QH3YW6WZWD56TVTFQIHYLZ33UIJL/] | 19 | Upstream-Status: Submitted [https://lists.crash-utility.osci.io/archives/list/devel@lists.crash-utility.osci.io/thread/V3G3QH3YW6WZWD56TVTFQIHYLZ33UIJL/] |
| 20 | 20 | ||
| 21 | Signed-off-by: Kéléfa Sané <kelefa.sane@smile.fr> | 21 | Signed-off-by: Kéléfa Sané <kelefa.sane@smile.fr> |
| 22 | Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com> | ||
| 22 | --- | 23 | --- |
| 23 | configure.c | 12 +++++++++++- | 24 | configure.c | 12 +++++++++++- |
| 24 | 1 file changed, 11 insertions(+), 1 deletion(-) | 25 | 1 file changed, 11 insertions(+), 1 deletion(-) |
| 25 | 26 | ||
| 26 | diff --git a/configure.c b/configure.c | 27 | diff --git a/configure.c b/configure.c |
| 27 | index 4668c9a..4b65bd7 100644 | 28 | index 6e39d87..74e88b7 100644 |
| 28 | --- a/configure.c | 29 | --- a/configure.c |
| 29 | +++ b/configure.c | 30 | +++ b/configure.c |
| 30 | @@ -1362,7 +1362,17 @@ make_build_data(char *target) | 31 | @@ -1381,7 +1381,17 @@ make_build_data(char *target) |
| 31 | 32 | ||
| 32 | fp1 = popen("date", "r"); | 33 | fp1 = popen("date", "r"); |
| 33 | fp2 = popen("id", "r"); | 34 | fp2 = popen("id", "r"); |
diff --git a/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch b/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch deleted file mode 100644 index fc99ff5187..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/0001-cross_add_configure_option.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | From e3ba432243d9be4e845daabc78a0ae7c03c680f5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 3 | Date: Fri, 9 Jan 2015 11:51:18 +0900 | ||
| 4 | Subject: [PATCH] cross_add_configure_option | ||
| 5 | |||
| 6 | |||
| 7 | --- | ||
| 8 | Upstream-Status: Pending | ||
| 9 | |||
| 10 | Makefile | 4 ++-- | ||
| 11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/Makefile b/Makefile | ||
| 14 | index 7266e305..390fc0ef 100644 | ||
| 15 | --- a/Makefile | ||
| 16 | +++ b/Makefile | ||
| 17 | @@ -260,7 +260,7 @@ gdb_merge: force | ||
| 18 | @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj | ||
| 19 | @rm -f ${PROGRAM} | ||
| 20 | @if [ ! -f ${GDB}/config.status ]; then \ | ||
| 21 | - (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \ | ||
| 22 | + (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \ | ||
| 23 | --with-bugurl="" --with-expat=no --with-python=no --disable-sim; \ | ||
| 24 | $(MAKE) CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ | ||
| 25 | else $(MAKE) rebuild; fi | ||
| 26 | @@ -306,7 +306,7 @@ force: | ||
| 27 | |||
| 28 | make_configure: force | ||
| 29 | @rm -f configure | ||
| 30 | - @${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} | ||
| 31 | + @${BUILD_CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} | ||
| 32 | |||
| 33 | clean: make_configure | ||
| 34 | @./configure ${CONF_TARGET_FLAG} -q -b | ||
diff --git a/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch b/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch index 47182f8b6c..845239db39 100644 --- a/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch +++ b/meta-oe/recipes-kernel/crash/crash/0001-symbol-fix-S-cannot-work-with-kaslr-detection.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 329bd56da28fc1b5b53a60ca2172643d2090435d Mon Sep 17 00:00:00 2001 | 1 | From 35a721485f2a20ebb18d9f4ab48b7cf293369a70 Mon Sep 17 00:00:00 2001 |
| 2 | From: Tao Liu <ltao@redhat.com> | 2 | From: Tao Liu <ltao@redhat.com> |
| 3 | Date: Fri, 13 Dec 2024 08:36:03 +0000 | 3 | Date: Fri, 13 Dec 2024 08:36:03 +0000 |
| 4 | Subject: [PATCH] symbol: fix -S cannot work with kaslr detection | 4 | Subject: [PATCH] symbol: fix -S cannot work with kaslr detection |
| @@ -15,15 +15,16 @@ Upstream-Status: Pending | |||
| 15 | [https://lists.crash-utility.osci.io/archives/list/devel@lists.crash-utility.osci.io/thread/5OXNYPPU6GLLQKCWH7WBNBJXLNZ4EBZD/] | 15 | [https://lists.crash-utility.osci.io/archives/list/devel@lists.crash-utility.osci.io/thread/5OXNYPPU6GLLQKCWH7WBNBJXLNZ4EBZD/] |
| 16 | 16 | ||
| 17 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | 17 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> |
| 18 | Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com> | ||
| 18 | --- | 19 | --- |
| 19 | symbols.c | 18 ++++++++++-------- | 20 | symbols.c | 18 ++++++++++-------- |
| 20 | 1 file changed, 10 insertions(+), 8 deletions(-) | 21 | 1 file changed, 10 insertions(+), 8 deletions(-) |
| 21 | 22 | ||
| 22 | diff --git a/symbols.c b/symbols.c | 23 | diff --git a/symbols.c b/symbols.c |
| 23 | index a3cd0f3..6062d21 100644 | 24 | index e6865ca..0028874 100644 |
| 24 | --- a/symbols.c | 25 | --- a/symbols.c |
| 25 | +++ b/symbols.c | 26 | +++ b/symbols.c |
| 26 | @@ -25,7 +25,7 @@ | 27 | @@ -26,7 +26,7 @@ |
| 27 | 28 | ||
| 28 | static void store_symbols(bfd *, int, void *, long, unsigned int); | 29 | static void store_symbols(bfd *, int, void *, long, unsigned int); |
| 29 | static void store_sysmap_symbols(void); | 30 | static void store_sysmap_symbols(void); |
| @@ -32,7 +33,7 @@ index a3cd0f3..6062d21 100644 | |||
| 32 | static int relocate_force(ulong, char *); | 33 | static int relocate_force(ulong, char *); |
| 33 | static void kaslr_init(void); | 34 | static void kaslr_init(void); |
| 34 | static void strip_module_symbol_end(char *s); | 35 | static void strip_module_symbol_end(char *s); |
| 35 | @@ -230,6 +230,7 @@ symtab_init(void) | 36 | @@ -231,6 +231,7 @@ symtab_init(void) |
| 36 | DEBUGINFO_ERROR_MESSAGE1 : | 37 | DEBUGINFO_ERROR_MESSAGE1 : |
| 37 | DEBUGINFO_ERROR_MESSAGE2); | 38 | DEBUGINFO_ERROR_MESSAGE2); |
| 38 | } | 39 | } |
| @@ -40,7 +41,7 @@ index a3cd0f3..6062d21 100644 | |||
| 40 | store_sysmap_symbols(); | 41 | store_sysmap_symbols(); |
| 41 | return; | 42 | return; |
| 42 | } else if (LKCD_KERNTYPES()) | 43 | } else if (LKCD_KERNTYPES()) |
| 43 | @@ -817,7 +818,7 @@ store_symbols(bfd *abfd, int dynamic, void *minisyms, long symcount, | 44 | @@ -818,7 +819,7 @@ store_symbols(bfd *abfd, int dynamic, void *minisyms, long symcount, |
| 44 | syminfo.type)) { | 45 | syminfo.type)) { |
| 45 | if (kt->flags & (RELOC_SET|RELOC_FORCE)) | 46 | if (kt->flags & (RELOC_SET|RELOC_FORCE)) |
| 46 | sp->value = relocate(syminfo.value, | 47 | sp->value = relocate(syminfo.value, |
| @@ -49,7 +50,7 @@ index a3cd0f3..6062d21 100644 | |||
| 49 | else | 50 | else |
| 50 | sp->value = syminfo.value; | 51 | sp->value = syminfo.value; |
| 51 | sp->type = syminfo.type; | 52 | sp->type = syminfo.type; |
| 52 | @@ -893,9 +894,9 @@ store_sysmap_symbols(void) | 53 | @@ -894,9 +895,9 @@ store_sysmap_symbols(void) |
| 53 | 54 | ||
| 54 | if (machdep->verify_symbol(name, syment.value, | 55 | if (machdep->verify_symbol(name, syment.value, |
| 55 | syment.type)) { | 56 | syment.type)) { |
| @@ -61,7 +62,7 @@ index a3cd0f3..6062d21 100644 | |||
| 61 | else | 62 | else |
| 62 | sp->value = syment.value; | 63 | sp->value = syment.value; |
| 63 | sp->type = syment.type; | 64 | sp->type = syment.type; |
| 64 | @@ -924,7 +925,7 @@ store_sysmap_symbols(void) | 65 | @@ -925,7 +926,7 @@ store_sysmap_symbols(void) |
| 65 | * are not as loaded into the kernel (not unity-mapped). | 66 | * are not as loaded into the kernel (not unity-mapped). |
| 66 | */ | 67 | */ |
| 67 | static ulong | 68 | static ulong |
| @@ -70,7 +71,7 @@ index a3cd0f3..6062d21 100644 | |||
| 70 | { | 71 | { |
| 71 | if (XEN_HYPER_MODE()) { | 72 | if (XEN_HYPER_MODE()) { |
| 72 | kt->flags &= ~(RELOC_SET|RELOC_FORCE); | 73 | kt->flags &= ~(RELOC_SET|RELOC_FORCE); |
| 73 | @@ -937,9 +938,10 @@ relocate(ulong symval, char *symname, int first_symbol) | 74 | @@ -938,9 +939,10 @@ relocate(ulong symval, char *symname, int first_symbol) |
| 74 | break; | 75 | break; |
| 75 | 76 | ||
| 76 | case RELOC_FORCE: | 77 | case RELOC_FORCE: |
| @@ -84,6 +85,3 @@ index a3cd0f3..6062d21 100644 | |||
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | if (machine_type("X86_64")) { | 87 | if (machine_type("X86_64")) { |
| 87 | -- | ||
| 88 | 2.35.5 | ||
| 89 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/0002-arm64-add-pac-mask-to-better-support-gdb-stack-unwin.patch b/meta-oe/recipes-kernel/crash/crash/0002-arm64-add-pac-mask-to-better-support-gdb-stack-unwin.patch deleted file mode 100644 index 42a585d366..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/0002-arm64-add-pac-mask-to-better-support-gdb-stack-unwin.patch +++ /dev/null | |||
| @@ -1,85 +0,0 @@ | |||
| 1 | From 0f39e33d3504f3a17b83574c3be97640460b7eef Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Guanyou.Chen" <chenguanyou@xiaomi.com> | ||
| 3 | Date: Wed, 25 Dec 2024 23:50:28 +0800 | ||
| 4 | Subject: [PATCH] arm64: add pac mask to better support gdb stack unwind | ||
| 5 | |||
| 6 | Currently, gdb passthroughs of 'bt', 'frame', 'up', 'down', | ||
| 7 | 'info, locals' don't work on arm64 machine enabled pauth. | ||
| 8 | This is because gdb does not know the lr register actual values | ||
| 9 | to unwind the stack frames. | ||
| 10 | |||
| 11 | Without the patch: | ||
| 12 | crash> gdb bt | ||
| 13 | #0 __switch_to (prev=0xffffff8001af92c0, next=0xffffff889da7a580) at /proc/self/cwd/common/arch/arm64/kernel/process.c:569 | ||
| 14 | #1 0x9fc5c5d3602132c0 in ?? () | ||
| 15 | Backtrace stopped: previous frame identical to this frame (corrupt stack?) | ||
| 16 | |||
| 17 | With the patch: | ||
| 18 | crash> gdb bt | ||
| 19 | #0 __switch_to (prev=prev@entry=0xffffff8001af92c0, next=next@entry=0xffffff889da7a580) at /proc/self/cwd/common/arch/arm64/kernel/process.c:569 | ||
| 20 | #1 0xffffffd3602132c0 in context_switch (rq=0xffffff8a7295a080, prev=0xffffff8001af92c0, next=0xffffff889da7a580, rf=<optimized out>) at /proc/self/cwd/common/kernel/sched/core.c:5515 | ||
| 21 | #2 __schedule (sched_mode=<optimized out>, sched_mode@entry=2147859424) at /proc/self/cwd/common/kernel/sched/core.c:6843 | ||
| 22 | #3 0xffffffd3602136d8 in schedule () at /proc/self/cwd/common/kernel/sched/core.c:6917 | ||
| 23 | ... | ||
| 24 | |||
| 25 | Signed-off-by: Guanyou.Chen <chenguanyou@xiaomi.com> | ||
| 26 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
| 27 | |||
| 28 | Upstream-Status: Backport [0f39e33 arm64: add pac mask to better support gdb stack unwind] | ||
| 29 | --- | ||
| 30 | gdb-10.2.patch | 23 +++++++++++++++++++++++ | ||
| 31 | gdb_interface.c | 10 ++++++++++ | ||
| 32 | 2 files changed, 33 insertions(+) | ||
| 33 | |||
| 34 | diff --git a/gdb-10.2.patch b/gdb-10.2.patch | ||
| 35 | index c867660..fd6fadb 100644 | ||
| 36 | --- a/gdb-10.2.patch | ||
| 37 | +++ b/gdb-10.2.patch | ||
| 38 | @@ -16216,3 +16216,26 @@ exit 0 | ||
| 39 | printf_filtered (_("Backtrace stopped: %s\n"), | ||
| 40 | frame_stop_reason_string (trailing)); | ||
| 41 | } | ||
| 42 | +--- gdb-10.2/gdb/frame.c.orig | ||
| 43 | ++++ gdb-10.2/gdb/frame.c | ||
| 44 | +@@ -944,6 +944,10 @@ frame_find_by_id (struct frame_id id) | ||
| 45 | + return NULL; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | ++#ifdef CRASH_MERGE | ||
| 49 | ++extern "C" void crash_decode_ptrauth_pc(ulong* pc); | ||
| 50 | ++#endif | ||
| 51 | ++ | ||
| 52 | + static CORE_ADDR | ||
| 53 | + frame_unwind_pc (struct frame_info *this_frame) | ||
| 54 | + { | ||
| 55 | +@@ -974,6 +978,9 @@ frame_unwind_pc (struct frame_info *this_frame) | ||
| 56 | + try | ||
| 57 | + { | ||
| 58 | + pc = gdbarch_unwind_pc (prev_gdbarch, this_frame); | ||
| 59 | ++#ifdef CRASH_MERGE | ||
| 60 | ++ crash_decode_ptrauth_pc(&pc); | ||
| 61 | ++#endif | ||
| 62 | + pc_p = true; | ||
| 63 | + } | ||
| 64 | + catch (const gdb_exception_error &ex) | ||
| 65 | diff --git a/gdb_interface.c b/gdb_interface.c | ||
| 66 | index 315711e..e108d09 100644 | ||
| 67 | --- a/gdb_interface.c | ||
| 68 | +++ b/gdb_interface.c | ||
| 69 | @@ -1083,3 +1083,13 @@ int crash_get_current_task_reg (int regno, const char *regname, | ||
| 70 | return machdep->get_current_task_reg(regno, regname, regsize, value); | ||
| 71 | } | ||
| 72 | |||
| 73 | +/* arm64 kernel lr maybe has patuh */ | ||
| 74 | +void crash_decode_ptrauth_pc(ulong *pc); | ||
| 75 | +void crash_decode_ptrauth_pc(ulong *pc) | ||
| 76 | +{ | ||
| 77 | +#ifdef ARM64 | ||
| 78 | + struct machine_specific *ms = machdep->machspec; | ||
| 79 | + if (is_kernel_text(*pc | ms->CONFIG_ARM64_KERNELPACMASK)) | ||
| 80 | + *pc |= ms->CONFIG_ARM64_KERNELPACMASK; | ||
| 81 | +#endif /* !ARM64 */ | ||
| 82 | +} | ||
| 83 | -- | ||
| 84 | 2.34.1 | ||
| 85 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/0003-Fix-build-failure-in-readline-lib.patch b/meta-oe/recipes-kernel/crash/crash/0003-Fix-build-failure-in-readline-lib.patch deleted file mode 100644 index f3318b3a6a..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/0003-Fix-build-failure-in-readline-lib.patch +++ /dev/null | |||
| @@ -1,136 +0,0 @@ | |||
| 1 | From 772fbb1022911410b5fb773fde37910fc8286041 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lianbo Jiang <lijiang@redhat.com> | ||
| 3 | Date: Fri, 24 Jan 2025 16:12:40 +0800 | ||
| 4 | Subject: [PATCH] Fix build failure in readline lib | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | This is a backported patch from gdb upstream, see the commit | ||
| 10 | 425f843d58c5 ("Import GNU Readline 8.2"), and only backported | ||
| 11 | patch related to compilation errors. | ||
| 12 | |||
| 13 | Without the patch: | ||
| 14 | |||
| 15 | signals.c: In function ‘_rl_handle_signal’: | ||
| 16 | signals.c:62:36: error: ‘return’ with a value, in function returning void [-Wreturn-mismatch] | ||
| 17 | 62 | # define SIGHANDLER_RETURN return (0) | ||
| 18 | | ^ | ||
| 19 | signals.c:290:3: note: in expansion of macro ‘SIGHANDLER_RETURN’ | ||
| 20 | 290 | SIGHANDLER_RETURN; | ||
| 21 | | ^~~~~~~~~~~~~~~~~ | ||
| 22 | signals.c:178:1: note: declared here | ||
| 23 | 178 | _rl_handle_signal (int sig) | ||
| 24 | | ^~~~~~~~~~~~~~~~~ | ||
| 25 | signals.c: In function ‘rl_sigwinch_handler’: | ||
| 26 | signals.c:306:32: error: passing argument 2 of ‘rl_set_sighandler’ from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 27 | 306 | rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch); | ||
| 28 | | ^~~~~~~~~~~~~~~~~~~ | ||
| 29 | | | | ||
| 30 | | void (*)(int) | ||
| 31 | In file included from rldefs.h:31, | ||
| 32 | from signals.c:37: | ||
| 33 | signals.c:81:51: note: expected ‘void (*)(void)’ but argument is of type ‘void (*)(int)’ | ||
| 34 | 81 | static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); | ||
| 35 | |||
| 36 | Note: the current build failure was observed on gcc (GCC) 15.0.0. | ||
| 37 | |||
| 38 | Signed-off-by: Lianbo Jiang <lijiang@redhat.com> | ||
| 39 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
| 40 | |||
| 41 | Upstream-Status: Backport [772fbb1 Fix build failure in readline lib] | ||
| 42 | --- | ||
| 43 | gdb-10.2.patch | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
| 44 | 1 file changed, 82 insertions(+) | ||
| 45 | |||
| 46 | diff --git a/gdb-10.2.patch b/gdb-10.2.patch | ||
| 47 | index fd6fadb..8f5d7db 100644 | ||
| 48 | --- a/gdb-10.2.patch | ||
| 49 | +++ b/gdb-10.2.patch | ||
| 50 | @@ -16239,3 +16239,85 @@ exit 0 | ||
| 51 | pc_p = true; | ||
| 52 | } | ||
| 53 | catch (const gdb_exception_error &ex) | ||
| 54 | +--- gdb-10.2/readline/readline/signals.c.orig | ||
| 55 | ++++ gdb-10.2/readline/readline/signals.c | ||
| 56 | +@@ -48,23 +48,11 @@ | ||
| 57 | + | ||
| 58 | + #if defined (HANDLE_SIGNALS) | ||
| 59 | + | ||
| 60 | +-#if !defined (RETSIGTYPE) | ||
| 61 | +-# if defined (VOID_SIGHANDLER) | ||
| 62 | +-# define RETSIGTYPE void | ||
| 63 | +-# else | ||
| 64 | +-# define RETSIGTYPE int | ||
| 65 | +-# endif /* !VOID_SIGHANDLER */ | ||
| 66 | +-#endif /* !RETSIGTYPE */ | ||
| 67 | +- | ||
| 68 | +-#if defined (VOID_SIGHANDLER) | ||
| 69 | +-# define SIGHANDLER_RETURN return | ||
| 70 | +-#else | ||
| 71 | +-# define SIGHANDLER_RETURN return (0) | ||
| 72 | +-#endif | ||
| 73 | ++#define SIGHANDLER_RETURN return | ||
| 74 | + | ||
| 75 | + /* This typedef is equivalent to the one for Function; it allows us | ||
| 76 | + to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ | ||
| 77 | +-typedef RETSIGTYPE SigHandler (); | ||
| 78 | ++typedef void SigHandler (int); | ||
| 79 | + | ||
| 80 | + #if defined (HAVE_POSIX_SIGNALS) | ||
| 81 | + typedef struct sigaction sighandler_cxt; | ||
| 82 | +@@ -78,12 +66,12 @@ typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt | ||
| 83 | + # define SA_RESTART 0 | ||
| 84 | + #endif | ||
| 85 | + | ||
| 86 | +-static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); | ||
| 87 | +-static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); | ||
| 88 | +-static void rl_maybe_restore_sighandler PARAMS((int, sighandler_cxt *)); | ||
| 89 | ++static SigHandler *rl_set_sighandler (int, SigHandler *, sighandler_cxt *); | ||
| 90 | ++static void rl_maybe_set_sighandler (int, SigHandler *, sighandler_cxt *); | ||
| 91 | ++static void rl_maybe_restore_sighandler (int, sighandler_cxt *); | ||
| 92 | + | ||
| 93 | +-static RETSIGTYPE rl_signal_handler PARAMS((int)); | ||
| 94 | +-static RETSIGTYPE _rl_handle_signal PARAMS((int)); | ||
| 95 | ++static void rl_signal_handler (int); | ||
| 96 | ++static void _rl_handle_signal (int); | ||
| 97 | + | ||
| 98 | + /* Exported variables for use by applications. */ | ||
| 99 | + | ||
| 100 | +@@ -137,7 +125,7 @@ void *_rl_sigcleanarg; | ||
| 101 | + /* Readline signal handler functions. */ | ||
| 102 | + | ||
| 103 | + /* Called from RL_CHECK_SIGNALS() macro */ | ||
| 104 | +-RETSIGTYPE | ||
| 105 | ++void | ||
| 106 | + _rl_signal_handler (int sig) | ||
| 107 | + { | ||
| 108 | + _rl_caught_signal = 0; /* XXX */ | ||
| 109 | +@@ -160,7 +148,7 @@ _rl_signal_handler (int sig) | ||
| 110 | + SIGHANDLER_RETURN; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | +-static RETSIGTYPE | ||
| 114 | ++static void | ||
| 115 | + rl_signal_handler (int sig) | ||
| 116 | + { | ||
| 117 | + if (_rl_interrupt_immediately) | ||
| 118 | +@@ -174,7 +162,7 @@ rl_signal_handler (int sig) | ||
| 119 | + SIGHANDLER_RETURN; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | +-static RETSIGTYPE | ||
| 123 | ++static void | ||
| 124 | + _rl_handle_signal (int sig) | ||
| 125 | + { | ||
| 126 | + #if defined (HAVE_POSIX_SIGNALS) | ||
| 127 | +@@ -291,7 +279,7 @@ _rl_handle_signal (int sig) | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + #if defined (SIGWINCH) | ||
| 131 | +-static RETSIGTYPE | ||
| 132 | ++static void | ||
| 133 | + rl_sigwinch_handler (int sig) | ||
| 134 | + { | ||
| 135 | + SigHandler *oh; | ||
| 136 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/0004-tools.c-do-not-use-keywords-nullptr-as-a-variable-in.patch b/meta-oe/recipes-kernel/crash/crash/0004-tools.c-do-not-use-keywords-nullptr-as-a-variable-in.patch deleted file mode 100644 index e4bd4cd3a9..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/0004-tools.c-do-not-use-keywords-nullptr-as-a-variable-in.patch +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | From 325a9d1b3b4ce76bf4556235c885e619e219622c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lianbo Jiang <lijiang@redhat.com> | ||
| 3 | Date: Fri, 24 Jan 2025 15:32:59 +0800 | ||
| 4 | Subject: [PATCH] tools.c: do not use keywords 'nullptr' as a variable in code | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Without the patch: | ||
| 10 | |||
| 11 | tools.c: In function ‘drop_core’: | ||
| 12 | tools.c:6251:23: error: expected identifier or ‘(’ before ‘nullptr’ | ||
| 13 | 6251 | volatile int *nullptr; | ||
| 14 | | ^~~~~~~ | ||
| 15 | tools.c:6259:17: error: lvalue required as left operand of assignment | ||
| 16 | 6259 | nullptr = NULL; | ||
| 17 | | ^ | ||
| 18 | tools.c:6261:21: error: invalid type argument of unary ‘*’ (have ‘typeof (nullptr)’) | ||
| 19 | 6261 | i = *nullptr; | ||
| 20 | | ^~~~~~~~ | ||
| 21 | make[6]: *** [Makefile:345: tools.o] Error 1 | ||
| 22 | |||
| 23 | Note: this was observed on gcc version 15.0.1 | ||
| 24 | |||
| 25 | Signed-off-by: Lianbo Jiang <lijiang@redhat.com> | ||
| 26 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
| 27 | |||
| 28 | Upstream-Status: Backport [325a9d1 tools.c: do not use keywords 'nullptr' as a variable in code] | ||
| 29 | --- | ||
| 30 | tools.c | 6 +++--- | ||
| 31 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 32 | |||
| 33 | diff --git a/tools.c b/tools.c | ||
| 34 | index 85d8b6f..c9305be 100644 | ||
| 35 | --- a/tools.c | ||
| 36 | +++ b/tools.c | ||
| 37 | @@ -6248,7 +6248,7 @@ lowest_bit_long(ulong val) | ||
| 38 | void | ||
| 39 | drop_core(char *s) | ||
| 40 | { | ||
| 41 | - volatile int *nullptr; | ||
| 42 | + volatile int *ptr; | ||
| 43 | int i ATTRIBUTE_UNUSED; | ||
| 44 | |||
| 45 | if (s && ascii_string(s)) | ||
| 46 | @@ -6256,9 +6256,9 @@ drop_core(char *s) | ||
| 47 | |||
| 48 | kill((pid_t)pc->program_pid, 3); | ||
| 49 | |||
| 50 | - nullptr = NULL; | ||
| 51 | + ptr = NULL; | ||
| 52 | while (TRUE) | ||
| 53 | - i = *nullptr; | ||
| 54 | + i = *ptr; | ||
| 55 | } | ||
| 56 | |||
| 57 | |||
| 58 | -- | ||
| 59 | 2.34.1 | ||
| 60 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch b/meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch deleted file mode 100644 index e4796b9ced..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/0005-Fix-build-failure-on-32bit-machine-i686.patch +++ /dev/null | |||
| @@ -1,83 +0,0 @@ | |||
| 1 | From 2724bb1d0260f3886f8a3d533838caf80c7e61e5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lianbo Jiang <lijiang@redhat.com> | ||
| 3 | Date: Fri, 24 Jan 2025 17:56:23 +0800 | ||
| 4 | Subject: [PATCH 10/10] Fix build failure on 32bit machine(i686) | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | This issue was caused by commit 0f39e33d3504 with the following | ||
| 10 | compilation error: | ||
| 11 | |||
| 12 | frame.c: In function ‘CORE_ADDR frame_unwind_pc(frame_info*)’: | ||
| 13 | frame.c:982:35: error: cannot convert ‘CORE_ADDR*’ {aka ‘long long unsigned int*’} to ‘ulong*’ {aka ‘long unsigned int*’} | ||
| 14 | 982 | crash_decode_ptrauth_pc(&pc); | ||
| 15 | | ^~~ | ||
| 16 | | | | ||
| 17 | | CORE_ADDR* {aka long long unsigned int*} | ||
| 18 | frame.c:948:48: note: initializing argument 1 of ‘void crash_decode_ptrauth_pc(ulong*)’ | ||
| 19 | 948 | extern "C" void crash_decode_ptrauth_pc(ulong* pc); | ||
| 20 | | ~~~~~~~^~ | ||
| 21 | |||
| 22 | Upstream-Status: Backport [https://github.com/crash-utility/crash/commit/2724bb1d0260f3886f8a3d533838caf80c7e61e5] | ||
| 23 | Fixes: 0f39e33d3504 ("arm64: add pac mask to better support gdb stack unwind") | ||
| 24 | Reported-by: Guanyou.Chen <chenguanyou@xiaomi.com> | ||
| 25 | Signed-off-by: Lianbo Jiang <lijiang@redhat.com> | ||
| 26 | --- | ||
| 27 | gdb-10.2.patch | 6 +++--- | ||
| 28 | gdb_interface.c | 4 ++-- | ||
| 29 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
| 30 | |||
| 31 | diff --git a/gdb-10.2.patch b/gdb-10.2.patch | ||
| 32 | index 8f5d7db22840..d22f2d6d75bc 100644 | ||
| 33 | --- a/gdb-10.2.patch | ||
| 34 | +++ b/gdb-10.2.patch | ||
| 35 | @@ -55,7 +55,7 @@ exit 0 | ||
| 36 | # your system doesn't have fcntl.h in /usr/include (which is where it | ||
| 37 | # should be according to Posix). | ||
| 38 | -DEFS = @DEFS@ | ||
| 39 | -+DEFS = -DCRASH_MERGE @DEFS@ | ||
| 40 | ++DEFS = -DCRASH_MERGE -D${CRASH_TARGET} @DEFS@ | ||
| 41 | GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \ | ||
| 42 | -DLOCALEDIR="\"$(localedir)\"" $(DEFS) | ||
| 43 | |||
| 44 | @@ -16222,7 +16222,7 @@ exit 0 | ||
| 45 | return NULL; | ||
| 46 | } | ||
| 47 | |||
| 48 | -+#ifdef CRASH_MERGE | ||
| 49 | ++#if defined(CRASH_MERGE) && defined(ARM64) | ||
| 50 | +extern "C" void crash_decode_ptrauth_pc(ulong* pc); | ||
| 51 | +#endif | ||
| 52 | + | ||
| 53 | @@ -16233,7 +16233,7 @@ exit 0 | ||
| 54 | try | ||
| 55 | { | ||
| 56 | pc = gdbarch_unwind_pc (prev_gdbarch, this_frame); | ||
| 57 | -+#ifdef CRASH_MERGE | ||
| 58 | ++#if defined(CRASH_MERGE) && defined(ARM64) | ||
| 59 | + crash_decode_ptrauth_pc(&pc); | ||
| 60 | +#endif | ||
| 61 | pc_p = true; | ||
| 62 | diff --git a/gdb_interface.c b/gdb_interface.c | ||
| 63 | index e108d097ee5f..c2e99f5c156a 100644 | ||
| 64 | --- a/gdb_interface.c | ||
| 65 | +++ b/gdb_interface.c | ||
| 66 | @@ -1084,12 +1084,12 @@ int crash_get_current_task_reg (int regno, const char *regname, | ||
| 67 | } | ||
| 68 | |||
| 69 | /* arm64 kernel lr maybe has patuh */ | ||
| 70 | +#ifdef ARM64 | ||
| 71 | void crash_decode_ptrauth_pc(ulong *pc); | ||
| 72 | void crash_decode_ptrauth_pc(ulong *pc) | ||
| 73 | { | ||
| 74 | -#ifdef ARM64 | ||
| 75 | struct machine_specific *ms = machdep->machspec; | ||
| 76 | if (is_kernel_text(*pc | ms->CONFIG_ARM64_KERNELPACMASK)) | ||
| 77 | *pc |= ms->CONFIG_ARM64_KERNELPACMASK; | ||
| 78 | -#endif /* !ARM64 */ | ||
| 79 | } | ||
| 80 | +#endif /* !ARM64 */ | ||
| 81 | -- | ||
| 82 | 2.47.1 | ||
| 83 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/7001force_define_architecture.patch b/meta-oe/recipes-kernel/crash/crash/7001force_define_architecture.patch deleted file mode 100644 index b5f97228de..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/7001force_define_architecture.patch +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | diff -uprN crash-5.1.8.org/configure.c crash-5.1.8/configure.c | ||
| 4 | --- crash-5.1.8.org/configure.c 2011-09-17 04:01:12.000000000 +0900 | ||
| 5 | +++ crash-5.1.8/configure.c 2012-09-13 13:28:45.393344108 +0900 | ||
| 6 | @@ -391,6 +391,9 @@ get_current_configuration(struct support | ||
| 7 | arch_mismatch(sp); | ||
| 8 | } | ||
| 9 | |||
| 10 | + /** Force define archtecture */ | ||
| 11 | + target_data.target = FORCE_DEFINE_ARCH; | ||
| 12 | + | ||
| 13 | if ((fp = fopen("Makefile", "r")) == NULL) { | ||
| 14 | perror("Makefile"); | ||
| 15 | goto get_release; | ||
diff --git a/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch b/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch index 2d01453059..17439c7263 100644 --- a/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch +++ b/meta-oe/recipes-kernel/crash/crash/7003cross_ranlib.patch | |||
| @@ -1,19 +1,19 @@ | |||
| 1 | From 2f200ceed289f935b5e7ec230454a22dd76e42b0 Mon Sep 17 00:00:00 2001 | 1 | From 72921a32cc2c1df390265e8c4e205bc5ba2b985d Mon Sep 17 00:00:00 2001 |
| 2 | From: leimaohui <leimaohui@cn.fujitsu.com> | 2 | From: leimaohui <leimaohui@cn.fujitsu.com> |
| 3 | Date: Mon, 12 Jan 2015 11:52:35 +0800 | 3 | Date: Mon, 12 Jan 2015 11:52:35 +0800 |
| 4 | Subject: [PATCH] crash: add new recipe | 4 | Subject: [PATCH] crash: add new recipe |
| 5 | 5 | ||
| 6 | --- | ||
| 7 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
| 8 | 7 | Signed-off-by: Robert.Berger <Robert.Berger@ReliableEmbeddedSystems.com> | |
| 8 | --- | ||
| 9 | Makefile | 1 + | 9 | Makefile | 1 + |
| 10 | 1 file changed, 1 insertion(+) | 10 | 1 file changed, 1 insertion(+) |
| 11 | 11 | ||
| 12 | diff --git a/Makefile b/Makefile | 12 | diff --git a/Makefile b/Makefile |
| 13 | index 79aef176..7266e305 100644 | 13 | index 58b1326..f2c945a 100644 |
| 14 | --- a/Makefile | 14 | --- a/Makefile |
| 15 | +++ b/Makefile | 15 | +++ b/Makefile |
| 16 | @@ -295,6 +295,7 @@ gdb_patch: | 16 | @@ -349,6 +349,7 @@ gdb_patch: |
| 17 | 17 | ||
| 18 | library: ${OBJECT_FILES} | 18 | library: ${OBJECT_FILES} |
| 19 | ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} | 19 | ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} |
diff --git a/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch b/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch deleted file mode 100644 index 16382877d0..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/donnot-extract-gdb-during-do-compile.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From 8b882650b730cb6e025d47d65574f43549b7a1a3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
| 3 | Date: Thu, 9 Mar 2023 10:28:28 +0800 | ||
| 4 | Subject: [PATCH] Makefile: Put gdb source tarball in SRC_URI | ||
| 5 | |||
| 6 | Put gdb source tarball in SRC_URI and don't fetch and extract it during | ||
| 7 | do_compile. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [embedded specific] | ||
| 10 | |||
| 11 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 12 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
| 13 | --- | ||
| 14 | Makefile | 8 +------- | ||
| 15 | 1 file changed, 1 insertion(+), 7 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/Makefile b/Makefile | ||
| 18 | index 79aef17..146da6a 100644 | ||
| 19 | --- a/Makefile | ||
| 20 | +++ b/Makefile | ||
| 21 | @@ -254,7 +254,7 @@ all: make_configure | ||
| 22 | # @$(MAKE) extensions | ||
| 23 | |||
| 24 | gdb_merge: force | ||
| 25 | - @if [ ! -f ${GDB}/README ]; then \ | ||
| 26 | + @if [ ! -f ${GDB}/${GDB}.patch ]; then \ | ||
| 27 | $(MAKE) gdb_unzip; fi | ||
| 28 | @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs | ||
| 29 | @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj | ||
| 30 | @@ -281,12 +281,6 @@ gdb_unzip: | ||
| 31 | @rm -f gdb.files | ||
| 32 | @for FILE in ${GDB_FILES} dummy; do\ | ||
| 33 | echo $$FILE >> gdb.files; done | ||
| 34 | - @if [ ! -f ${GDB}.tar.gz ] && [ ! -f /usr/bin/wget ]; then \ | ||
| 35 | - echo /usr/bin/wget is required to download ${GDB}.tar.gz; echo; exit 1; fi | ||
| 36 | - @if [ ! -f ${GDB}.tar.gz ] && [ -f /usr/bin/wget ]; then \ | ||
| 37 | - [ ! -t 2 ] && WGET_OPTS="--progress=dot:mega"; \ | ||
| 38 | - wget $$WGET_OPTS http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi | ||
| 39 | - @tar --exclude-from gdb.files -xzmf ${GDB}.tar.gz | ||
| 40 | @$(MAKE) gdb_patch | ||
| 41 | |||
| 42 | gdb_patch: | ||
| 43 | -- | ||
| 44 | 2.25.1 | ||
| 45 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch b/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch index 257b4dd2bf..a0f8e24cfa 100644 --- a/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch +++ b/meta-oe/recipes-kernel/crash/crash/gdb_build_jobs_and_not_write_crash_target.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From af49d8df559aa18f97d14ab7971f211238a16041 Mon Sep 17 00:00:00 2001 | 1 | From 43d02dfa24f9f04e60911593e47e9cc2d68562e3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Mingli Yu <mingli.yu@windriver.com> | 2 | From: Mingli Yu <mingli.yu@windriver.com> |
| 3 | Date: Thu, 9 Mar 2023 10:50:10 +0800 | 3 | Date: Thu, 9 Mar 2023 10:50:10 +0800 |
| 4 | Subject: [PATCH] Makefile: Don't write ${TARGET} to crash.target | 4 | Subject: [PATCH] Makefile: Don't write ${TARGET} to crash.target |
| @@ -14,17 +14,18 @@ Don't write ${TARGET} to crash.target which causes rebuild fails. | |||
| 14 | 14 | ||
| 15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | 15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
| 16 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | 16 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> |
| 17 | Signed-off-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com> | ||
| 17 | --- | 18 | --- |
| 18 | Makefile | 4 ++-- | 19 | Makefile | 4 ++-- |
| 19 | 1 file changed, 2 insertions(+), 2 deletions(-) | 20 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 20 | 21 | ||
| 21 | diff --git a/Makefile b/Makefile | 22 | diff --git a/Makefile b/Makefile |
| 22 | index cd25c7d..d61c4c5 100644 | 23 | index f2c945a..9fdb29b 100644 |
| 23 | --- a/Makefile | 24 | --- a/Makefile |
| 24 | +++ b/Makefile | 25 | +++ b/Makefile |
| 25 | @@ -262,8 +262,8 @@ gdb_merge: force | 26 | @@ -316,8 +316,8 @@ gdb_merge: force |
| 26 | @if [ ! -f ${GDB}/config.status ]; then \ | 27 | @if [ ! -f ${GDB}/config.status ]; then \ |
| 27 | (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \ | 28 | (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \ |
| 28 | --with-bugurl="" --with-expat=no --with-python=no --disable-sim; \ | 29 | --with-bugurl="" --with-expat=no --with-python=no --disable-sim; \ |
| 29 | - $(MAKE) CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ | 30 | - $(MAKE) CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ |
| 30 | - else $(MAKE) rebuild; fi | 31 | - else $(MAKE) rebuild; fi |
| @@ -33,6 +34,3 @@ index cd25c7d..d61c4c5 100644 | |||
| 33 | @if [ ! -f ${PROGRAM} ]; then \ | 34 | @if [ ! -f ${PROGRAM} ]; then \ |
| 34 | echo; echo "${PROGRAM} build failed"; \ | 35 | echo; echo "${PROGRAM} build failed"; \ |
| 35 | echo; exit 1; fi | 36 | echo; exit 1; fi |
| 36 | -- | ||
| 37 | 2.25.1 | ||
| 38 | |||
diff --git a/meta-oe/recipes-kernel/crash/crash_8.0.6.bb b/meta-oe/recipes-kernel/crash/crash_9.0.2.bb index 893d4de410..d0f0de7e5f 100644 --- a/meta-oe/recipes-kernel/crash/crash_8.0.6.bb +++ b/meta-oe/recipes-kernel/crash/crash_9.0.2.bb | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | require crash.inc | 1 | require crash.inc |
| 2 | 2 | ||
| 3 | |||
| 4 | BBCLASSEXTEND = "native cross" | 3 | BBCLASSEXTEND = "native cross" |
| 5 | 4 | ||
| 6 | EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ | 5 | EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ |
