mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The NGDump DFI interface enables zgetdump to read and mount dumps created with NGDump stand-alone dump. Under the hood, the NGDump DFI delegates the task of reading and parsing of ELF dump files to the ELF DFI interface dfi_elf. Usage example 1: ---------------- $ zgetdump -i /dev/nvme0n1p1 General dump info: Dump format........: elf Version............: 1 UTS node name......: t83lp49.lnxne.boe UTS kernel release.: 5.14.0-20210819.rc6.git0.efb8a921eec7.300.fc34.s390x UTS kernel version.: #1 SMP Thu Aug 19 00:22:04 CEST 2021 System arch........: s390x (64 bit) CPU count (online).: 32 Dump memory range..: 16384 MB Memory map: 0000000000000000 - 00000003ffffffff (16384 MB) Usage example 2: ---------------- $ zgetdump /dev/nvme0n1p1 > dump.elf Usage example 3: ---------------- $ zgetdump -m /dev/nvme0n1p1 /mnt $ ls -l /mnt/dump.elf $ zgetdump -u /mnt Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Tested-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
89 lines
1.9 KiB
Makefile
89 lines
1.9 KiB
Makefile
include ../common.mak
|
|
|
|
ALL_CFLAGS += -Wno-address-of-packed-member
|
|
|
|
#
|
|
# HAVE_FUSE: Allow to build zgetdump without mount support
|
|
#
|
|
ifeq (${HAVE_FUSE},0)
|
|
|
|
check_dep_fuse:
|
|
|
|
else
|
|
|
|
check_dep_fuse:
|
|
$(call check_dep, \
|
|
"zgetdump mount support", \
|
|
"fuse.h", \
|
|
"fuse3-devel or libfuse3-dev", \
|
|
"HAVE_FUSE=0", \
|
|
"-DFUSE_USE_VERSION=30")
|
|
endif
|
|
|
|
#
|
|
# HAVE_ZLIB: Allow skip zgetdump build, when no zlib-devel is available
|
|
#
|
|
ifeq (${HAVE_ZLIB},0)
|
|
|
|
all:
|
|
$(SKIP) HAVE_ZLIB=0
|
|
|
|
install:
|
|
$(SKIP) HAVE_ZLIB=0
|
|
|
|
else
|
|
|
|
check_dep_zlib:
|
|
$(call check_dep, \
|
|
"zgetdump", \
|
|
"zlib.h", \
|
|
"zlib-devel or libz-dev", \
|
|
"HAVE_ZLIB=0")
|
|
|
|
all: check_dep_fuse check_dep_zlib zgetdump
|
|
|
|
OBJECTS = zgetdump.o opts.o zg.o zg_error.o zg_print.o \
|
|
dfi.o dfi_mem_chunk.o dfi_vmcoreinfo.o \
|
|
dfi_lkcd.o dfi_elf.o \
|
|
dfi_s390.o dfi_s390_ext.o\
|
|
dfi_s390mv.o dfi_s390mv_ext.o \
|
|
dfi_s390tape.o dfi_kdump.o \
|
|
dfi_devmem.o dfo.o dfo_mem_chunk.o \
|
|
dfo_elf.o dfo_s390.o \
|
|
df_elf.o df_s390.o \
|
|
dt.o dt_s390sv.o dt_s390sv_ext.o \
|
|
dt_s390mv.o dt_s390mv_ext.o \
|
|
dt_scsi.o output.o \
|
|
ngdump.o dt_ngdump.o dfi_ngdump.o
|
|
|
|
ifeq ("$(HAVE_FUSE)","0")
|
|
FUSE_CFLAGS = -DHAVE_FUSE=0 -D_FILE_OFFSET_BITS=64
|
|
FUSE_LDLIBS =
|
|
else ifneq ($(shell sh -c 'command -v pkg-config'),)
|
|
FUSE_CFLAGS = -DHAVE_FUSE=1 $(shell pkg-config --silence-errors --cflags fuse3)
|
|
FUSE_LDLIBS = $(shell pkg-config --silence-errors --libs fuse3)
|
|
else
|
|
FUSE_CFLAGS = -DHAVE_FUSE=1 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse3
|
|
FUSE_LDLIBS = -lfuse3
|
|
endif
|
|
LDLIBS += -lz $(FUSE_LDLIBS)
|
|
ALL_CFLAGS += $(FUSE_CFLAGS)
|
|
|
|
ifneq ("$(HAVE_FUSE)","0")
|
|
OBJECTS += zfuse.o
|
|
endif
|
|
|
|
libs = $(rootdir)/libutil/libutil.a
|
|
zgetdump: $(OBJECTS) $(libs)
|
|
|
|
install: all
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(BINDIR)
|
|
$(INSTALL) -m 755 zgetdump $(DESTDIR)$(BINDIR)
|
|
$(INSTALL) -m 644 zgetdump.8 $(DESTDIR)$(MANDIR)/man8
|
|
|
|
clean:
|
|
rm -f *.o *~ zgetdump core.*
|
|
endif
|
|
|
|
.PHONY: all install clean check_dep_fuse check_dep_zlib
|