From e79950d93af06b735b86548120dc60b2c5be6ee0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 13 May 2004 08:34:50 +0000 Subject: instead of keeping stage1 (mostly as temporary space but with a fixed size, and for the background init), exit the stage1 giving hand to stage2 in a tmpfs (same as what was done for Mandrakemove) --- perl-install/Makefile | 6 +++++- perl-install/install2.pm | 9 ++++++++- perl-install/share/devices | 18 ++++++++++++++++++ perl-install/share/symlinks | 10 ++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 perl-install/share/devices create mode 100644 perl-install/share/symlinks (limited to 'perl-install') diff --git a/perl-install/Makefile b/perl-install/Makefile index 612cf79d5..129063f7b 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -12,6 +12,8 @@ OTHERS = $(OTHERDIRS) $(OTHERFILES) OTHERDIRS = tools/ddcprobe tools/serial_probe OTHERFILES = tools/rpcinfo-flushed.c +STAGE1 = ../mdk-stage1 + .PHONY: all $(DIRS) install clean stage2 full_stage2 all: list_modules.pm TAGS $(DIRS) @@ -172,7 +174,7 @@ endif gzip -9f $(DEST)/usr/share/ldetect-lst/* - cd share ; cp -a consolefonts $(DEST)/usr/share + cd share ; cp -a consolefonts devices symlinks $(DEST)/usr/share -cd share ; cp -f *.png $(DEST)/usr/share -cd pixmaps ; cp -af *.png *.xpm langs $(DEST)/usr/share ; rm -f $(DEST)/usr/share/wiz_* unneeded=`perl -I. -Mlang -e 'lang::get_unneeded_png_lang_files'`; cd $(DEST)/usr/share; rm -f $$unneeded @@ -193,6 +195,8 @@ ifeq (i386,$(ARCH)) ../tools/patch_pcmcia_config.pl $(DEST)/etc/pcmcia/config ../kernel/all.modules/`cat ../kernel/all.kernels/.main`/modules.dep endif + cp -f $(STAGE1)/init-stage2 $(DEST)/usr/bin/init + find $(DEST) -name CVS | xargs rm -rf full_stage2: diff --git a/perl-install/install2.pm b/perl-install/install2.pm index c1a47d33d..814f38546 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -370,7 +370,11 @@ sub main { $opt = ''; } } $cmdline{$opt} = 1 if $opt; - + + #- from stage1 + put_in_hash(\%ENV, { getVarsFromSh('/tmp/env') }); + exists $ENV{$_} and $cmdline{lc($_)} = $ENV{$_} foreach qw(METHOD PCMCIA KICKSTART); + map_each { my ($n, $v) = @_; my $f = ${{ @@ -438,6 +442,9 @@ sub main { move::init($o); } + #- free up stage1 memory + eval { fs::umount($_) } foreach qw(/stage1/proc/bus/usb /stage1/proc /stage1); + $o->{prefix} = $::prefix = $::testing ? "/tmp/test-perl-install" : $::move ? "" : "/mnt"; mkdir $o->{prefix}, 0755; devices::make("/dev/zero"); #- needed by ddcxinfos diff --git a/perl-install/share/devices b/perl-install/share/devices new file mode 100644 index 000000000..844070b2e --- /dev/null +++ b/perl-install/share/devices @@ -0,0 +1,18 @@ +/dev/console c 5 1 +/dev/ttyS0 c 4 64 +/dev/null c1 3 +/dev/mem c 1 1 +/dev/tty0 c 4 0 +/dev/tty1 c 4 1 +/dev/tty2 c 4 2 +/dev/tty3 c 4 3 +/dev/tty4 c 4 4 +/dev/tty5 c 4 5 +/dev/tty6 c 4 6 +/dev/tty7 c 4 7 +/dev/tty8 c 4 8 +/dev/fb0 c 29 0 +/dev/loop3 b 7 3 +/dev/ram3 b 1 3 +/dev/fd0 b 2 0 +/dev/ram b 1 1 diff --git a/perl-install/share/symlinks b/perl-install/share/symlinks new file mode 100644 index 000000000..d2db5f4b7 --- /dev/null +++ b/perl-install/share/symlinks @@ -0,0 +1,10 @@ +/usr/bin /sbin +/sbin /bin +/proc/mounts /etc/mtab +/etc/protocols +/etc/services +/etc/group +/etc/passwd +/lib +/usr +/tmp /var/run -- cgit v1.2.1