Files
s390-tools/zfcpdump
Steffen Eiden e6add997eb Integrate rust into s390-tools build system
The rust integration into the s390-tools build system consists of the
following steps:

- Add a subdirectory for the rust code.
- Add a Makefile that forwards rust builds to `cargo`.
- Add a `utils` crate for rust code in s390-tools.
- Add rust stuff for dotfiles:
  - gitignore
  - editorconfig
  - codespellrc (while at it, add an ignore file)

With cargo the rust ecosystem has its own build system which also is
responsible to resolve rust dependencies via downloading the dependencies
from (default) crates.io and discover the source files. Therefore, the
Makefile just calls `cargo build` to forward the build to cargo.

If a rust crate does not require external dependencies, users might call
rustc directly.

A simple `make` will build all the rust targets as well (with --release
specified). Also `make install` will work as usual.

A few Makefile configuration variables are introduced for rust/Cargo:
  - HAVE_CARGO (default 1) to toggle the build of rust code using cargo
  - CARGOFLAGS             to add custom cargo flags, e.g. --offline
  - CARGO		   Cargo binary location defaults to
                           $(where cargo)

A new global make target is defined to get the current s390-tools
version:
$ make version
  2.28.0

rust/Makefile also has the `print-rust-targets`  target to print all rust
directories/crates that should be shipped/installed.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2023-08-04 11:40:46 +02:00
..
2017-08-21 10:55:40 +02:00

zfcpdump: S390 SCSI dump tool (Version 3)
=========================================
zfcpdump is used for creating System dumps for Linux on System z. It has two
parts: a zfcpdump enabled Linux kernel and a user space application.

This is the 3rd version of zfcpdump which uses the upstream kernel
version 3.12 or above. This version writes the dump to a partition in
contrast to the previous versions where the dump was written to
a file system.

The user space application of zfcpdump can reside either in an intitramfs or an
initrd. It reads from /proc/vmcore, provided by the kernel part, and writes the
system dump to a SCSI disk partition.

To build a zfcpdump enabled kernel use the following settings in your kernel
configuration:

 * CONFIG_ZFCPDUMP=y
 * CONFIG_BLK_DEV_INITRD=y
 * CONFIG_EFI_PARTITION=y for using GPT disk layout
 * CONFIG_MSDOS_PARTITION=y for using MSDOS disk layout
 * BLK_DEV_SD=y
 * Enable ZFCP driver
 * Enable SCSI driver
 * Disable as many features as possible to keep the kernel small.
   E.g. network and file system support is not needed at all.

You can use "make zfcpdump_defconfig" as a starting point for your kernel
configuration.

 * Issue "make bzImage" to build the zfcpdump kernel image.

In a Linux distribution the zfcpdump enabled kernel image must be copied to
/lib/s390-tools/zfcpdump/zfcpdump-image, where the s390 zipl tool is
looking for the dump kernel when preparing a SCSI dump disk.

Create and install initrd
=========================

 * make

Builds "cpioinit" and statically linked "zfcpdump" application. Then cpioinit
is used to integrate the zfcpdump application into the cpio archive
zfcpdump_part.rd.

 * make install

The initrd zfcpdump_part.rd is installed to "/lib/s390-tools/zfcpdump/".

Additional information
======================
For more information on how to use zfcpdump and zipl refer to the s390
'Using the Dump Tools' book, which is available from:
http://www.ibm.com/developerworks/linux/linux390.