Files
s390-tools/zipl/initramfs-tools/Makefile
Alexander Egorenkov b4142a9966 zipl: Implement zipl helper script for NGDump
The purpose of the new zipl helper script is to build a dumper initramfs
for NGDump stand-alone dump. zipl executes the helper script when
preparing a NVMe dump partition for stand-alone dump.

The zipl helper script expects a single parameter - a path to the dump
partition to store a dump on. The helper script terminates with 0 on
success and a positive value otherwise.

The zipl helper script performs the following steps:
- It builds an initramfs image suitable for dumping. To perform this step,
  the script employs the dracut tool on Fedora/RHEL/SLES and
  the initramfs-tools on Ubuntu/Debian.
- It outputs the path to the newly built initramfs image and the currently
  active kernel bzImage on the standard output.
- It prints the kernel command-line to be used by the dumper on
  the standard output.

On success, zipl expects the helper script to return at least three lines
containing:
- initrd=<path to an initramfs image>
- kernel=<path to a kernel bzImage>
- cmdline=<kernel command-line parameters>

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-06-20 13:14:05 +02:00

27 lines
897 B
Makefile

include ../../common.mak
INITRAMFSTOOLSDIR := /usr/share/initramfs-tools
HOOKSDIR := $(INITRAMFSTOOLSDIR)/hooks
INITPREMOUNTDIR := $(INITRAMFSTOOLSDIR)/scripts/init-premount
# HAVE_INITRAMFS
#
# This install time parameter determines whether the ngdump initramfs-tools
# support is installed (HAVE_INITRAMFS=1) or not (default). When installed,
# the module performs the following functions when mkinitramfs is run:
#
# - install the configuration file containing the name of a dump partition
# - install the dump script that is run at boot
#
ifeq ($(HAVE_INITRAMFS),1)
install:
$(INSTALL) -m 755 zipl_helper.prepare-ngdump \
$(DESTDIR)$(TOOLS_LIBDIR)
$(INSTALL) -m 755 -d $(DESTDIR)$(HOOKSDIR)
$(INSTALL) -m 755 -d $(DESTDIR)$(INITPREMOUNTDIR)
$(INSTALL) -m 755 hooks/ngdump $(DESTDIR)$(HOOKSDIR)/
$(INSTALL) -m 755 scripts/init-premount/ngdump \
$(DESTDIR)$(INITPREMOUNTDIR)
endif