summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-27 22:15:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-27 22:15:55 +0000
commitf5b6d853f3ed37cd88f4797f7bfb41fef7dd81ce (patch)
tree0e4db5f684c4e5dac4779c78a2ca90cf63aa5079
parentde9cfda6393333a5a9e69e666aa6f56b8971c16c (diff)
downloaddrakx-backup-do-not-use-f5b6d853f3ed37cd88f4797f7bfb41fef7dd81ce.tar
drakx-backup-do-not-use-f5b6d853f3ed37cd88f4797f7bfb41fef7dd81ce.tar.gz
drakx-backup-do-not-use-f5b6d853f3ed37cd88f4797f7bfb41fef7dd81ce.tar.bz2
drakx-backup-do-not-use-f5b6d853f3ed37cd88f4797f7bfb41fef7dd81ce.tar.xz
drakx-backup-do-not-use-f5b6d853f3ed37cd88f4797f7bfb41fef7dd81ce.zip
no_comment
-rw-r--r--Makefile9
-rw-r--r--docs/TODO4
-rwxr-xr-xmake_boot_img176
-rw-r--r--perl-install/Makefile7
-rw-r--r--perl-install/fsedit.pm12
-rw-r--r--perl-install/install2.pm27
-rw-r--r--perl-install/install_steps.pm21
-rw-r--r--perl-install/install_steps_gtk.pm2
-rw-r--r--perl-install/install_steps_interactive.pm7
-rw-r--r--perl-install/modules.pm10
-rw-r--r--perl-install/partition_table.pm2
-rw-r--r--perl-install/partition_table_bsd.pm28
-rw-r--r--perl-install/partition_table_raw.pm2
-rw-r--r--perl-install/share/list68
-rw-r--r--perl-install/share/list.alpha68
-rw-r--r--perl-install/share/list.i3862
-rwxr-xr-xupdate_kernel27
17 files changed, 270 insertions, 202 deletions
diff --git a/Makefile b/Makefile
index ae05e0fe2..8044dad22 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,16 @@
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
-BOOT_IMG = hd.img cdrom.img network.img
RELEASE_BOOT_IMG = hd.img cdrom.img network.img
ifeq (i386,$(ARCH))
-BOOT_IMG += pcmcia.img pcmcia_ks.img network_ks.img
+BOOT_IMG = pcmcia_ks.img network_ks.img
RELEASE_BOOT_IMG += pcmcia.img
endif
ifeq (sparc,$(ARCH))
-BOOT_IMG += live.img tftp.img tftprd.img
+BOOT_IMG = live.img tftp.img tftprd.img
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
@@ -48,7 +49,7 @@ dirs:
for i in $(DIRS); do make -C $$i; done
$(BOOT_RDZ): dirs modules
- `./tools/specific_arch ./make_boot_img` $@ $(@:%.rdz=%)
+ ./make_boot_img $@ $(@:%.rdz=%)
$(BOOT_IMG): %.img: %.rdz
`./tools/specific_arch ./make_boot_img` $@ $(@:%.img=%)
diff --git a/docs/TODO b/docs/TODO
index 2e5bcf332..fa54aee84 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -18,6 +18,8 @@ just before release:
("ATI|3D Rage P/M Mobility AGP 2x" -> changed to Server:Mach64)
--------------------------------------------------------------------------------
+ask package installation languages (must be put in RPM_INSTALL_LANG)
+
remount ro before X test.
checkboxes in groups based on compssList (and availableSpace?)
@@ -171,7 +173,7 @@ aha152x needs "insmod aha152x.o aha152x=0x140,11,7"
try detect_devices::floppies (and how are scsi floppies handled?)
maybe: do a iotcl FDGETPRM to detect fd1, fd0.
-grub, chos
+grub, chos, gag
(?)when clicking on X configuration, installation of packages is not displayed
diff --git a/make_boot_img b/make_boot_img
index c6f5431bf..6b137b826 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -1,12 +1,16 @@
#!/usr/bin/perl
-@ARGV >= 2 or die "usage: $0 <image> cdrom|hd|network|network_ks|pcmcia\n";
+@ARGV >= 2 or die "usage: $0 <image> cdrom|hd|network|network_ks|pcmcia|live|tftp|tftprd\n";
+
+use Config;
+Config->import;
+my ($arch) = $Config{archname} =~ /(.*)-/;
($img, $type) = @ARGV;
$instdir = "install";
$ks = "kickstart=floppy" if $type =~ s/_ks//;
-$mnt = "/mnt/disk";
+$mnt = "/tmp/drakx_mnt";
$mke2fs = "/sbin/mke2fs -q -m 0 -F -s 1";
if ($>) {
@@ -14,26 +18,31 @@ if ($>) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
}
+sub __ { print @_, "\n"; system(@_); }
+sub _ { __ @_; $? and die; }
+
+_ "$sudo mkdir $mnt" unless -e $mnt;
+_ "$sudo mkdir ${mnt}2" unless -e "${mnt}2";
+
$install = $ {{
+ live => "full-install",
+ tftp => "full-install",
+ tftprd => "full-install",
pcmcia => "full-install",
network => "install",
cdrom => "local-install",
hd => "local-install"
}}{$type} or die;
-$img =~ /rdz$/ ? initrd($mnt, $img) : msg_boot_img($mnt, $img);
-#boot_img($mnt, $img);
-
-sub __ { print @_, "\n"; system(@_); }
-sub _ { __ @_; $? and die; }
+$img =~ /rdz$/ ? initrd($mnt, $img) : $::{"boot_img_$arch"}->($mnt, $img);
sub install_s { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" }
sub initrd {
my ($mnt, $img) = @_;
my $tmp = "$ENV{HOME}/tmp/initrd";
- my $tar = "$instdir/install1_$type.tar.bz2";
- -e $tar or $tar = "$instdir/install1.tar.bz2";
+ my $tar = "$instdir/install1_$type.$arch.tar.bz2";
+ -e $tar or $tar = "$instdir/install1.$arch.tar.bz2";
__ "$sudo umount $tmp $mnt 2>/dev/null";
_ "dd if=/dev/zero of=$tmp bs=1k count=2000";
@@ -46,6 +55,7 @@ sub initrd {
_ "$sudo cp -f install_${type}_modules/* $mnt/modules/" if -d "install_${type}_modules";
_ "$sudo cp -f modules/${type}_modules.cgz $mnt/modules/modules.cgz";
+ _ "ln -s modules.cgz $mnt/modules/modules64.cgz" if $arch =~ /sparc/;
_ "$sudo cp -f modules/modules.dep $mnt/modules/";
_ "$sudo umount $mnt";
@@ -57,28 +67,7 @@ sub initrd {
# _ "rm -f $tmp";
}
-sub boot_img {
- my ($mnt, $img) = @_;
-
- __ "$sudo umount $mnt 2>/dev/null";
- _ "bunzip2 -c $instdir/installinit/emptyboot.img.bz2 > $img";
- _ "$sudo mount -t msdos -o umask=0 $img $mnt -o loop";
- _ "cat vmlinuz > $mnt/vmlinuz";
- -f "$type.rdz" ? _ "cp -f $type.rdz $mnt" : initrd("${mnt}2", "$mnt/$type.rdz");
-
- output("$mnt/syslinux.cfg", "
-default linux
-prompt 0
-label linux
- kernel vmlinuz
- append $ks ramdisk=32000 initrd=$type.rdz mdkinst $type
-");
- _ "cp -f $instdir/installinit/ks.cfg $mnt 2>/dev/null" if $ks;
- _ "sync";
- _ "df $mnt";
-}
-
-sub msg_boot_img {
+sub boot_img_i386 {
my ($mnt, $img) = @_;
__ "$sudo umount $mnt 2>/dev/null";
@@ -118,7 +107,132 @@ label rescue
_ "df $mnt";
}
+sub boot_img_alpha {
+ my ($mnt, $img) = @_;
+ my $sizek = int ((-s "vmlinux.gz") / 1024 + 130);
+
+ __ "$sudo umount $mnt 2>/dev/null";
+ _ "dd if=/dev/zero of=$img bs=1k count=$sizek";
+ _ "$mke2fs $img";
+ _ "/sbin/e2writeboot $img /boot/bootlx";
+ _ "$sudo mount -t ext2 $img $mnt -o loop";
+ _ "cp -f vmlinux.gz $mnt";
+ -f "$type.rdz" or initrd("${mnt}2", "$type.rdz");
+
+ mkdir "$mnt/etc", 0777;
+ output("$mnt/etc/aboot.conf",
+"0:vmlinux.gz load_ramdisk=1 prompt_ramdisk=0 ramdisk_start=$sizek root=/dev/fd0 mdkinst rw ramdisk=32000
+");
+ _ "sync";
+ _ "df $mnt";
+ __ "$sudo umount $mnt 2>/dev/null";
+ _ "cat $type.rdz >> $img";
+}
+
+sub boot_img_sparc {
+ my ($mnt, $img) = @_;
+ if ($type eq 'live') {
+ #- hack to produce directly into /export the needed file for cdrom boot.
+ my $dir = "/export";
+ my $boot = "boot"; #- non-absolute pathname only!
+
+ _ "mkdir -p $dir/$boot";
+ _ "cp -f /boot/cd.b /boot/second.b $dir/$boot";
+ _ "cp -f vmlinuz $dir/$boot/vmlinux.gz";
+ -f "live.rdz" ? _ "cp -f live.rdz $dir/$boot" : initrd("${mnt}2", "$dir/$boot/live.rdz");
+
+ output("$dir/$boot/silo.conf", "
+partition=1
+default=linux
+timeout=100
+read-write
+message=/$boot/boot.msg
+image=\"cat /$boot/boot.msg\"
+ label=1
+ single-key
+image=\"cat /$boot/general.msg\"
+ label=2
+ single-key
+image=\"cat /$boot/expert.msg\"
+ label=3
+ single-key
+image=\"cat /$boot/rescue.msg\"
+ label=4
+ single-key
+image=\"cat /$boot/kickit.msg\"
+ label=5
+ single-key
+image=\"cat /$boot/param.msg\"
+ label=6
+ single-key
+image=/$boot/vmlinux.gz
+ label=linux
+ alias=install
+ initrd=/$boot/live.rdz
+ append=mdkinst ramdisk=32000
+image=/$boot/vmlinux.gz
+ label=text
+ initrd=/$boot/live.rdz
+ append=mdkinst ramdisk=32000 text
+image=/$boot/vmlinux.gz
+ label=expert
+ initrd=/$boot/live.rdz
+ append=mdkinst ramdisk=32000 expert
+image=/$boot/vmlinux.gz
+ label=ks
+ initrd=/$boot/live.rdz
+ append=mdkinst ramdisk=32000 ks
+");
+ output("$dir/$boot/README", "
+To Build a Bootable CD-ROM, try:
+ mkisofs -R -o t.iso -S $boot/cd.b -B $boot/second.b -s /$boot/silo.conf /export
+");
+ } elsif ($type eq 'tftp') {
+ my $dir = "/export";
+ my $boot = "images";
+
+ _ "mkdir -p $dir/$boot";
+ _ "elftoaout kernel/src/vmlinux -o $dir/$boot/tftp.img";
+ } elsif ($type eq 'tftprd') {
+ my $dir = "/export";
+ my $boot = "images";
+ my $arch = `uname -m`; chomp $arch;
+
+ _ "mkdir -p $dir/$boot";
+ -f "$type.rdz" ? _ "cp -f $type.rdz kernel/src/initrd.gz" : initrd("${mnt}2", "kernel/src/initrd.gz");
+ _ "make -C kernel/src tftpboot.img";
+ _ "cp -f kernel/src/arch/$arch/boot/tftpboot.img $dir/$boot/tftprd.img";
+ } else {
+ my $dir = "floppy";
+
+ __ "$sudo umount $mnt 2>/dev/null";
+ _ "rm -rf $dir";
+ _ "mkdir -p $dir";
+ _ "cp -f /boot/fd.b /boot/second.b $dir";
+ _ "cp -f vmlinuz $dir/vmlinux.gz";
+ -f "$type.rdz" ? _ "cp -f $type.rdz $dir" : initrd("${mnt}2", "$dir/$type.rdz");
+
+ output("$dir/silo.conf", "
+partition=1
+default=linux
+timeout=100
+read-write
+image=/vmlinux.gz
+ label=linux
+ initrd=/$type.rdz
+ append=mdkinst ramdisk=32000 $type
+");
+ _ "genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V \'DrakX boot disk\'";
+ _ "$sudo mount -t romfs /dev/ram $mnt";
+ _ "silo -r $mnt -F -i /fd.b -b /second.b -C /silo.conf";
+ _ "$sudo umount $mnt";
+ _ "dd if=/dev/ram of=$type.img bs=1440k count=1";
+ _ "sync";
+ _ "$sudo mount -t romfs /dev/ram $mnt";
+ _ "df $mnt";
+ }
+}
sub output {
my $f = shift;
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 4555835f7..9911740d5 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -55,9 +55,8 @@ install_pms: $(DIRS)
get_needed_files: $(DIRS)
# export PERL_INSTALL_TEST=1 ; strace -f -e trace=file -o '| grep -v "(No such file or directory)" | sed -e "s/[^\"]*\"//" -e "s/\".*//" | grep "^/" | grep -v -e "^/tmp" -e "^/home" -e "^/proc" -e "^/var" -e "^/dev" -e "^/etc" -e "^/usr/lib/rpm" > /tmp/list ' $(PERL) -d install2 < /dev/null
- cp -f `../tools/specific_arch share/list` /tmp/list
-# cp -f share/list /tmp/list
-# perl -pi -e "s/ARCH/$(ARCH)/" /tmp/list
+ perl -pe "s/ARCH/$(ARCH)/g" share/list > /tmp/list
+ cat `../tools/specific_arch share/list` >> /tmp/list
find auto -follow -name "*.so" >> /tmp/list
for i in $(LOCALFILES) `cat /tmp/list` ; do \
@@ -109,7 +108,7 @@ endif
perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' aliases
- tar xfy `../tools/specific_arch share/locales.tar.bz2` -C $(DEST)
+ for i in fonts keyboards locales gconv; do tar xfy `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done
cp -a modparm.lst $(DEST)/usr/share
cd share ; cp -a keymaps $(DEST)/usr/share
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 95b5006df..866993793 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -20,7 +20,9 @@ use log;
#- Globals
#-#####################################################################################
my @suggestions = (
+arch() =~ /^i386/ ? (
{ mntpoint => "/boot", size => 16 << 11, type => 0x83, maxsize => 30 << 11 },
+) : (),
{ mntpoint => "/", size => 50 << 11, type => 0x83, ratio => 1, maxsize => 300 << 11 },
{ mntpoint => "swap", size => 30 << 11, type => 0x82, ratio => 1, maxsize => 250 << 11 },
{ mntpoint => "/usr", size => 200 << 11, type => 0x83, ratio => 6, maxsize =>1500 << 11 },
@@ -171,9 +173,11 @@ sub suggest_part($$$;$) {
grep { !$part->{type} || $part->{type} == $_->{type} }
@$suggestions or return;
- $best = $second if
- $best->{mntpoint} eq '/boot' &&
- $part->{start} + $best->{size} > 1024 * $hd->cylinder_size(); #- if the empty slot is beyond the 1024th cylinder, no use having /boot
+ if (arch() =~ /^i386/) {
+ $best = $second if
+ $best->{mntpoint} eq '/boot' &&
+ $part->{start} + $best->{size} > 1024 * $hd->cylinder_size(); #- if the empty slot is beyond the 1024th cylinder, no use having /boot
+ }
defined $best or return; #- sorry no suggestion :(
@@ -227,7 +231,7 @@ sub check_mntpoint {
has_mntpoint($mntpoint, $hds) and die _("There is already a partition with mount point %s", $mntpoint);
- if ($part->{start} + $part->{size} > 1024 * $hd->cylinder_size()) {
+ if ($part->{start} + $part->{size} > 1024 * $hd->cylinder_size() && arch() =~ /i386/) {
die "/boot ending on cylinder > 1024" if $mntpoint eq "/boot";
die "/ ending on cylinder > 1024" if $mntpoint eq "/" && !has_mntpoint("/boot", $hds);
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 80535764a..aa6266bff 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -58,7 +58,9 @@ my (%installSteps, @orderedInstallSteps);
configurePrinter => [ __("Configure printer"), 1, 0, '', "doInstallStep" ],
setRootPassword => [ __("Set root password"), 1, 1, '', "formatPartitions" ],
addUser => [ __("Add a user"), 1, 1, '', "doInstallStep" ],
+arch() =~ /alpha/ ? : (
createBootdisk => [ __("Create a bootdisk"), 1, 0, '', "doInstallStep" ],
+) : (),
setupBootloader => [ __("Install bootloader"), 1, 1, '', "doInstallStep" ],
configureX => [ __("Configure X"), 1, 0, '', ["formatPartitions", "setupBootloader"] ],
exitInstall => [ __("Exit install"), 0, 0, 'beginner' ],
@@ -123,24 +125,6 @@ $o = $::o = {
#- packages => [ qw() ],
partitioning => { clearall => 0, eraseBadPartitions => 0, auto_allocate => 0, autoformat => 0 }, #-, readonly => 0 },
#- security => 2,
- partitions => [
- { mntpoint => "/boot", size => 10 << 11, type => 0x83, maxsize => 30 << 11 },
- { mntpoint => "/", size => 300 << 11, type => 0x83, ratio => 5, maxsize => 1500 << 11 },
- { mntpoint => "swap", size => 64 << 11, type => 0x82, ratio => 1, maxsize => 250 << 11 },
- { mntpoint => "/home", size => 300 << 11, type => 0x83, ratio => 5 },
- ],
-#- partitions => [
-#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
-#- { mntpoint => "/", size => 256 << 11, type => 0x83 },
-#- { mntpoint => "/usr", size => 512 << 11, type => 0x83, growable => 1 },
-#- { mntpoint => "/var", size => 256 << 11, type => 0x83 },
-#- { mntpoint => "/home", size => 512 << 11, type => 0x83, growable => 1 },
-#- { mntpoint => "swap", size => 64 << 11, type => 0x82 }
-#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
-#- { mntpoint => "/", size => 300 << 11, type => 0x83 },
-#- { mntpoint => "swap", size => 64 << 11, type => 0x82 },
-#- { mntpoint => "/usr", size => 400 << 11, type => 0x83, growable => 1 },
-#- ],
shells => [ map { "/bin/$_" } qw(bash tcsh zsh ash ksh) ],
authentication => { md5 => 1, shadow => 1 },
lang => 'en',
@@ -259,8 +243,9 @@ sub selectPath {
#------------------------------------------------------------------------------
sub selectInstallClass {
$o->selectInstallClass(@install_classes);
-
- $o->{partitions} ||= $suggestedPartitions{$o->{installClass}};
+
+ $o->{partitions} ||=
+ [ grep { arch() =~ /i386/ && $_->{mntpoint} ne "/boot" } @{$suggestedPartitions{$o->{installClass}}} ];
if ($o->{steps}{choosePackages}{entered} >= 1 && !$o->{steps}{doInstallStep}{done}) {
$o->setPackages(\@install_classes);
@@ -610,6 +595,8 @@ sub main {
modules::read_stage1_conf("/tmp/conf.modules");
modules::read_already_loaded();
+ eval { modules::load("ide-disk") };
+ eval { modules::load("sd_mod") };
install_any::lnx4win_preinstall() if $o->{lnx4win};
#-the main cycle
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index c8bcc2a64..84c4918c5 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -613,7 +613,13 @@ sub readBootloaderConfigBeforeInstall {
sub setupBootloaderBefore {
my ($o) = @_;
- if (arch() =~ /^sparc/) {
+ if (arch() =~ /alpha/) {
+ if (my $dev = fsedit::get_root($o->{fstab})) {
+ $o->{bootloader}{boot} ||= "/dev/$dev->{rootDevice}";
+ $o->{bootloader}{root} ||= "/dev/$dev->{device}";
+ $o->{bootloader}{part_nb} ||= first($dev->{device} =~ /(\d+)/);
+ }
+ } elsif (arch() =~ /^sparc/) {
require silo;
silo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion());
} else {
@@ -627,7 +633,18 @@ sub setupBootloader($) {
my ($o) = @_;
return if $::g_auto_install;
- if (arch() =~ /^sparc/) {
+ if (arch() =~ /alpha/) {
+ return if $::testing;
+ my $b = $o->{bootloader};
+ $b->{boot} or $o->ask_warn('', "Can't install aboot, not a bsd disklabel"), return;
+
+ run_program::rooted($o->{prefix}, "swriteboot", $b->{boot}, "/boot/bootlx");
+ run_program::rooted($o->{prefix}, "abootconf", $b->{boot}, $b->{part_nb});
+
+ output "$o->{prefix}/etc/aboot.conf",
+ map_index { "$::i:$b->{part_nb}$_ root=$b->{root} $b->{perImageAppend}\n" }
+ map { /$o->{prefix}(.*)/ } eval { glob_("$o->{prefix}/boot/vmlinux*") };
+ } elsif (arch() =~ /^sparc/) {
silo::install($o->{prefix}, $o->{bootloader});
} else {
lilo::install($o->{prefix}, $o->{bootloader});
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index d82ea688a..a77333b21 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -278,7 +278,7 @@ When sure, press Ok."))) {
my $oldsize = $part->{size};
$hd->{isDirty} = $hd->{needKernelReread} = 1;
$part->{size} -= min($max_linux, $part->{size} - $min_win);
- partition_table::adjustEnd($hd, $part);
+ $hd->adjustEnd($part);
partition_table::adjust_local_extended($hd, $part);
partition_table::adjust_main_extended($hd);
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index a3275a7ce..612129988 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -932,7 +932,10 @@ sub setupBootloaderBefore {
#------------------------------------------------------------------------------
sub setupBootloader {
- if (arch() =~ /^sparc/) {
+ if (arch() =~ /^i386/) {
+ $o->ask_yesorno('', _("Do you want to use aboot?"), 1) or return;
+ $o->SUPER::setupBootloader;
+ } elsif (arch() =~ /^sparc/) {
&setupSILO;
} else {
&setupLILO;
@@ -1131,7 +1134,7 @@ sub load_thiskind {
if ($type =~ /scsi/i && cat_("/proc/cmdline") !~ /ide2=/) {
require pci_probing::main;
my @l = map { $_->[0] } grep { $_->[1] =~ /(HPT|Ultra66)/ } pci_probing::main::probe('STORAGE_OTHER', 'more');
- if ($o->ask_yesorno('',
+ if (@l && $o->ask_yesorno('',
_("Linux does not yet fully support ultra dma 66.
As a work-around i can make a custom floppy giving access the hard drive on ide2 and ide3"), 1)) {
log::l("HPT|Ultra66: found");
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index b561d0289..5dd266d99 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -131,6 +131,7 @@ arch() =~ /^sparc/ ? (
# "pci2000" => "Perceptive Solutions PCI-2000", # TODO
"qlogicisp" => "Qlogic ISP",
"sym53c8xx" => "Symbios 53c8xx",
+ "scsi_mod" => "scsi_mod",
}],
[ 'disk', {
arch() =~ /^sparc/ ? (
@@ -147,6 +148,7 @@ arch() =~ /^sparc/ ? (
"eata_dma" => "EATA DMA Adapters",
"ppa" => "Iomega PPA3 (parallel port Zip)",
"imm" => "Iomega Zip (new driver)",
+ "ide-disk" => "IDE disk",
),
}],
[ 'cdrom', {
@@ -165,6 +167,7 @@ arch() !~ /^sparc/ ? (
) : (),
"isofs" => "iso9660",
"ide-cd" => "ide-cd",
+ "cdrom" => "cdrom",
}],
[ 'sound', {
arch() !~ /^sparc/ ? (
@@ -289,6 +292,10 @@ my %type_aliases = (
scsi => 'disk',
);
+my @skip_modules_on_stage1 =
+ arch() =~ /alpha/ ? qw(sb1000) :
+ ();
+
my @drivers_fields = qw(text type);
%drivers = ();
@@ -308,7 +315,8 @@ while (my ($k, $v) = each %drivers) {
sub module_of_type($) {
my ($type) = @_;
- grep { $drivers{$_}{type} =~ /^($type)$/ } keys %drivers;
+ my %skip; @skip{@skip_modules_on_stage1} = ();
+ grep { !exists $skip{$_} } grep { $drivers{$_}{type} =~ /^($type)$/ } keys %drivers;
}
sub text_of_type($) {
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 624e616a0..4702a1210 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -415,7 +415,7 @@ sub write($) {
$_->{normal}{local_start} = $_->{normal}{start} - $_->{start};
$_->{extended} and $_->{extended}{local_start} = $_->{extended}{start} - $hd->{primary}{extended}{start};
- arch() !~ /^sparc/ and $hd->write($_->{start}, $_->{raw}) or die "writing of partition table failed";
+ $hd->write($_->{start}, $_->{raw}) or die "writing of partition table failed";
}
$hd->{isDirty} = 0;
diff --git a/perl-install/partition_table_bsd.pm b/perl-install/partition_table_bsd.pm
index 13398e007..a68d0ec4e 100644
--- a/perl-install/partition_table_bsd.pm
+++ b/perl-install/partition_table_bsd.pm
@@ -47,6 +47,8 @@ my ($main_format, $main_fields) = list2kv(
S => 'npartitions',
I => 'bbsize',
I => 'sbsize',
+ a128=> 'partitions',
+ a236=> 'blank',
);
$main_format = join '', @$main_format;
@@ -66,20 +68,18 @@ sub read($$) {
sysread F, $tmp, psizeof($main_format) or die "error while reading partition table in sector $sector";
my %info; @info{@$main_fields} = unpack $main_format, $tmp;
- $info{npartitions} <= $nb_primary or die "too many partitions ($info{npartitions} > $nb_primary) for a bsd disklabel";
-
- #- check magic number
- $info{magic} == $magic or die "bad magic number";
- $info{magic2} == $magic or die "bad magic number";
-
#- TODO verify checksum
+ my $size = psizeof($format);
my @pt = map {
- sysread F, $tmp, psizeof($format) or die "error while reading partition table in sector $sector";
- my %h; @h{@fields} = unpack $format, $tmp;
+ my %h; @h{@fields} = unpack $format, $_;
$h{type} = $typeToDos{$h{type}} || $h{type};
\%h;
- } (1..$info{npartitions});
+ } $info{partitions} =~ /(.{$size})/g;
+
+ #- check magic number
+ $info{magic} == $magic or die "bad magic number";
+ $info{magic2} == $magic or die "bad magic number";
[ @pt ], \%info;
}
@@ -103,13 +103,13 @@ sub write($$$;$) {
$info->{npartitions} = $nb_primary; #- is it ok?
- syswrite F, pack($main_format, @$info{@$main_fields}), psizeof($main_format) or return 0;
-
@$pt == $nb_primary or die "partition table does not have $nb_primary entries";
- foreach (@$pt) {
+ $info->{partitions} = join '', map {
local $_->{type} = $typeFromDos{$_->{type}} || $_->{type};
- syswrite F, pack($format, @$_{@fields}), psizeof($format) or return 0;
- }
+ pack $format, @$_{@fields};
+ } @$pt;
+
+ syswrite F, pack($main_format, @$info{@$main_fields}), psizeof($main_format) or return 0;
1;
}
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index 455381935..668913d9c 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -79,7 +79,7 @@ sub kernel_read($) {
sub zero_MBR($) {
my ($hd) = @_;
# unless (ref($hd) =~ /partition_table/) {
- my $type = arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : "sun";
+ my $type = arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : "dos";
bless $hd, "partition_table_$type";
# }
$hd->{isDirty} = $hd->{needKernelReread} = 1;
diff --git a/perl-install/share/list b/perl-install/share/list
index d7e8b49b3..a13ac6099 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -54,45 +54,39 @@
/usr/lib/perl5/5.00503/Symbol.pm
/usr/lib/perl5/5.00503/Time/Local.pm
/usr/lib/perl5/5.00503/dumpvar.pl
-/usr/lib/perl5/5.00503/i386-linux/Config.pm
-/usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm
-/usr/lib/perl5/5.00503/i386-linux/Fcntl.pm
-/usr/lib/perl5/5.00503/i386-linux/auto/Fcntl/Fcntl.bs
-/usr/lib/perl5/5.00503/i386-linux/auto/Fcntl/Fcntl.so
-/usr/lib/perl5/5.00503/i386-linux/IO/File.pm
-/usr/lib/perl5/5.00503/i386-linux/IO/Handle.pm
-/usr/lib/perl5/5.00503/i386-linux/IO/Seekable.pm
-/usr/lib/perl5/5.00503/i386-linux/IO/Socket.pm
-/usr/lib/perl5/5.00503/i386-linux/Socket.pm
-/usr/lib/perl5/5.00503/i386-linux/_h2ph_pre.ph
-/usr/lib/perl5/5.00503/i386-linux/asm/unistd.ph
-/usr/lib/perl5/5.00503/i386-linux/auto/Data/Dumper/Dumper.bs
-/usr/lib/perl5/5.00503/i386-linux/auto/Data/Dumper/Dumper.so
-/usr/lib/perl5/5.00503/i386-linux/auto/IO/IO.so
-/usr/lib/perl5/5.00503/i386-linux/auto/Socket/Socket.bs
-/usr/lib/perl5/5.00503/i386-linux/auto/Socket/Socket.so
-/usr/lib/perl5/5.00503/i386-linux/bits/syscall.ph
-/usr/lib/perl5/5.00503/i386-linux/sys/syscall.ph
-/usr/lib/perl5/5.00503/i386-linux/syscall.ph
+/usr/lib/perl5/5.00503/ARCH-linux/Config.pm
+/usr/lib/perl5/5.00503/ARCH-linux/DynaLoader.pm
+/usr/lib/perl5/5.00503/ARCH-linux/Fcntl.pm
+/usr/lib/perl5/5.00503/ARCH-linux/auto/Fcntl/Fcntl.bs
+/usr/lib/perl5/5.00503/ARCH-linux/auto/Fcntl/Fcntl.so
+/usr/lib/perl5/5.00503/ARCH-linux/IO/File.pm
+/usr/lib/perl5/5.00503/ARCH-linux/IO/Handle.pm
+/usr/lib/perl5/5.00503/ARCH-linux/IO/Seekable.pm
+/usr/lib/perl5/5.00503/ARCH-linux/IO/Socket.pm
+/usr/lib/perl5/5.00503/ARCH-linux/Socket.pm
+/usr/lib/perl5/5.00503/ARCH-linux/_h2ph_pre.ph
+/usr/lib/perl5/5.00503/ARCH-linux/asm/unistd.ph
+/usr/lib/perl5/5.00503/ARCH-linux/auto/Data/Dumper/Dumper.bs
+/usr/lib/perl5/5.00503/ARCH-linux/auto/Data/Dumper/Dumper.so
+/usr/lib/perl5/5.00503/ARCH-linux/auto/IO/IO.so
+/usr/lib/perl5/5.00503/ARCH-linux/auto/Socket/Socket.bs
+/usr/lib/perl5/5.00503/ARCH-linux/auto/Socket/Socket.so
+/usr/lib/perl5/5.00503/ARCH-linux/bits/syscall.ph
+/usr/lib/perl5/5.00503/ARCH-linux/sys/syscall.ph
+/usr/lib/perl5/5.00503/ARCH-linux/syscall.ph
/usr/lib/perl5/5.00503/lib.pm
/usr/lib/perl5/5.00503/overload.pm
/usr/lib/perl5/5.00503/strict.pm
/usr/lib/perl5/5.00503/vars.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Gtk.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Gtk/Types.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/Cmd.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/Config.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/FTP.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/FTP/A.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/FTP/I.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/FTP/dataconn.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/Net/Netrc.pm
-/usr/lib/perl5/site_perl/5.005/i386-linux/auto/Gtk/Gtk.bs
-/usr/lib/perl5/site_perl/5.005/i386-linux/auto/Gtk/Gtk.so
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Gtk.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Gtk/Types.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/Cmd.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/Config.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/FTP.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/FTP/A.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/FTP/I.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/FTP/dataconn.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/Net/Netrc.pm
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/auto/Gtk/Gtk.bs
+/usr/lib/perl5/site_perl/5.005/ARCH-linux/auto/Gtk/Gtk.so
/usr/lib/rpm/rpmrc
-/usr/X11R6/bin/XF86_FBDev
-/usr/X11R6/bin/XF86_VGA16
-/usr/X11R6/bin/XF86_3DLabs
-/usr/X11R6/bin/XF86_TGA
-/usr/X11R6/bin/XF86_Mach64
-/usr/X11R6/bin/xmodmap
diff --git a/perl-install/share/list.alpha b/perl-install/share/list.alpha
index cdcd669c5..4d30b1431 100644
--- a/perl-install/share/list.alpha
+++ b/perl-install/share/list.alpha
@@ -1,71 +1,3 @@
-/bin/ash
-/bin/cpio
-/lib/libnss_nis.so.2
-/lib/libnss_files.so.2
-/lib/libnss_dns.so.2
-/lib/libresolv.so.2
-/etc/protocols
-/sbin/fdisk
-/sbin/ifport
-/sbin/insmod
-/sbin/mkraid
-/sbin/rmmod
-/sbin/mkdosfs
-/sbin/mke2fs
-/sbin/raidstart
-/usr/bin/bzip2
-/usr/bin/perl
-/usr/lib/libimlib-png.so
-/usr/lib/gtk/themes/engines/libpixmap.so
-/usr/lib/gtk/themes/engines/libpixmap.la
-/usr/lib/libimlib-png.so
-/usr/lib/perl5/5.00503/AutoLoader.pm
-/usr/lib/perl5/5.00503/Carp.pm
-/usr/lib/perl5/5.00503/Data/Dumper.pm
-/usr/lib/perl5/5.00503/Exporter.pm
-/usr/lib/perl5/5.00503/FileHandle.pm
-/usr/lib/perl5/5.00503/SelectSaver.pm
-/usr/lib/perl5/5.00503/SelfLoader.pm
-/usr/lib/perl5/5.00503/Symbol.pm
-/usr/lib/perl5/5.00503/Time/Local.pm
-/usr/lib/perl5/5.00503/dumpvar.pl
-/usr/lib/perl5/5.00503/alpha-linux/Config.pm
-/usr/lib/perl5/5.00503/alpha-linux/DynaLoader.pm
-/usr/lib/perl5/5.00503/alpha-linux/Fcntl.pm
-/usr/lib/perl5/5.00503/alpha-linux/auto/Fcntl/Fcntl.bs
-/usr/lib/perl5/5.00503/alpha-linux/auto/Fcntl/Fcntl.so
-/usr/lib/perl5/5.00503/alpha-linux/IO/File.pm
-/usr/lib/perl5/5.00503/alpha-linux/IO/Handle.pm
-/usr/lib/perl5/5.00503/alpha-linux/IO/Seekable.pm
-/usr/lib/perl5/5.00503/alpha-linux/IO/Socket.pm
-/usr/lib/perl5/5.00503/alpha-linux/Socket.pm
-/usr/lib/perl5/5.00503/alpha-linux/_h2ph_pre.ph
-/usr/lib/perl5/5.00503/alpha-linux/asm/unistd.ph
-/usr/lib/perl5/5.00503/alpha-linux/auto/Data/Dumper/Dumper.bs
-/usr/lib/perl5/5.00503/alpha-linux/auto/Data/Dumper/Dumper.so
-/usr/lib/perl5/5.00503/alpha-linux/auto/IO/IO.so
-/usr/lib/perl5/5.00503/alpha-linux/auto/Socket/Socket.bs
-/usr/lib/perl5/5.00503/alpha-linux/auto/Socket/Socket.so
-/usr/lib/perl5/5.00503/alpha-linux/bits/syscall.ph
-/usr/lib/perl5/5.00503/alpha-linux/sys/syscall.ph
-/usr/lib/perl5/5.00503/alpha-linux/syscall.ph
-/usr/lib/perl5/5.00503/lib.pm
-/usr/lib/perl5/5.00503/overload.pm
-/usr/lib/perl5/5.00503/strict.pm
-/usr/lib/perl5/5.00503/vars.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Gtk.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Gtk/Types.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/Cmd.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/Config.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/FTP.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/FTP/A.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/FTP/I.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/FTP/dataconn.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/Net/Netrc.pm
-/usr/lib/perl5/site_perl/5.005/alpha-linux/auto/Gtk/Gtk.bs
-/usr/lib/perl5/site_perl/5.005/alpha-linux/auto/Gtk/Gtk.so
-/usr/lib/rpm/rpmrc
-/usr/X11R6/bin/XF86_FBDev
/usr/X11R6/bin/XF86_3DLabs
/usr/X11R6/bin/XF86_TGA
/usr/X11R6/bin/xmodmap
diff --git a/perl-install/share/list.i386 b/perl-install/share/list.i386
new file mode 100644
index 000000000..af684bd7b
--- /dev/null
+++ b/perl-install/share/list.i386
@@ -0,0 +1,2 @@
+/usr/X11R6/bin/XF86_FBDev
+/usr/X11R6/bin/XF86_VGA16
diff --git a/update_kernel b/update_kernel
index c57b77a50..e1ae2eb37 100755
--- a/update_kernel
+++ b/update_kernel
@@ -6,12 +6,14 @@ function f() {
v=`perl -Iperl-install -e "use modules; print qq(\\$_.o\n) foreach modules::module_of_type(\"$1\")"`
}
+ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'`
+
f "scsi|disk" ; SCSI_DRIVERS=$v
f "net" ; NETWORK_DRIVERS=$v
f "scsi|cdrom" ; CD_DRIVERS=$v
f "pcmcia" ; PCMCIA_DRIVERS=$v
-FSMODULES="vfat.o fat.o"
+[ $ARCH == "i386" ] && FSMODULES="vfat.o fat.o"
NETWORK_MODULES="$FSMODULES $NETWORK_DRIVERS"
CDROM_MODULES=" $FSMODULES $CD_DRIVERS"
@@ -20,19 +22,22 @@ PCMCIA_MODULES=" $FSMODULES $PCMCIA_DRIVERS 8390.o lockd.o nfs.o sunrpc.o isofs.
LNX4WIN_MODULES="$FSMODULES loop.o isofs.o"
NOT_USEFULL_IN_STAGE1="nls_*.o parport_probe.o raid*.o serial.o smbfs.o usb-*.o"
-echo $NETWORK_DRIVERS
-
PCMCIA_INSTALLMODULES="pcmcia_core.o tcic.o ds.o i82365.o"
-cp -f $KERNEL_BOOT_PATH/boot/vmlinuz* vmlinuz
+if [ "$ARCH" == "i386" ]; then
+ #set 640x480x16 resolution on boot.
+ cp -f $KERNEL_BOOT_PATH/boot/vmlinuz* vmlinuz
+ /usr/sbin/rdev -v vmlinuz 785
+ cp -f vmlinuz /export/lnx4win
+
+ rm -rf install_pcmcia_modules ; install -d install_pcmcia_modules
+ install -d lnx4win/initrd/modules
+else
+ cp -f "$KERNEL_BOOT_PATH"/boot/vmlinux.gz .
+fi
cp -f $KERNEL_BOOT_PATH/boot/System.map* System.map
-#set 640x480x16 resolution on boot.
-/usr/sbin/rdev -v vmlinuz 785
-
rm -rf modules ; install -d modules
-rm -rf install_pcmcia_modules ; install -d install_pcmcia_modules
-install -d lnx4win/initrd/modules
(cd modules ;
cp -f `find ../"$KERNEL_BOOT_PATH"/lib/modules/ -name "*.o"` .
/sbin/depmod -m ../System.map -i -e *.o | grep ': ' | sed 's/\.o//g' > modules.dep
@@ -43,9 +48,9 @@ install -d lnx4win/initrd/modules
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 $PCMCIA_MODULES | cpio --quiet -H crc -o | gzip -9 > pcmcia_modules.cgz
+[ "$ARCH" == "i386" ] && {
cp $PCMCIA_INSTALLMODULES ../install_pcmcia_modules/
cp -f $LNX4WIN_MODULES modules.dep ../lnx4win/initrd/modules
+}
rm -f $NETWORK_MODULES $CDROM_MODULES $HD_MODULES $PCMCIA_MODULES $PCMCIA_INSTALLMODULES $NOT_USEFULL_IN_STAGE1 # leave in the directory non-install1 used modules
)
-
-cp -f vmlinuz /export/lnx4win