From 741ef0405d4b1a177908fb62c9c2ff7c28e77502 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 9 Oct 2003 12:48:38 +0000 Subject: we need to have an 'init' for stage2 as well, because if we exec directly runinstall2 and it fails/stops for any reason, this will immediately block the kernel ('Attempted to kill init'), making debugging more difficult --- mdk-stage1/Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mdk-stage1/Makefile') diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile index 727c1e2dc..6e5fac7bf 100644 --- a/mdk-stage1/Makefile +++ b/mdk-stage1/Makefile @@ -56,6 +56,8 @@ COMPILE = $(CC) $(DEFS) $(CFLAGS) ifeq (i386, $(ARCH)) INITSRC = minilibc.c init.c INIT_DEFS = -DINIT_HEADERS=\"minilibc.h\" -fno-builtin +INIT_DEFS_ADD = -DBINARY=\"/sbin/stage1\" -DDO_KLOG +INIT_DEFS_ADD_MANDRAKE_MOVE = -DBINARY=\"/usr/bin/install2\" else ifeq (x86_64, $(ARCH)) INITSRC = minilibc.c init.c @@ -71,6 +73,7 @@ endif endif INITOBJS = $(subst .c,.o,$(INITSRC)) +INITOBJS-MANDRAKE_MOVE = $(subst .c,-MOVE.o,$(INITSRC)) #- frontends @@ -161,7 +164,7 @@ endif endif -BINS = init stage1-full +BINS = init init-move stage1-full ifeq (i386, $(ARCH)) BINS += stage1-cdrom stage1-disk stage1-network stage1-network-usb stage1-medias-usb @@ -204,6 +207,10 @@ init: $(INITOBJS) $(INIT_LIBC) $(CC) $(LDFLAGS_INIT) -o $@ $^ $(STRIPCMD) $@ +init-move: $(INITOBJS-MANDRAKE_MOVE) $(INIT_LIBC) + $(CC) $(LDFLAGS_INIT) -o $@ $^ + $(STRIPCMD) $@ + stage1-cdrom: $(STAGE1OBJS-CDROM) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC) $(DIET) $(CC) $(LDFLAGS_STAGE1) -o $@ $^ $(STRIPCMD) $@ @@ -230,7 +237,10 @@ stage1-full: $(STAGE1OBJS-FULL) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRON $(INITOBJS): %.o: %.c - $(COMPILE) $(INIT_DEFS) -c $< + $(COMPILE) $(INIT_DEFS) $(INIT_DEFS_ADD) -c $< + +$(INITOBJS-MANDRAKE_MOVE): %-MOVE.o: %.c + $(COMPILE) $(INIT_DEFS) $(INIT_DEFS_ADD_MANDRAKE_MOVE) -c $< -o $@ $(STAGE1OBJS-CDROM): %-CDROM.o: %.c $(DIET) $(COMPILE) $(INCLUDES) $(CDROM_DEFS) -c $< -o $@ -- cgit v1.2.1