From a4031df72d4b2dfc87d270221c339a50c7fc0d6e Mon Sep 17 00:00:00 2001 From: Frederic Martinsons Date: Sun, 17 Dec 2023 08:39:41 +0100 Subject: crash: update to 8.0.4 Remove backported commit. Signed-off-by: Frederic Martinsons Signed-off-by: Khem Raj --- .../crash/crash-cross-canadian_8.0.2.bb | 53 ----------------- .../crash/crash-cross-canadian_8.0.4.bb | 53 +++++++++++++++++ meta-oe/recipes-kernel/crash/crash.inc | 3 +- .../0001-make-src-string-const-in-strlcpy.patch | 69 ---------------------- meta-oe/recipes-kernel/crash/crash_8.0.2.bb | 29 --------- meta-oe/recipes-kernel/crash/crash_8.0.4.bb | 29 +++++++++ 6 files changed, 83 insertions(+), 153 deletions(-) delete mode 100644 meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.2.bb create mode 100644 meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.4.bb delete mode 100644 meta-oe/recipes-kernel/crash/crash/0001-make-src-string-const-in-strlcpy.patch delete mode 100644 meta-oe/recipes-kernel/crash/crash_8.0.2.bb create mode 100644 meta-oe/recipes-kernel/crash/crash_8.0.4.bb diff --git a/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.2.bb b/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.2.bb deleted file mode 100644 index 04be12602c..0000000000 --- a/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.2.bb +++ /dev/null @@ -1,53 +0,0 @@ -inherit cross-canadian - -SUMMARY = "crash utility (cross-canadian crash for ${TARGET_ARCH} target)" -PN = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}" -BPN = "crash" - -require crash.inc - -PR = "${INC_PR}.0" - -DEPENDS = "\ - nativesdk-ncurses \ - nativesdk-expat \ - nativesdk-gettext \ - nativesdk-gmp \ - nativesdk-mpfr \ - nativesdk-readline \ - nativesdk-zlib \ - virtual/${HOST_PREFIX}gcc \ - virtual/${HOST_PREFIX}binutils \ - virtual/nativesdk-${HOST_PREFIX}compilerlibs \ - virtual/nativesdk-libc" - -RDEPENDS:${PN} = "nativesdk-liblzma" - -EXTRA_OEMAKE:class-cross-canadian = 'RPMPKG="${PV}" \ - GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \ - GDB_HOST="${HOST_SYS}" \ - GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ - LDFLAGS="${LDFLAGS}" \ - ' - -# To ship crash into your sdk, you should create/update a packagegroup-cross-canadian.bbappend and -# add the following -# CRASH = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}" -# RDEPENDS:${PN} += "${@all_multilib_tune_values(d, 'CRASH')}" -# -# You should also add some kernel packages in your sdk, add the followng in your conf/local.conf: -# -# TOOLCHAIN_TARGET_TASK += "\ -# kernel-vmlinux \ -# kernel-dbg \ -# kernel-dev \ -# " -# -# After sourcing the sdk environment script, you can analyze a kernel panic dump with -# -# crash $OECORE_TARGET_SYSROOT/boot/ $OECORE_TARGET_SYSROOT/boot/ - -do_install:class-cross-canadian () { - install -m 0755 ${S}/crash ${D}/${bindir} - cross_canadian_bindirlinks -} diff --git a/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.4.bb b/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.4.bb new file mode 100644 index 0000000000..04be12602c --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-cross-canadian_8.0.4.bb @@ -0,0 +1,53 @@ +inherit cross-canadian + +SUMMARY = "crash utility (cross-canadian crash for ${TARGET_ARCH} target)" +PN = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}" +BPN = "crash" + +require crash.inc + +PR = "${INC_PR}.0" + +DEPENDS = "\ + nativesdk-ncurses \ + nativesdk-expat \ + nativesdk-gettext \ + nativesdk-gmp \ + nativesdk-mpfr \ + nativesdk-readline \ + nativesdk-zlib \ + virtual/${HOST_PREFIX}gcc \ + virtual/${HOST_PREFIX}binutils \ + virtual/nativesdk-${HOST_PREFIX}compilerlibs \ + virtual/nativesdk-libc" + +RDEPENDS:${PN} = "nativesdk-liblzma" + +EXTRA_OEMAKE:class-cross-canadian = 'RPMPKG="${PV}" \ + GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \ + GDB_HOST="${HOST_SYS}" \ + GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ + LDFLAGS="${LDFLAGS}" \ + ' + +# To ship crash into your sdk, you should create/update a packagegroup-cross-canadian.bbappend and +# add the following +# CRASH = "crash-cross-canadian-${TRANSLATED_TARGET_ARCH}" +# RDEPENDS:${PN} += "${@all_multilib_tune_values(d, 'CRASH')}" +# +# You should also add some kernel packages in your sdk, add the followng in your conf/local.conf: +# +# TOOLCHAIN_TARGET_TASK += "\ +# kernel-vmlinux \ +# kernel-dbg \ +# kernel-dev \ +# " +# +# After sourcing the sdk environment script, you can analyze a kernel panic dump with +# +# crash $OECORE_TARGET_SYSROOT/boot/ $OECORE_TARGET_SYSROOT/boot/ + +do_install:class-cross-canadian () { + install -m 0755 ${S}/crash ${D}/${bindir} + cross_canadian_bindirlinks +} diff --git a/meta-oe/recipes-kernel/crash/crash.inc b/meta-oe/recipes-kernel/crash/crash.inc index 8d700ed484..04318b1505 100644 --- a/meta-oe/recipes-kernel/crash/crash.inc +++ b/meta-oe/recipes-kernel/crash/crash.inc @@ -22,9 +22,8 @@ SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=http file://0001-cross_add_configure_option.patch \ file://donnot-extract-gdb-during-do-compile.patch \ file://gdb_build_jobs_and_not_write_crash_target.patch \ - file://0001-make-src-string-const-in-strlcpy.patch \ " -SRCREV = "f1cd581d1c4afa5b8ffdfaa6a3ea9f545fe4ec91" +SRCREV = "a6832f608cb5d473739cf33bbf84ab1df8d98fd5" SRC_URI[gdb.sha256sum] = "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350" diff --git a/meta-oe/recipes-kernel/crash/crash/0001-make-src-string-const-in-strlcpy.patch b/meta-oe/recipes-kernel/crash/crash/0001-make-src-string-const-in-strlcpy.patch deleted file mode 100644 index 546973e0ac..0000000000 --- a/meta-oe/recipes-kernel/crash/crash/0001-make-src-string-const-in-strlcpy.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 4ee56105881d7bb1da1e668ac5bb47a4e0846676 Mon Sep 17 00:00:00 2001 -From: Lianbo Jiang -Date: Wed, 5 Jul 2023 10:02:59 +0800 -Subject: [PATCH] Fix compilation error due to new strlcpy function that glibc - added -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The crash-utility has its own strlcpy(), but recently the latest glibc -has also implemented the strlcpy function, which is derived from -OpenBSD. Eventually this caused the following compilation error: - - # make -j8 lzo - ... - In file included from global_data.c:18: - defs.h:5556:8: error: conflicting types for ‘strlcpy’; have ‘size_t(char *, char *, size_t)’ {aka ‘long unsigned int(char *, char *, long unsigned int)’} - 5556 | size_t strlcpy(char *, char *, size_t); - | ^~~~~~~ - In file included from memory.c:19: - defs.h:5556:8: error: conflicting types for ‘strlcpy’; have ‘size_t(char *, char *, size_t)’ {aka ‘long unsigned int(char *, char *, long unsigned int)’} - 5556 | size_t strlcpy(char *, char *, size_t); - | ^~~~~~~ - ... - -To fix the issue, let's declare the strlcpy() as a weak function and -keep the same parameter types as the glibc function has. - -Related glibc commits: -454a20c8756c ("Implement strlcpy and strlcat [BZ #178]") -d2fda60e7c40 ("manual: Manual update for strlcat, strlcpy, wcslcat, wclscpy") -388ae538ddcb ("hurd: Add strlcpy, strlcat, wcslcpy, wcslcat to libc.abilist") - -Upstream-Status: Backport [https://github.com/kraj/crash/commit/4ee56105881d7bb1da1e668ac5bb47a4e0846676] -Signed-off-by: Lianbo Jiang ---- - defs.h | 2 +- - tools.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/defs.h b/defs.h -index 8f7d1fa..26afe23 100644 ---- a/defs.h -+++ b/defs.h -@@ -5553,7 +5553,7 @@ uint32_t swap32(uint32_t, int); - uint64_t swap64(uint64_t, int); - ulong *get_cpumask_buf(void); - int make_cpumask(char *, ulong *, int, int *); --size_t strlcpy(char *, char *, size_t); -+size_t strlcpy(char *, const char *, size_t) __attribute__ ((__weak__)); - struct rb_node *rb_first(struct rb_root *); - struct rb_node *rb_parent(struct rb_node *, struct rb_node *); - struct rb_node *rb_right(struct rb_node *, struct rb_node *); -diff --git a/tools.c b/tools.c -index 392a797..0f2db10 100644 ---- a/tools.c -+++ b/tools.c -@@ -6795,7 +6795,7 @@ make_cpumask_error: - * always be NULL-terminated. - */ - size_t --strlcpy(char *dest, char *src, size_t size) -+strlcpy(char *dest, const char *src, size_t size) - { - size_t ret = strlen(src); - --- -2.41.0 - diff --git a/meta-oe/recipes-kernel/crash/crash_8.0.2.bb b/meta-oe/recipes-kernel/crash/crash_8.0.2.bb deleted file mode 100644 index cc46ab9ea7..0000000000 --- a/meta-oe/recipes-kernel/crash/crash_8.0.2.bb +++ /dev/null @@ -1,29 +0,0 @@ -require crash.inc - -PR = "${INC_PR}.0" - -BBCLASSEXTEND = "native cross" - -EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ - GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \ - GDB_HOST="${BUILD_SYS}" \ - GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ - ' - -EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'" -EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'" - -do_install:class-target () { - oe_runmake DESTDIR=${D} install -} - -do_install:class-native () { - oe_runmake DESTDIR=${D}${STAGING_DIR_NATIVE} install -} - -do_install:class-cross () { - install -m 0755 ${S}/crash ${D}/${bindir} -} - -RDEPENDS:${PN}:class-native = "" -RDEPENDS:${PN}:class-cross = "" diff --git a/meta-oe/recipes-kernel/crash/crash_8.0.4.bb b/meta-oe/recipes-kernel/crash/crash_8.0.4.bb new file mode 100644 index 0000000000..cc46ab9ea7 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash_8.0.4.bb @@ -0,0 +1,29 @@ +require crash.inc + +PR = "${INC_PR}.0" + +BBCLASSEXTEND = "native cross" + +EXTRA_OEMAKE:class-cross = 'RPMPKG="${PV}" \ + GDB_TARGET="${BUILD_SYS} --target=${TARGET_SYS}" \ + GDB_HOST="${BUILD_SYS}" \ + GDB_MAKE_JOBS="${PARALLEL_MAKE}" \ + ' + +EXTRA_OEMAKE:append:class-native = " LDFLAGS='${BUILD_LDFLAGS}'" +EXTRA_OEMAKE:append:class-cross = " LDFLAGS='${BUILD_LDFLAGS}'" + +do_install:class-target () { + oe_runmake DESTDIR=${D} install +} + +do_install:class-native () { + oe_runmake DESTDIR=${D}${STAGING_DIR_NATIVE} install +} + +do_install:class-cross () { + install -m 0755 ${S}/crash ${D}/${bindir} +} + +RDEPENDS:${PN}:class-native = "" +RDEPENDS:${PN}:class-cross = "" -- cgit v1.2.3-54-g00ecf