Skip to content

Commit

Permalink
zipl: Rewrite helper script in C
Browse files Browse the repository at this point in the history
To remove the perl dependency from zipl rewrite the helper script in C.

Signed-off-by: Rafael Fonseca <[email protected]>
  • Loading branch information
r4f4 committed Feb 15, 2018
1 parent 1e6a9db commit c1206f1
Show file tree
Hide file tree
Showing 4 changed files with 1,082 additions and 865 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ zipl/boot/*.exec
zipl/boot/data.h
zipl/src/chreipl_helper.device-mapper
zipl/src/zipl
zipl/src/zipl_helper.device-mapper
zkey/zkey
10 changes: 7 additions & 3 deletions zipl/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ libs = $(rootdir)/libutil/libutil.a \
objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \
install.o zipl.o $(rootdir)/zipl/boot/data.o

zipl_helpers = $(wildcard zipl_helper.*)
zipl_helpers = $(basename $(wildcard zipl_helper.*.c))
chreipl_helpers = $(subst zipl_,chreipl_, $(zipl_helpers))

all: zipl $(chreipl_helpers)

zipl: $(objects) $(libs)

zipl_helper.device-mapper: $(rootdir)/libdasd/libdasd.a \
$(rootdir)/libvtoc/libvtoc.a \
$(libs) zipl_helper.device-mapper.o

chreipl_helper.%: zipl_helper.%
ln -s $< $@
ln -f -s $< $@

install: all
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
Expand All @@ -34,7 +38,7 @@ install: all
$(CP) --no-dereference $(chreipl_helpers) $(DESTDIR)$(TOOLS_LIBDIR)

clean:
rm -f *.o $(chreipl_helpers) zipl
rm -f *.o $(zipl_helpers) $(chreipl_helpers) zipl

.PHONY: all install clean

Expand Down
Loading

0 comments on commit c1206f1

Please sign in to comment.