summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-18 17:31:32 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-18 17:31:32 +0000
commitfb696b6d16dbc4dd8a630eaac78dfdc5926336ba (patch)
tree1af8422ca1d2b67fdb1e78ead0b58579319050f1
parentfcb5a3e68d683a5b1a50a13b1e7a18bd111c1cc9 (diff)
downloaddrakx-backup-do-not-use-fb696b6d16dbc4dd8a630eaac78dfdc5926336ba.tar
drakx-backup-do-not-use-fb696b6d16dbc4dd8a630eaac78dfdc5926336ba.tar.gz
drakx-backup-do-not-use-fb696b6d16dbc4dd8a630eaac78dfdc5926336ba.tar.bz2
drakx-backup-do-not-use-fb696b6d16dbc4dd8a630eaac78dfdc5926336ba.tar.xz
drakx-backup-do-not-use-fb696b6d16dbc4dd8a630eaac78dfdc5926336ba.zip
mdk-stage1 produces the boot images in Cooker
-rw-r--r--Makefile18
-rwxr-xr-xmake_boot_img90
-rw-r--r--mdk-stage1/Makefile12
-rw-r--r--mdk-stage1/automatic.c6
-rw-r--r--mdk-stage1/cdrom.c2
-rwxr-xr-xupdate_kernel14
6 files changed, 74 insertions, 68 deletions
diff --git a/Makefile b/Makefile
index bb8afa7a3..79bac3484 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
-RELEASE_BOOT_IMG = hd.img hdreiser.img cdrom.img network.img
+RELEASE_BOOT_IMG = cdrom.img network.img # hd.img hdreiser.img
ifeq (i386,$(ARCH))
-RELEASE_BOOT_IMG += pcmcia.img blank.img all.img other.img
+RELEASE_BOOT_IMG += all.img blank.img other.img # pcmcia.img
endif
ifeq (sparc,$(ARCH))
BOOT_IMG = live.img tftp.img tftprd.img live64.img tftp64.img tftprd64.img
@@ -12,8 +12,8 @@ endif
BOOT_IMG += $(RELEASE_BOOT_IMG)
BOOT_RDZ = $(BOOT_IMG:%.img=%.rdz)
-BINS = install/install install/full-install install/local-install install/installinit/init
-DIRS = tools install install/installinit perl-install
+BINS = mdk-stage1/init mdk-stage1/stage1-full mdk-stage1/stage1-cdrom mdk-stage1/stage1-network
+DIRS = tools mdk-stage1
ROOTDEST = /export
UPLOAD_DEST_ = ~/cooker
@@ -39,12 +39,15 @@ build: $(BOOT_IMG)
autoboot:
ifeq (i386,$(ARCH))
install -d $(ROOTDEST)/boot
- cp -f vmlinuz {hd,cdrom,pcmcia,network,all,other}.rdz $(ROOTDEST)/boot
+# cp -f vmlinuz {hd,cdrom,pcmcia,network,all,other}.rdz $(ROOTDEST)/boot
+ cp -f vmlinuz {cdrom,network,all,other}.rdz $(ROOTDEST)/boot
/usr/sbin/rdev -v $(ROOTDEST)/boot/vmlinuz 788
endif
dirs:
- for i in $(DIRS); do make -C $$i; done
+ @for n in . $(DIRS); do \
+ [ "$$n" = "." ] || make -C $$n ;\
+ done
rescue: modules
make -C $@
@@ -71,7 +74,6 @@ $(BOOT_IMG:%=%f): %f: %
clean:
rm -rf $(BOOT_IMG) $(BOOT_RDZ) $(BINS) modules modules64 install_pcmcia_modules vmlinu* System*.map
- rm -rf install/*/sbin/install install/*/sbin/init
for i in $(DIRS) rescue; do make -C $$i clean; done
find . -name "*~" -o -name ".#*" | xargs rm -f
@@ -92,7 +94,7 @@ upload: clean install
perl -pe 'exit if / DrakX </' perl-install/ChangeLog | tools/mailchangelog
tools/addchangelog perl-install/ChangeLog 'snapshot uploaded'
-# cvs commit perl-install/ChangeLog # otherwise i always have a conflict :-(
+ cvs commit perl-install/ChangeLog # otherwise i always have a conflict :-(
upload_sparc:
touch /tmp/mdkinst_done
diff --git a/make_boot_img b/make_boot_img
index 74f2f8b39..285608b91 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -9,7 +9,7 @@ my $corporate = $ENV{CORPORATE} && " corporate"; #- use this for building a corp
($img, $type) = @ARGV;
-$instdir = "install";
+$instdir = "mdk-stage1";
$mnt = "/tmp/drakx_mnt";
$mke2fs = "/sbin/mke2fs -q -m 0 -F -s 1";
@@ -25,24 +25,24 @@ _ "$sudo mkdir $mnt" unless -e $mnt;
_ "$sudo mkdir ${mnt}2" unless -e "${mnt}2";
$install = $ {{
- all => "full-install",
- other => "full-install",
- blank => "full-install",
- live => "full-install",
- tftp => "full-install",
- tftprd => "full-install",
- pcmcia => "full-install",
- network => "install",
- cdrom => "local-install",
- hd => "local-install",
- hdreiser => "local-install",
- live64 => "full-install",
- tftp64 => "full-install",
- tftprd64 => "full-install",
- pcmcia64 => "full-install",
- network64 => "install",
- cdrom64 => "local-install",
- hd64 => "local-install",
+ all => "stage1-full",
+ other => "stage1-full",
+ blank => "stage1-full",
+ live => "stage1-full",
+ tftp => "stage1-full",
+ tftprd => "stage1-full",
+ pcmcia => "stage1-full",
+ network => "stage1-network",
+ cdrom => "stage1-cdrom",
+ hd => "stage1-disk",
+ hdreiser => "stage1-disk",
+ live64 => "stage1-full",
+ tftp64 => "stage1-full",
+ tftprd64 => "stage1-full",
+ pcmcia64 => "stage1-full",
+ network64 => "stage1-network",
+ cdrom64 => "stage1-cdrom",
+ hd64 => "stage1-disk",
}}{$type} or die;
$img =~ /rdz$/ ? initrd($mnt, $img) : $::{"boot_img_$arch"}->($mnt, $img);
@@ -53,7 +53,7 @@ sub initrd {
my ($mnt, $img) = @_;
my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type;
my $tmp = "$ENV{HOME}/tmp/initrd";
- my $tar = "$instdir/install1.tar.bz2";
+ my $tar = "$instdir/stage1-data/stage1.tar.bz2";
__ "$sudo umount $tmp $mnt 2>/dev/null";
_ "dd if=/dev/zero of=$tmp bs=1k count=" . ($type eq "all" ? 4000 : 2000);
@@ -61,18 +61,18 @@ sub initrd {
_ "$sudo mount -t ext2 $tmp $mnt -o loop";
_ "$sudo tar xyC $mnt -f $tar";
- install_s("$instdir/installinit/init", "$mnt/sbin");
- install_s("$instdir/$install", "$mnt/sbin/install");
+ install_s("$instdir/init", "$mnt/sbin");
+ install_s("$instdir/$install", "$mnt/sbin/stage1");
my $ftype = $type =~ /^(all)$/ ? "pcmcia" : $type;
- if ($ftype eq "pcmcia") {
- unlink "$mnt/sbin/sh";
- _ "$sudo cp -a tools/$arch/sh $mnt/sbin";
- _ "$sudo cp -a /etc/pcmcia $mnt/etc";
- _ "$sudo patch -p0 -d $mnt/etc < $instdir/pcmcia_config.patch";
- }
- _ "$sudo cp -f install_${ftype}_modules/* $mnt/modules/" if -d "install_${ftype}_modules";
- _ "$sudo cp -f modules$I/${ltype}_modules.cgz $mnt/modules/modules$I.cgz" if $type !~ /blank/;
+# if ($ftype eq "pcmcia") {
+# unlink "$mnt/sbin/sh";
+# _ "$sudo cp -a tools/$arch/sh $mnt/sbin";
+# _ "$sudo cp -a /etc/pcmcia $mnt/etc";
+# _ "$sudo patch -p0 -d $mnt/etc < $instdir/pcmcia_config.patch";
+# }
+# _ "$sudo cp -f install_${ftype}_modules/* $mnt/modules/" if -d "install_${ftype}_modules";
+ _ "$sudo cp -f modules$I/${ltype}_modules.mar $mnt/modules/modules$I.mar" if $type !~ /blank/;
_ "$sudo cp -f modules$I/modules.dep $mnt/modules/";
_ "$sudo umount $mnt";
@@ -89,11 +89,11 @@ sub boot_img_i386 {
__ "$sudo umount $mnt 2>/dev/null";
if ($type eq "hd") {
- _ "bunzip2 -c $instdir/installinit/msgboot.img.bz2 > $img";
+ _ "bunzip2 -c $instdir/init-data/msgboot.img.bz2 > $img";
} elsif ($type eq "all") {
- _ "bunzip2 -c $instdir/installinit/msgboot-graphicallogo-2880.img.bz2 > $img";
+ _ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo-2880.img.bz2 > $img";
} else {
- _ "bunzip2 -c $instdir/installinit/msgboot-graphicallogo.img.bz2 > $img";
+ _ "bunzip2 -c $instdir/init-data/msgboot-graphicallogo.img.bz2 > $img";
}
_ "$sudo mount -t msdos -o umask=0 $img $mnt -o loop";
_ "cat vmlinuz > $mnt/vmlinuz" if $type !~ /blank/;
@@ -110,40 +110,40 @@ F1 help.msg
F2 boot.msg
label linux
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype vga=788
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype vga=788
label vgalo
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype vga=785
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype vga=785
label vgahi
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype vga=791
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype vga=791
label vga16
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype vga16
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype vga16
label text
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype text
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype text
label patch
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype patch vga=788
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype patch vga=788
label expert
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype expert vga=788
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype expert vga=788
label rescue
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype rescue rw
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype rescue rw
label lnx4win
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype lnx4win vga=788
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype lnx4win vga=788
label preinst
kernel vmlinuz
- append ramdisk_size=32000 initrd=all.rdz cdrom rescue oem rw
+ append ramdisk_size=32000 initrd=all.rdz automatic=method:cdrom rescue oem rw
label oem
kernel vmlinuz
- append ramdisk_size=32000 initrd=all.rdz cdrom rescue oem rw
+ append ramdisk_size=32000 initrd=all.rdz automatic=method:cdrom rescue oem rw
label auto
kernel vmlinuz
- append ramdisk_size=32000 initrd=$type.rdz $ftype auto_install=Mandrake/base/auto_inst.cfg.pl
+ append ramdisk_size=32000 initrd=$type.rdz automatic=method:$ftype auto_install=Mandrake/base/auto_inst.cfg.pl
label all
kernel vmlinuz
append ramdisk_size=32000 initrd=$type.rdz pcmcia vga=788
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile
index 5ce7f91c3..55fe0a071 100644
--- a/mdk-stage1/Makefile
+++ b/mdk-stage1/Makefile
@@ -108,7 +108,7 @@ LDFLAGS_STAGE1 = -static
endif
-BINS = init stage1-full # stage1-cdrom stage1-network
+BINS = init stage1-full stage1-cdrom stage1-network
#ifeq (i386, $(ARCH))
@@ -142,23 +142,23 @@ init: $(INITOBJS)
$(CC) $(LDFLAGS_INIT) -o $@ $(INITOBJS)
strip -s $@
-stage1-cdrom: dirs $(STAGE1OBJS-CDROM) $(STAGE1OBJS_UTILS)
+stage1-cdrom: $(STAGE1_OWN_LIBS) $(STAGE1OBJS-CDROM) $(STAGE1OBJS_UTILS)
$(CC) $(LDFLAGS_STAGE1) -o $@ $(STAGE1OBJS-CDROM) $(STAGE1OBJS_UTILS)
strip -s $@
-stage1-network: dirs $(STAGE1OBJS-NETWORK) $(STAGE1OBJS_UTILS)
+stage1-network: $(STAGE1_OWN_LIBS) $(STAGE1OBJS-NETWORK) $(STAGE1OBJS_UTILS)
$(CC) $(LDFLAGS_STAGE1) -o $@ $(STAGE1OBJS-NETWORK) $(STAGE1OBJS_UTILS) $(STAGE1_NETWORK_LIBS)
strip -s $@
-stage1-disk: dirs $(STAGE1OBJS-DISK) $(STAGE1OBJS_UTILS)
+stage1-disk: $(STAGE1_OWN_LIBS) $(STAGE1OBJS-DISK) $(STAGE1OBJS_UTILS)
$(CC) $(LDFLAGS_STAGE1) -o $@ $(STAGE1OBJS-DISK) $(STAGE1OBJS_UTILS)
strip -s $@
-stage1-pcmcia: dirs $(STAGE1OBJS-PCMIA) $(STAGE1OBJS_UTILS)
+stage1-pcmcia: $(STAGE1_OWN_LIBS) $(STAGE1OBJS-PCMIA) $(STAGE1OBJS_UTILS)
$(CC) $(LDFLAGS_STAGE1) -o $@ $(STAGE1OBJS-PCMIA) $(STAGE1OBJS_UTILS)
strip -s $@
-stage1-full: dirs $(STAGE1OBJS) $(STAGE1OBJS_UTILS)
+stage1-full: $(STAGE1_OWN_LIBS) $(STAGE1OBJS) $(STAGE1OBJS_UTILS)
$(CC) $(LDFLAGS_STAGE1) -o $@ $(STAGE1OBJS) $(STAGE1OBJS_UTILS) $(STAGE1_NETWORK_LIBS)
strip -s $@
diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c
index 8c742ab60..b92cc9e40 100644
--- a/mdk-stage1/automatic.c
+++ b/mdk-stage1/automatic.c
@@ -89,17 +89,19 @@ enum return_type ask_from_list_auto(char *msg, char ** elems, char ** choice, ch
if (!IS_AUTOMATIC)
return ask_from_list(msg, elems, choice);
else {
+ char ** sav_elems = elems;
char * tmp = get_auto_value(auto_param);
while (elems && *elems) {
if (!strcmp(tmp, *elems_auto)) {
*choice = *elems;
log_message("AUTOMATIC: parameter %s for %s means returning %s", tmp, auto_param, *elems);
- break;
+ return RETURN_OK;
}
elems++;
elems_auto++;
}
- return RETURN_OK;
+ unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */
+ return ask_from_list(msg, sav_elems, choice);
}
}
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c
index 44e0b85fc..14ece3c04 100644
--- a/mdk-stage1/cdrom.c
+++ b/mdk-stage1/cdrom.c
@@ -43,6 +43,8 @@ static enum return_type try_with_device(char *dev_name)
if (my_mount(device_fullname, "/tmp/image", "iso9660") == -1) {
enum return_type results;
+ unset_param(MODE_AUTOMATIC); /* we are in a fallback mode */
+
results = ask_yes_no("I can't access a CDROM disc in your drive.\nRetry?");
if (results == RETURN_OK)
return try_with_device(dev_name);
diff --git a/update_kernel b/update_kernel
index f189c0150..b5b8bec6e 100755
--- a/update_kernel
+++ b/update_kernel
@@ -46,13 +46,13 @@ rm -rf modules ; install -d modules
perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep
ls *.o | packdrake -b9s modules.cz 400000
ls *.o | cpio --quiet -H crc -o | bzip2 -9> modules.cpio.bz2
- ls $NETWORK_MODULES | cpio --quiet -H crc -o | gzip -9 > network_modules.cgz
- ls $CDROM_MODULES | cpio --quiet -H crc -o | gzip -9 > cdrom_modules.cgz
- ls $HD_MODULES | cpio --quiet -H crc -o | gzip -9 > hd_modules.cgz
- ls $HDREISER_MODULES| cpio --quiet -H crc -o | gzip -9 > hdreiser_modules.cgz
- ls $PCMCIA_MODULES | cpio --quiet -H crc -o | gzip -9 > pcmcia_modules.cgz
- ls $BIG_MODULES | cpio --quiet -H crc -o | gzip -9 > other_modules.cgz
- ls $ALL_MODULES | cpio --quiet -H crc -o | gzip -9 > all_modules.cgz
+ ../mdk-stage1/mar/mar -c network_modules.mar $NETWORK_MODULES
+ ../mdk-stage1/mar/mar -c cdrom_modules.mar $CDROM_MODULES
+ ../mdk-stage1/mar/mar -c hd_modules.mar $HD_MODULES
+ ../mdk-stage1/mar/mar -c hdreiser_modules.mar $HDREISER_MODULES
+ ../mdk-stage1/mar/mar -c pcmcia_modules.mar $PCMCIA_MODULES
+ ../mdk-stage1/mar/mar -c other_modules.mar $BIG_MODULES
+ ../mdk-stage1/mar/mar -c all_modules.mar $ALL_MODULES
[ "$ARCH" == "i386" ] && {
cp $PCMCIA_INSTALLMODULES ../install_pcmcia_modules/
}