Projects
openEuler:Mainline
crash
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
_service:tar_scm:crash.spec
Changed
@@ -1,6 +1,6 @@ Name: crash Version: 8.0.2 -Release: 2 +Release: 3 Summary: Linux kernel crash utility. License: GPLv3 URL: https://crash-utility.github.io @@ -16,6 +16,9 @@ %ifarch riscv64 Patch5: 0004-riscv-support.patch %endif +%ifarch loongarch64 +Patch6: 0005-crash-add-loongarch-support.patch +%endif BuildRequires: ncurses-devel zlib-devel lzo-devel snappy-devel texinfo libzstd-devel BuildRequires: gcc gcc-c++ bison m4 @@ -81,6 +84,9 @@ %{_mandir}/man8/crash.8* %changelog +* Mon Jul 10 2023 wangming <wangming01@loongson.cn> - 8.0.2-3 +- add LoongArch64 support. + * Fri Jul 7 2023 EastDong <xudong23@iscas.ac.cn> - 8.0.2-2 - add riscv64 support
View file
_service:tar_scm:0005-crash-add-loongarch-support.patch
Added
@@ -0,0 +1,17364 @@ +From b9e0a25e29a897161360a44b1c206368f7d99310 Mon Sep 17 00:00:00 2001 +From: Ming Wang <wangming01@loongson.cn> +Date: Mon, 10 Jul 2023 14:04:37 +0800 +Subject: PATCH crash: add loongarch support. + +Signed-off-by: Ming Wang <wangming01@loongson.cn> +--- + Makefile | 9 +- + README | 4 +- + configure.c | 27 +- + crash.8 | 2 +- + defs.h | 160 +- + diskdump.c | 26 +- + gdb-10.2-loongarch.patch | 15207 +++++++++++++++++++++++++++++++++++++ + gdb_interface.c | 1 - + help.c | 9 +- + lkcd_vmdump_v1.h | 2 + + lkcd_vmdump_v2_v3.h | 4 +- + loongarch64.c | 1347 ++++ + main.c | 3 +- + netdump.c | 28 +- + ramdump.c | 2 + + symbols.c | 26 +- + 16 files changed, 16836 insertions(+), 21 deletions(-) + create mode 100644 gdb-10.2-loongarch.patch + create mode 100644 loongarch64.c + +diff --git a/Makefile b/Makefile +index 79aef17..d26d2e2 100644 +--- a/Makefile ++++ b/Makefile +@@ -64,7 +64,7 @@ CFILES=main.c tools.c global_data.c memory.c filesys.c help.c task.c \ + kernel.c test.c gdb_interface.c configure.c net.c dev.c bpf.c \ + printk.c \ + alpha.c x86.c ppc.c ia64.c s390.c s390x.c s390dbf.c ppc64.c x86_64.c \ +- arm.c arm64.c mips.c mips64.c sparc64.c \ ++ arm.c arm64.c mips.c mips64.c sparc64.c loongarch64.c\ + extensions.c remote.c va_server.c va_server_v1.c symbols.c cmdline.c \ + lkcd_common.c lkcd_v1.c lkcd_v2_v3.c lkcd_v5.c lkcd_v7.c lkcd_v8.c\ + lkcd_fix_mem.c s390_dump.c lkcd_x86_trace.c \ +@@ -84,7 +84,7 @@ OBJECT_FILES=main.o tools.o global_data.o memory.o filesys.o help.o task.o \ + build_data.o kernel.o test.o gdb_interface.o net.o dev.o bpf.o \ + printk.o \ + alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o x86_64.o \ +- arm.o arm64.o mips.o mips64.o sparc64.o \ ++ arm.o arm64.o mips.o mips64.o sparc64.o loongarch64.o\ + extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o \ + lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \ + lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o \ +@@ -292,6 +292,8 @@ gdb_unzip: + gdb_patch: + if -f ${GDB}.patch && -s ${GDB}.patch ; then \ + patch -p0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; fi ++ if -f ${GDB}-loongarch.patch && -s ${GDB}-loongarch.patch ; then \ ++ patch -p0 < ${GDB}-loongarch.patch; cp ${GDB}-loongarch.patch ${GDB}; fi + + library: ${OBJECT_FILES} + ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} +@@ -441,6 +443,9 @@ mips64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} mips64.c + sparc64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} sparc64.c + ${CC} -c ${CRASH_CFLAGS} sparc64.c ${WARNING_OPTIONS} ${WARNING_ERROR} + ++loongarch64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} loongarch64.c ++ ${CC} -c ${CRASH_CFLAGS} loongarch64.c ${WARNING_OPTIONS} ${WARNING_ERROR} ++ + s390.o: ${GENERIC_HFILES} ${IBM_HFILES} s390.c + ${CC} -c ${CRASH_CFLAGS} s390.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +diff --git a/README b/README +index 1f98fbf..de3bdf9 100644 +--- a/README ++++ b/README +@@ -37,8 +37,8 @@ + These are the current prerequisites: + + o At this point, x86, ia64, x86_64, ppc64, ppc, arm, arm64, alpha, mips, +- mips64, s390 and s390x-based kernels are supported. Other architectures +- may be addressed in the future. ++ mips64, loongarch64, s390 and s390x-based kernels are supported. Other ++ architectures may be addressed in the future. + + o One size fits all -- the utility can be run on any Linux kernel version + version dating back to 2.2.5-15. A primary design goal is to always +diff --git a/configure.c b/configure.c +index 5188851..9d038f5 100644 +--- a/configure.c ++++ b/configure.c +@@ -107,6 +107,7 @@ void add_extra_lib(char *); + #undef MIPS + #undef SPARC64 + #undef MIPS64 ++#undef LOONGARCH64 + + #define UNKNOWN 0 + #define X86 1 +@@ -122,6 +123,7 @@ void add_extra_lib(char *); + #define MIPS 11 + #define SPARC64 12 + #define MIPS64 13 ++#define LOONGARCH64 14 + + #define TARGET_X86 "TARGET=X86" + #define TARGET_ALPHA "TARGET=ALPHA" +@@ -136,6 +138,7 @@ void add_extra_lib(char *); + #define TARGET_MIPS "TARGET=MIPS" + #define TARGET_MIPS64 "TARGET=MIPS64" + #define TARGET_SPARC64 "TARGET=SPARC64" ++#define TARGET_LOONGARCH64 "TARGET=LOONGARCH64" + + #define TARGET_CFLAGS_X86 "TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64" + #define TARGET_CFLAGS_ALPHA "TARGET_CFLAGS=" +@@ -158,6 +161,7 @@ void add_extra_lib(char *); + #define TARGET_CFLAGS_MIPS_ON_X86_64 "TARGET_CFLAGS=-m32 -D_FILE_OFFSET_BITS=64" + #define TARGET_CFLAGS_MIPS64 "TARGET_CFLAGS=" + #define TARGET_CFLAGS_SPARC64 "TARGET_CFLAGS=" ++#define TARGET_CFLAGS_LOONGARCH64 "TARGET_CFLAGS=" + + #define GDB_TARGET_DEFAULT "GDB_CONF_FLAGS=" + #define GDB_TARGET_ARM_ON_X86 "GDB_CONF_FLAGS=--target=arm-elf-linux" +@@ -404,6 +408,9 @@ get_current_configuration(struct supported_gdb_version *sp) + #ifdef __sparc_v9__ + target_data.target = SPARC64; + #endif ++#ifdef __loongarch64 ++ target_data.target = LOONGARCH64; ++#endif + + set_initial_target(sp); + +@@ -497,6 +504,10 @@ get_current_configuration(struct supported_gdb_version *sp) + (target_data.target != MIPS64)) + arch_mismatch(sp); + ++ if ((target_data.initial_gdb_target == LOONGARCH64) && ++ (target_data.target != LOONGARCH64)) ++ arch_mismatch(sp); ++ + if ((target_data.initial_gdb_target == X86) && + (target_data.target != X86)) { + if (target_data.target == X86_64) +@@ -660,6 +671,9 @@ show_configuration(void) + case SPARC64: + printf("TARGET: SPARC64\n"); + break; ++ case LOONGARCH64: ++ printf("TARGET: LOONGARCH64\n"); ++ break; + } + + if (strlen(target_data.program)) { +@@ -777,6 +791,10 @@ build_configure(struct supported_gdb_version *sp) + target = TARGET_SPARC64; + target_CFLAGS = TARGET_CFLAGS_SPARC64; + break; ++ case LOONGARCH64: ++ target = TARGET_LOONGARCH64; ++ target_CFLAGS = TARGET_CFLAGS_LOONGARCH64; ++ break; + } + + ldflags = get_extra_flags("LDFLAGS.extra", NULL); +@@ -1374,7 +1392,7 @@ make_spec_file(struct supported_gdb_version *sp) + printf("Vendor: Red Hat, Inc.\n"); + printf("Packager: Dave Anderson <anderson@redhat.com>\n"); + printf("ExclusiveOS: Linux\n"); +- printf("ExclusiveArch: %%{ix86} alpha ia64 ppc ppc64 ppc64pseries ppc64iseries x86_64 s390 s390x arm aarch64 ppc64le mips mipsel mips64el sparc64\n"); ++ printf("ExclusiveArch: %%{ix86} alpha ia64 ppc ppc64 ppc64pseries ppc64iseries x86_64 s390 s390x arm aarch64 ppc64le mips mipsel mips64el sparc64 loongarch64\n"); + printf("Buildroot: %%{_tmppath}/%%{name}-root\n"); + printf("BuildRequires: ncurses-devel zlib-devel bison\n"); + printf("Requires: binutils\n"); +@@ -1613,6 +1631,8 @@ set_initial_target(struct supported_gdb_version *sp) + target_data.initial_gdb_target = MIPS; + else if (strncmp(buf, "SPARC64", strlen("SPARC64")) == 0) + target_data.initial_gdb_target = SPARC64; ++ else if (strncmp(buf, "LOONGARCH64", strlen("LOONGARCH64")) == 0) ++ target_data.initial_gdb_target = LOONGARCH64; + } + + char * +@@ -1633,6 +1653,7 @@ target_to_name(int target) + case MIPS: return("MIPS"); + case MIPS64: return("MIPS64"); + case SPARC64: return("SPARC64"); ++ case LOONGARCH64: return("LOONGARCH64"); + } + + return "UNKNOWN"; +@@ -1697,6 +1718,10 @@ name_to_target(char *name) + return MIPS64; + else if (strncmp(name, "sparc64", strlen("sparc64")) == 0) + return SPARC64; ++ else if (strncmp(name, "loongarch64", strlen("loongarch64")) == 0) ++ return LOONGARCH64; ++ else if (strncmp(name, "LOONGARCH64", strlen("LOONGARCH64")) == 0) ++ return LOONGARCH64; + + return UNKNOWN; + } +diff --git a/crash.8 b/crash.8
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2