mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Add a script to process mirrored zipl targets managed by Linux "md"
driver (AKA "software mirrors")
. In the file zipl_helper.device-mapper.c implement two handlers
identified by pairs (ZIPL_UTIL_ID, MD_DRIVER_ID) and
(CHREIPL_UTIL_ID, MD_DRIVER_ID) for the helpers zipl_helper.md
and chreipl_helper.md respectively
. zipl_helper.md: prints sets of target parameters (one such set
per mirror) for a specified logical zipl target managed by linux
"md" driver.
. chreipl_helper.md: for a specified logical zipl target managed
by linux "md" driver prints a random disk from the set of disks
participating in the mirrored setup.
. Add zipl_helper.md and chreipl_helper.md as symbolic links to
zipl_helper.device-mapper
Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
54 lines
1.5 KiB
Makefile
54 lines
1.5 KiB
Makefile
# Common definitions
|
|
include ../../common.mak
|
|
|
|
ALL_CPPFLAGS += -I../include -I../boot \
|
|
-DZFCPDUMP_IMAGE="STRINGIFY($(ZFCPDUMP_DIR)/$(ZFCPDUMP_IMAGE))" \
|
|
-DZFCPDUMP_INITRD="STRINGIFY($(ZFCPDUMP_DIR)/$(ZFCPDUMP_INITRD))" \
|
|
-D_FILE_OFFSET_BITS=64 -DBUILD_PATH="../boot"
|
|
|
|
libs = $(rootdir)/libutil/libutil.a \
|
|
$(rootdir)/libvtoc/libvtoc.a \
|
|
|
|
objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \
|
|
bootmap_header.o envblk.o install.o zipl.o
|
|
|
|
zipl_helpers = $(basename $(wildcard zipl_helper.*.c))
|
|
zipl_helpers += zipl_helper.md
|
|
chreipl_helpers = $(subst zipl_,chreipl_, $(zipl_helpers))
|
|
|
|
all: zipl zipl-editenv zipl_helper.md $(chreipl_helpers)
|
|
|
|
boot.o: ../boot/.loaders
|
|
zipl: $(objects) $(libs)
|
|
|
|
zipl_helper.device-mapper: $(rootdir)/libdasd/libdasd.a \
|
|
$(rootdir)/libvtoc/libvtoc.a \
|
|
$(libs) misc.o error.o zipl_helper.device-mapper.o
|
|
|
|
zipl-editenv: $(libs) misc.o error.o fs-map.o bootmap_header.o \
|
|
envblk.o zipl-editenv.o
|
|
|
|
zipl_helper.md: zipl_helper.device-mapper
|
|
ln -f -s $< $@
|
|
|
|
chreipl_helper.%: zipl_helper.device-mapper
|
|
ln -f -s $< $@
|
|
|
|
install: all
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
|
|
$(INSTALL) -c zipl $(DESTDIR)$(BINDIR)
|
|
$(INSTALL) -c zipl-editenv $(DESTDIR)$(BINDIR)
|
|
$(INSTALL) -m 755 $(zipl_helpers) $(chreipl_helpers) \
|
|
$(DESTDIR)$(TOOLS_LIBDIR)
|
|
$(CP) --no-dereference $(chreipl_helpers) $(DESTDIR)$(TOOLS_LIBDIR)
|
|
|
|
clean:
|
|
rm -f *.o $(zipl_helpers) $(chreipl_helpers) zipl zipl-editenv
|
|
|
|
.PHONY: all install clean
|
|
|
|
# Additional manual dependencies
|
|
|
|
../boot/.loaders:
|
|
$(MAKE) -C ../boot .loaders
|