diff options
author | Francois Pons <fpons@mandriva.com> | 2000-05-22 20:57:51 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-05-22 20:57:51 +0000 |
commit | c15afb4a54dd6003ed89efaf6d42ef2db7eb887f (patch) | |
tree | c56ca90952b5e6499f897d11f73657d7cfc7a55c | |
parent | 58d2d2741ce5d150377e92b36d3ea5aaec97eb90 (diff) | |
download | drakx-backup-do-not-use-c15afb4a54dd6003ed89efaf6d42ef2db7eb887f.tar drakx-backup-do-not-use-c15afb4a54dd6003ed89efaf6d42ef2db7eb887f.tar.gz drakx-backup-do-not-use-c15afb4a54dd6003ed89efaf6d42ef2db7eb887f.tar.bz2 drakx-backup-do-not-use-c15afb4a54dd6003ed89efaf6d42ef2db7eb887f.tar.xz drakx-backup-do-not-use-c15afb4a54dd6003ed89efaf6d42ef2db7eb887f.zip |
*** empty log message ***
-rw-r--r-- | Makefile | 9 | ||||
-rwxr-xr-x | make_boot_img | 67 | ||||
-rw-r--r-- | perl-install/Makefile | 3 | ||||
-rw-r--r-- | perl-install/c/stuff.xs.pm | 7 | ||||
-rw-r--r-- | perl-install/common.pm | 8 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 11 | ||||
-rw-r--r-- | perl-install/modules.pm | 2 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 18 | ||||
-rw-r--r-- | perl-install/share/list.sparc | 1 | ||||
-rw-r--r-- | tools/Makefile | 2 |
10 files changed, 83 insertions, 45 deletions
@@ -7,7 +7,8 @@ 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 live64.img tftp64.img tftprd64.img +RELEASE_BOOT_IMG += hd64.img cdrom64.img network64.img endif BOOT_IMG += $(RELEASE_BOOT_IMG) @@ -70,11 +71,11 @@ rescue: modules network_ks.rdz pcmcia_ks.rdz: %_ks.rdz: %.rdz -network.rdz pcmcia.rdz hd.rdz cdrom.rdz live.rdz tftp.rdz tftprd.rdz: dirs modules +network.rdz pcmcia.rdz hd.rdz cdrom.rdz live.rdz tftp.rdz tftprd.rdz network64.rdz hd64.rdz cdrom64.rdz live64.rdz tftp64.rdz tftprd64.rdz: dirs modules ./make_boot_img $@ $(@:%.rdz=%) $(BOOT_IMG): %.img: %.rdz - `./tools/specific_arch ./make_boot_img` $@ $(@:%.img=%) + ./make_boot_img $@ $(@:%.img=%) tar: clean rpm -qa > needed_rpms.lst @@ -89,7 +90,7 @@ $(BOOT_IMG:%=%f): %f: % xmessage "Floppy done" clean: - rm -rf $(BOOT_IMG) $(BOOT_RDZ) $(BINS) modules install_pcmcia_modules vmlinu* System.map + 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 diff --git a/make_boot_img b/make_boot_img index 742a47ba2..41cecb13f 100755 --- a/make_boot_img +++ b/make_boot_img @@ -31,7 +31,14 @@ $install = $ {{ pcmcia => "full-install", network => "install", cdrom => "local-install", - hd => "local-install" + hd => "local-install", + live64 => "full-install", + tftp64 => "full-install", + tftprd64 => "full-install", + pcmcia64 => "full-install", + network64 => "install", + cdrom64 => "local-install", + hd64 => "local-install", }}{$type} or die; $img =~ /rdz$/ ? initrd($mnt, $img) : $::{"boot_img_$arch"}->($mnt, $img); @@ -40,6 +47,7 @@ sub install_s { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" } sub initrd { my ($mnt, $img) = @_; + my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type; my $tmp = "$ENV{HOME}/tmp/initrd"; my $tar = "$instdir/install1_$type.$arch.tar.bz2"; -e $tar or $tar = "$instdir/install1.$arch.tar.bz2"; @@ -54,9 +62,8 @@ sub initrd { install_s("$instdir/$install", "$mnt/sbin/install"); _ "$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 cp -f modules$I/${ltype}_modules.cgz $mnt/modules/modules$I.cgz"; + _ "$sudo cp -f modules$I/modules.dep $mnt/modules/"; _ "$sudo umount $mnt"; # Workaround for vfat-loop bug (quite touchy) @@ -143,15 +150,15 @@ sub boot_img_alpha { sub boot_img_sparc { my ($mnt, $img) = @_; - if ($type eq 'live') { + if ($type =~ /^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"); + _ "cp -f vmlinux$1 $dir/$boot/vmlinux$1"; + -f "live$1.rdz" ? _ "cp -f live$1.rdz $dir/$boot" : initrd("${mnt}2", "$dir/$boot/live$1.rdz"); output("$dir/$boot/silo.conf", " partition=1 @@ -177,20 +184,37 @@ image=\"cat /$boot/kickit.msg\" image=\"cat /$boot/param.msg\" label=6 single-key -image=/$boot/vmlinux.gz +image[sun4c,sun4d,sun4m]=/$boot/vmlinux label=linux alias=install initrd=/$boot/live.rdz append=ramdisk_size=32000 -image=/$boot/vmlinux.gz +image[sun4c,sun4d,sun4m]=/$boot/vmlinux label=text initrd=/$boot/live.rdz append=ramdisk_size=32000 text -image=/$boot/vmlinux.gz +image[sun4c,sun4d,sun4m]=/$boot/vmlinux label=expert initrd=/$boot/live.rdz append=ramdisk_size=32000 expert -image=/$boot/vmlinux.gz +image[sun4c,sun4d,sun4m]=/$boot/vmlinux + label=ks + initrd=/$boot/live.rdz + append=ramdisk_size=32000 ks +image[sun4u]=/$boot/vmlinux64 + label=linux + alias=install + initrd=/$boot/live.rdz + append=ramdisk_size=32000 +image[sun4u]=/$boot/vmlinux64 + label=text + initrd=/$boot/live.rdz + append=ramdisk_size=32000 text +image[sun4u]=/$boot/vmlinux64 + label=expert + initrd=/$boot/live.rdz + append=ramdisk_size=32000 expert +image[sun4u]=/$boot/vmlinux64 label=ks initrd=/$boot/live.rdz append=ramdisk_size=32000 ks @@ -200,29 +224,30 @@ image=/$boot/vmlinux.gz 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') { + } elsif ($type =~ /^tftprd(.*)/) { my $dir = "/export"; my $boot = "images"; + my $setarch = $1 ? "sparc64" : "sparc32"; _ "mkdir -p $dir/$boot"; - _ "elftoaout kernel/src/vmlinux -o $dir/$boot/tftp.img"; - } elsif ($type eq 'tftprd') { + -f "$type.rdz" or initrd("${mnt}2", "$type.rdz"); + _ "cp -f vmlinux$1.aout $dir/$boot/$type.img"; + _ "$setarch kernel$1/src/arch/sparc$1/boot/piggyback $dir/$boot/$type.img kernel$1/boot/System.map $type.rdz"; + } elsif ($type =~ /^tftp(.*)/) { 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"; + _ "cp -f vmlinux$1.aout $dir/$boot/$type.img"; } else { my $dir = "floppy"; + my ($ltype, $I) = $type =~ /(.*?)(64)/; $ltype ||= $type; __ "$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"; + _ "cp -f vmlinuz$I $dir/vmlinux$I.gz"; -f "$type.rdz" ? _ "cp -f $type.rdz $dir" : initrd("${mnt}2", "$dir/$type.rdz"); output("$dir/silo.conf", " @@ -230,10 +255,10 @@ partition=1 default=linux timeout=100 read-write -image=/vmlinux.gz +image=/vmlinux$I.gz label=linux initrd=/$type.rdz - append=ramdisk_size=32000 $type + append=ramdisk_size=32000 $ltype "); _ "genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V \'DrakX boot disk\'"; _ "$sudo mount -t romfs /dev/ram $mnt"; diff --git a/perl-install/Makefile b/perl-install/Makefile index 7e4ebb940..3265325ce 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -125,6 +125,9 @@ endif if [ -f ../modules/modules.cz* ]; then \ cp -f ../modules/modules.cz* $(DEST)/lib/; \ + if [ -f ../modules64/modules.cz* ]; then \ + cp -f ../modules64/modules.cz* $(DEST)/lib/modules64.cz2; \ + fi \ else \ cp -f ../modules/modules.cpio.bz2 $(DEST)/lib/; \ install -d $(DEST)/lib/modules; \ diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 6296c7461..77c779c83 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -261,6 +261,13 @@ kernel_version() OUTPUT: RETVAL +char * +kernel_arch() + CODE: + struct utsname u; + if (uname(&u) == 0) RETVAL = u.machine; else RETVAL = NULL; + OUTPUT: + RETVAL int set_loop(dev_fd, file) diff --git a/perl-install/common.pm b/perl-install/common.pm index 643201b3e..0a9a29271 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -136,14 +136,12 @@ sub expand_symlinks { } sub arch() { - require Config; - Config->import; - no strict; - $Config{archname} =~ /(.*)-/ and $1; + require c; + c::kernel_arch(); } sub better_arch { my ($new, $old) = @_; - while ($new && $new != $old) { $new = $compat_arch{$_} } + while ($new && $new ne $old) { $new = $compat_arch{$new} } $new; } sub compat_arch { better_arch(arch(), $_[0]) } diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index c8e1b8859..763012057 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -83,6 +83,7 @@ sub new($$) { } elsif (arch() =~ /^sparc/) { local $_ = cat_("/proc/fb"); if (/Mach64/) { @servers = qw(Mach64) } + elsif (/Permedia2/) { @servers = qw(3DLabs) } else { @servers = qw(Xsun24) } } @servers = qw(PPCDummy) if arch() eq "ppc"; @@ -946,9 +947,6 @@ Section "Screen" EndSubsection EndSection -END - if (arch() =~ /^sparc/) { - print F <<END_FBDEV_SPARC; Section "Screen" Driver "svga" Device "svga" @@ -959,9 +957,7 @@ Section "Screen" ViewPort 0 0 EndSubsection EndSection -END_FBDEV_SPARC - } else { - print F <<END_FBDEV; + Section "Screen" Driver "accel" Device "svga" @@ -972,8 +968,7 @@ Section "Screen" ViewPort 0 0 EndSubsection EndSection -END_FBDEV - } +END } #- ModeLine "640x480" 28 640 672 768 800 480 490 492 525 #-###################################################################################### diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 198bc118f..d4e2bcddd 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -423,7 +423,7 @@ sub unload($;$) { sub load_raw { my @l = map { my ($i, @i) = @$_; [ $i, \@i ] } @_; - my $cz = "/lib/modules.cz"; -e $cz or $cz .= "2"; + my $cz = "/lib/modules" . (arch() eq 'sparc64' && "64") . ".cz"; -e $cz or $cz .= "2"; run_program::run("extract_archive", $cz, "/tmp", map { "$_->[0].o" } @l); my @failed = grep { my $m = "/tmp/$_->[0].o"; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 8db9231a9..36647a872 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -115,7 +115,7 @@ my %ignoreBadPkg = ( #- simpler and faster depslist reader, this gets (sizeDeps). sub packageHeaderFile { my ($pkg) = @_; $pkg->{file} } sub packageName { my ($pkg) = @_; $pkg->{file} =~ /([^\(]*)(?:\([^\)]*\))?-[^-]+-[^-]+/ ? $1 : die "invalid file `$pkg->{file}'" } -sub packageSpecificArch { my ($pkg) = @_; $pkg->{file} =~ /[^\(]*(?:\(([^\)])*\))?-[^-]+-[^-]+/ ? $1 : die "invalid file `$pkg->{file}'" } +sub packageSpecificArch { my ($pkg) = @_; $pkg->{file} =~ /[^\(]*(?:\(([^\)]*)\))?-[^-]+-[^-]+/ ? $1 : die "invalid file `$pkg->{file}'" } sub packageVersion { my ($pkg) = @_; $pkg->{file} =~ /.*-([^-]+)-[^-]+/ ? $1 : die "invalid file `$pkg->{file}'" } sub packageRelease { my ($pkg) = @_; $pkg->{file} =~ /.*-[^-]+-([^-]+)/ ? $1 : die "invalid file `$pkg->{file}'" } @@ -181,11 +181,19 @@ sub extractHeaders($$$) { } #- size and correction size functions for packages. +#- invCorrectSize corrects size in the range 0 to 3Gb approximately, so +#- it should not be used outside these levels. +#- but since it is an inverted parabolic curve starting above 0, we can +#- get a solution where X=Y at approximately 9.3Gb. we use this point as +#- a limit to change the approximation to use a linear one. +#- for information above this point, we have the corrected size below the +#- original size wich is absurd, this point is named D below. my $A = -1.922e-05; my $B = 1.18411; my $C = 23.2; #- doesn't take hdlist's into account as getAvailableSpace will do it. -sub correctSize { max($_[0], ($A * $_[0] + $B) * $_[0] + $C) } #- size correction in MB. -sub invCorrectSize { min($_[0], (sqrt(max(sqr($B) + 4 * $A * ($_[0] - $C), 0)) - $B) / 2 / $A) } #- size correction in MB. +my $D = (sqrt(sqr($B - 1) - 4 * $A * $C) - ($B - 1)) / 2 / $A; +sub correctSize { $_[0] < $D ? ($A * $_[0] + $B) * $_[0] + $C : $_[0] } #- size correction in MB. +sub invCorrectSize { $_[0] < $D ? (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A : $_[0]; } #- size correction in MB. sub selectedSize { my ($packages) = @_; @@ -426,7 +434,7 @@ sub psUsingHdlist { if ($old_pkg) { if (packageVersion($pkg) eq packageVersion($old_pkg) && packageRelease($pkg) eq packageRelease($old_pkg)) { if (better_arch($specific_arch, packageSpecificArch($old_pkg))) { - log::l("replacing old package with package $1 with better arch"); + log::l("replacing old package with package $1 with better arch: $specific_arch"); $packages->[0]{packageName($pkg)} = $pkg; } else { log::l("keeping old package against package $1 with worse arch"); @@ -438,7 +446,7 @@ sub psUsingHdlist { $packages->[0]{packageName($pkg)} = $pkg; } } else { - log::l("ignoring package $1 with incompatible arch"); + log::l("ignoring package $1 with incompatible arch: $specific_arch"); } } else { die "bad hdlist file: $newf"; diff --git a/perl-install/share/list.sparc b/perl-install/share/list.sparc index efe38ea7a..dca2dd4a9 100644 --- a/perl-install/share/list.sparc +++ b/perl-install/share/list.sparc @@ -78,4 +78,5 @@ /usr/lib/rpm/rpmrc /usr/X11R6/bin/Xsun24 /usr/X11R6/bin/XF86_Mach64 +/usr/X11R6/bin/XF86_3DLabs /usr/X11R6/bin/xmodmap diff --git a/tools/Makefile b/tools/Makefile index 20a9192f3..469758906 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -15,7 +15,7 @@ $(DIRS): install: install make_mdkinst_stage2 gencompss $(ROOTDEST)/misc cd /usr/bin ; install build_archive $(ROOTDEST)/misc || { echo "build_archive is missing"; exit 1; } - cd /usr/bin ; install mkhdlist gendepslist2 rpm2header genhdlist_cz2 $(ROOTDEST)/misc || { echo "install rpmtools first!" ; exit 1; } + cd /usr/bin ; install gendepslist2 rpm2header genhdlist_cz2 $(ROOTDEST)/misc || { echo "install rpmtools first!" ; exit 1; } mkdir -p $(DEST)/usr/bin xhost+: %: %.c |