1.2.1'/>
summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-06-20 16:25:33 +0000
committerFrancois Pons <fpons@mandriva.com>2000-06-20 16:25:33 +0000
commit7f7a9b7b58dbef59e2e1a09afe682983dc7806f8 (patch)
tree8b7d537f31d92c3ba63acf1a67dd73c58ea84ab8 /perl-install
parente61090daf9ed3cfcb837287cf6717161d1179bf5 (diff)
downloaddrakx-7f7a9b7b58dbef59e2e1a09afe682983dc7806f8.tar
drakx-7f7a9b7b58dbef59e2e1a09afe682983dc7806f8.tar.gz
drakx-7f7a9b7b58dbef59e2e1a09afe682983dc7806f8.tar.bz2
drakx-7f7a9b7b58dbef59e2e1a09afe682983dc7806f8.tar.xz
drakx-7f7a9b7b58dbef59e2e1a09afe682983dc7806f8.zip
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog13
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/c/Makefile.PL3
-rw-r--r--perl-install/c/sbus.c38
-rw-r--r--perl-install/c/stuff.xs.pm53
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/fsedit.pm3
-rw-r--r--perl-install/help.pm20
-rw-r--r--perl-install/install2.pm1
-rw-r--r--perl-install/install_any.pm8
-rw-r--r--perl-install/install_steps.pm3
-rw-r--r--perl-install/install_steps_interactive.pm16
-rw-r--r--perl-install/partition_table.pm18
-rw-r--r--perl-install/sbus_probing/main.pm18
14 files changed, 163 insertions, 35 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 8d394f12b..82808360c 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,16 @@
+2000-06-20 François Pons <fpons@mandrakesoft.com>
+
+ * c/sbus.c: added some functions for silo.c integration.
+ * c/silo.c: initial release including write in prom, and translation
+ of disk name from openprom to linux, rh version modified.
+ * silo.pm: added write in prom, support of sunos boot from silo.
+ * partition_table.pm: added support for ufs partition like windows one.
+ * install_steps_interactive.pm: added other entries in silo.
+ * install_steps.pm: support sunos partition.
+ * install_any.pm: automatically mount sunos partition with diskdrake.
+ * fsedit.pm: added /mnt/sunos suggested mount point.
+ * fs.pm: added ufs support for mount.
+
2000-06-19 François Pons <fpons@mandrakesoft.com>
* crypto.pm: modified for getting sparc crypto file for sparc*.
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 120f1a387..34e32a2c5 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -135,7 +135,7 @@ You can add some more or change the existing ones."),
}
my %old_e = %$e;
my $default = my $old_default = $e->{label} eq $b->{default};
-
+
my @l;
if ($e->{type} eq "image") {
@l = (
diff --git a/perl-install/c/Makefile.PL b/perl-install/c/Makefile.PL
index e406f1fe4..315160a17 100644
--- a/perl-install/c/Makefile.PL
+++ b/perl-install/c/Makefile.PL
@@ -3,14 +3,13 @@ use ExtUtils::MakeMaker;
# the contents of the Makefile that is written.
my $libs = '-L/usr/X11R6/lib -lX11 -lgdk -lXxf86misc';
-
$libs .= ' -lrpm -ldb1 -lz' if $ENV{C_RPM};
WriteMakefile(
'NAME' => 'stuff',
'OPTIMIZE' => '-Os',
'MAKEFILE' => 'Makefile_c',
- 'OBJECT' => 'stuff.o smp.o md5.o md5_crypt.o sbus.o',
+ 'OBJECT' => 'stuff.o smp.o md5.o md5_crypt.o sbus.o silo.o',
'VERSION_FROM' => 'stuff.pm', # finds $VERSION
'LIBS' => [$libs], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
diff --git a/perl-install/c/sbus.c b/perl-install/c/sbus.c
index 3de75fca2..85d44fa79 100644
--- a/perl-install/c/sbus.c
+++ b/perl-install/c/sbus.c
@@ -19,12 +19,11 @@
*
*/
-#include <stdlib.h>
-
#ifdef __sparc__
#include <fcntl.h>
#include <unistd.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <asm/openpromio.h>
@@ -87,6 +86,25 @@ int prom_getchild(int node)
return *(int *)op->oprom_array;
}
+char *prom_getopt(char *var, int *lenp)
+{
+ DECL_OP(MAX_VAL);
+
+ strcpy (op->oprom_array, var);
+ if (ioctl (promfd, OPROMGETOPT, op) < 0)
+ return 0;
+ if (lenp) *lenp = op->oprom_size;
+ return op->oprom_array;
+}
+
+void prom_setopt(char *var, char *value) {
+ DECL_OP(MAX_VAL);
+
+ strcpy (op->oprom_array, var);
+ strcpy (op->oprom_array + strlen (var) + 1, value);
+ ioctl (promfd, OPROMSETOPT, op);
+}
+
char *prom_getproperty(char *prop, int *lenp)
{
DECL_OP(MAX_VAL);
@@ -114,11 +132,25 @@ int prom_getbool(char *prop)
}
}
+int prom_pci2node(int bus, int devfn) {
+ DECL_OP(2*sizeof(int));
+
+ ((int *)op->oprom_array)[0] = bus;
+ ((int *)op->oprom_array)[1] = devfn;
+ if (ioctl (promfd, OPROMPCI2NODE, op) < 0)
+ return 0;
+ prom_current_node = *(int *)op->oprom_array;
+ return *(int *)op->oprom_array;
+}
+
#else
int prom_open() { return 0; }
void prom_close() {}
int prom_getsibling(int node) { return 0; }
int prom_getchild(int node) { return 0; }
-char *prom_getproperty(char *prop, int *lenp) { return NULL; }
+char *prom_getopt(char *var, int *lenp) { return 0; /* NULL */ }
+void prom_setopt(char *var, char *value) {}
+char *prom_getproperty(char *prop, int *lenp) { return 0; /* NULL */ }
int prom_getbool(char *prop) { return 0; }
+int prom_pci2node(int bus, int devfn) { return 0; }
#endif /* __sparc__ */
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 034996d21..3967392fb 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -326,12 +326,12 @@ prom_getchild(node)
int node
void
-prom_getproperty(key)
+prom_getopt(key)
char *key
PPCODE:
int lenp = 0;
char *value = NULL;
- value = prom_getproperty(key, &lenp);
+ value = prom_getopt(key, &lenp);
EXTEND(sp, 1);
if (value != NULL) {
PUSHs(sv_2mortal(newSVpv(value, 0)));
@@ -339,23 +339,62 @@ prom_getproperty(key)
PUSHs(&PL_sv_undef);
}
-int
-prom_getbool(key)
+void
+prom_setopt(key, value)
+ char *key
+ char *value
+
+void
+prom_getproperty(key)
char *key
+ PPCODE:
+ int lenp = 0;
+ char *value = NULL;
+ value = prom_getproperty(key, &lenp);
+ EXTEND(sp, 1);
+ if (value != NULL) {
+ PUSHs(sv_2mortal(newSVpv(value, lenp)));
+ } else {
+ PUSHs(&PL_sv_undef);
+ }
void
-prom_getint(key)
+prom_getstring(key)
char *key
PPCODE:
int lenp = 0;
char *value = NULL;
value = prom_getproperty(key, &lenp);
EXTEND(sp, 1);
- if (value != NULL && lenp == sizeof(int)) {
- PUSHs(sv_2mortal(newSViv(*(int *)value)));
+ if (value != NULL) {
+ PUSHs(sv_2mortal(newSVpv(value, 0)));
} else {
PUSHs(&PL_sv_undef);
}
+
+int
+prom_getbool(key)
+ char *key
+
+
+
+void
+initSilo()
+
+char *
+disk2PromPath(disk)
+ unsigned char *disk
+
+int
+hasAliases()
+
+char *
+promRootName()
+
+void
+setPromVars(linuxAlias, bootDevice)
+ char *linuxAlias
+ char *bootDevice
';
$ENV{C_RPM} and print '
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 12e9ceae0..33dc8229b 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -197,6 +197,8 @@ sub mount($$$;$) {
$mount_opt = 'check=relaxed';
eval { modules::load('vfat') }; #- try using vfat
eval { modules::load('msdos') } if $@; #- otherwise msdos...
+ } elsif ($fs eq 'ufs') {
+ eval { modules::load('ufs') };
} elsif ($fs eq 'reiserfs') {
#- could be better if we knew if there is a /boot or not
#- without knowing it, / is forced to be mounted with notail
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 020a6f57c..6d30a73ab 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -36,8 +36,7 @@ arch() =~ /^sparc/ ? (
{ mntpoint => "/tmp", size => 50 << 11, type => 0x83, ratio => 3, maxsize => 500 << 11 },
{ mntpoint => "/mnt/iso", size => 700 << 11, type => 0x83 },
);
-my @suggestions_mntpoints = qw(/root /mnt/windows);
-
+my @suggestions_mntpoints = ( "/root/", arch() =~ /sparc/ ? "/mnt/sunos" : "/mnt/windows" );
my @partitions_signatures = (
[ 0x83, 0x438, "\x53\xEF" ],
diff --git a/perl-install/help.pm b/perl-install/help.pm
index af8e1611a..25668d026 100644
--- a/perl-install/help.pm
+++ b/perl-install/help.pm
@@ -371,6 +371,26 @@ when booting. The following values are available:
* normal: select normal 80x25 text mode.
* <number>: use the corresponding text mode."),
+setupSILOAddEntry =>
+ __("SILO is a bootloader for SPARC: it is able to boot
+either GNU/Linux or any other operating system present on your computer.
+Normally, these other operating systems are correctly detected and
+installed. If this is not the case, you can add an entry by hand in this
+screen. Be careful as to choose the correct parameters.
+
+
+You may also want not to give access to these other operating systems to
+anyone, in which case you can delete the corresponding entries. But
+in this case, you will need a boot disk in order to boot them!"),
+
+setupSILOGeneral =>
+ __("SILO main options are:
+ - Delay before booting default image: Specifies the number in tenths
+of a second the boot loader should wait before booting the first image.
+This is useful on systems that immediately boot from the hard disk after
+enabling the keyboard. The boot loader doesn't wait if \"delay\" is
+omitted or is set to zero."),