forked from pool/elilo
This commit is contained in:
commit
8a5346e749
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
35
elilo-3.6-MAC.diff
Normal file
35
elilo-3.6-MAC.diff
Normal file
@ -0,0 +1,35 @@
|
||||
diff -purN elilo-3.5-pre2/glue_netfs.c elilo-3.5-MAC/glue_netfs.c
|
||||
--- elilo-3.5-pre2/glue_netfs.c 2004-02-20 23:30:37.000000000 +0100
|
||||
+++ elilo-3.5-MAC/glue_netfs.c 2005-12-07 15:19:45.655191368 +0100
|
||||
@@ -61,6 +61,18 @@ static CHAR16 netfs_default_path[FILENAM
|
||||
static CHAR16 *hexa=L"0123456789ABCDEF";
|
||||
|
||||
static VOID
|
||||
+convert_mac2hex(UINT8 *hw_addr,INTN l, CHAR16 *str)
|
||||
+{
|
||||
+ UINTN i;
|
||||
+ for (i=0 ; i < l; i++) {
|
||||
+ str[3*i] = hexa[(hw_addr[i] & 0xf0)>>4];
|
||||
+ str[3*i+1] = hexa[hw_addr[i] & 0x0f];
|
||||
+ str[3*i+2] = ':';
|
||||
+ }
|
||||
+ str[3*l-1]='\0';
|
||||
+}
|
||||
+
|
||||
+static VOID
|
||||
convert_ip2hex(UINT8 *ip, INTN l, CHAR16 *str)
|
||||
{
|
||||
UINTN i;
|
||||
@@ -197,6 +209,12 @@ netfs_setdefaults(VOID *intf, config_fil
|
||||
|
||||
StrnCpy(config[6].fname, str, maxlen-1);
|
||||
StrnCpy(config[6].fname+2, CONFIG_EXTENSION, 6);
|
||||
+
|
||||
+ /* use the MAC address as a possible file name as well */
|
||||
+ convert_mac2hex(info.hw_addr,6,str);
|
||||
+ StrnCpy(config[7].fname, str, maxlen-1);
|
||||
+ StrnCpy(config[7].fname+17, CONFIG_EXTENSION, 6);
|
||||
+
|
||||
#else
|
||||
StrnCpy(config[0].fname, NETFS_DEFAULT_CONFIG, maxlen-1);
|
||||
config[0].fname[maxlen-1] = CHAR_NULL;
|
9
elilo-3.6-asm.diff
Normal file
9
elilo-3.6-asm.diff
Normal file
@ -0,0 +1,9 @@
|
||||
diff -purN elilo-3.5-pre2/ia64/longjmp.S elilo/ia64/longjmp.S
|
||||
--- elilo-3.5-pre2/ia64/longjmp.S 2002-01-13 17:00:08.000000000 +0100
|
||||
+++ elilo/ia64/longjmp.S 2005-12-07 14:50:38.833056090 +0100
|
||||
@@ -159,4 +159,4 @@ longjmp:
|
||||
invala // virt. -> phys. regnum mapping may change
|
||||
mov pr=r24,-1
|
||||
br.ret.dptk.few rp
|
||||
- .endp __longjmp
|
||||
+ .endp longjmp
|
20
elilo-3.6-spelling.diff
Normal file
20
elilo-3.6-spelling.diff
Normal file
@ -0,0 +1,20 @@
|
||||
--- config.c
|
||||
+++ config.c
|
||||
@@ -580,7 +580,7 @@
|
||||
*/
|
||||
tok = get_token(numstr, MAX_STRING);
|
||||
if (tok != TOK_EQUAL) {
|
||||
- config_error(L"Option %s expects an equal signal + value", p->name);
|
||||
+ config_error(L"Option %s expects an equal sign + value", p->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@
|
||||
*/
|
||||
tok = get_token(str, maxlen);
|
||||
if (tok != TOK_EQUAL) {
|
||||
- config_error(L"Option %s expects an equal signal + %s", p->name, msg);
|
||||
+ config_error(L"Option %s expects an equal sign + %s", p->name, msg);
|
||||
return -1;
|
||||
}
|
||||
|
3
elilo-3.6.src.tgz
Normal file
3
elilo-3.6.src.tgz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:78e922f877c23a6c3d8b492fbef6eda60474d2245e1e7c658c9d701c228461e7
|
||||
size 168941
|
176
elilo.changes
Normal file
176
elilo.changes
Normal file
@ -0,0 +1,176 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 10 10:37:13 CET 2006 - schwab@suse.de
|
||||
|
||||
- Fix spelling.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 2 17:33:57 CET 2006 - rw@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Update to final 3.6
|
||||
(Fixed vmcode_name initialization in textmenu chooser)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:44:13 CET 2006 - mls@suse.de
|
||||
|
||||
- elilo.spec
|
||||
* Converted neededforbuild to BuildRequires.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 20 12:51:08 CET 2006 - schwab@suse.de
|
||||
|
||||
- elilo.spec
|
||||
* Don't strip binaries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 18:57:56 CET 2006 - rw@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Fix vmcode_name initialization in textmenu chooser. (#140519)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 9 16:37:17 CET 2005 - rw@suse.de
|
||||
|
||||
- /sbin/elilo
|
||||
* Fix formatting of man-page.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 7 16:31:04 CET 2005 - rw@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Update to 3.5-pre2.
|
||||
- /sbin/elilo
|
||||
* Make "best effort" instead of giving up early.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 13 16:03:14 CEST 2005 - schwab@suse.de
|
||||
|
||||
- /sbin/elilo
|
||||
* Check that the default label is defined.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 5 18:14:04 CEST 2005 - schwab@suse.de
|
||||
|
||||
- /sbin/elilo
|
||||
* Barf on duplicate labels.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 17:41:15 CEST 2005 - schwab@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Fix for new assembler.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 19 00:36:17 CET 2005 - schwab@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Clear extra memory in initrd block so that initramfs works.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 6 17:10:32 CEST 2004 - rw@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Fix simple-chooser (#45493)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 27 17:39:05 CEST 2004 - rw@suse.de
|
||||
|
||||
- /sbin/elilo
|
||||
* Make all image-objects (kernel/initrd) *optional* by default (#41315)
|
||||
|
||||
------------------------------------------------------------------
|
||||
Mon Feb 23 15:32:53 CET 2004 - rw@suse.de
|
||||
|
||||
- elilo.efi
|
||||
* Use '$RPM_OPT_FLAGS' with '-fno-strict-aliasing' appended.
|
||||
- /sbin/elilo
|
||||
* Take care of FPSWA.
|
||||
* Try to avoid copying the same files more than once.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 24 13:59:08 CET 2003 - rw@suse.de
|
||||
|
||||
- Provide '/sbin/elilo' to simplify separation of '/boot' and the
|
||||
EFI FAT-partition (bug #21644)
|
||||
- Move 'elilo.efi' to '/usr/lib/elilo'
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 1 17:45:41 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Update to final 3.4 to remove extraneous debug output.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 26 19:33:50 CEST 2003 - rw@suse.de
|
||||
|
||||
- Add patch from Greg Edwards (SGI) (#29340)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 22 12:02:33 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Update to elilo 3.4.
|
||||
* Improved netbooting.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 10 13:24:05 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Add fix for netbooting.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 8 17:34:48 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Add two fixes from author.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 17 11:17:23 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Update to elilo 3.3a.
|
||||
* More memory management bugs fixed.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 13 12:01:47 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Fix %post.
|
||||
- Fix eliloalt.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 11 20:24:52 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Fix buffer overrun.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 2 17:08:05 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Move elilo.conf to /boot/efi/SuSE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 27 17:11:26 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Update to elilo 3.3.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 16 17:30:11 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Move boot loader to /boot/efi/SuSE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 5 11:22:09 CET 2002 - schwab@suse.de
|
||||
|
||||
- Update to elilo 3.2.
|
||||
- Make elilo.conf and startup.nsh %ghost files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 18 20:41:52 CEST 2001 - schwab@suse.de
|
||||
|
||||
- Update to elilo 3.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 25 19:43:04 CEST 2001 - schwab@suse.de
|
||||
|
||||
- Add two patches from author.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 18 14:33:22 CEST 2001 - schwab@suse.de
|
||||
|
||||
- Split from gnu-efi packages.
|
||||
- New version 3.0.
|
||||
|
404
elilo.pl
Normal file
404
elilo.pl
Normal file
@ -0,0 +1,404 @@
|
||||
#!/usr/bin/perl -w
|
||||
# $Id: elilo.pl,v 0.12 2005/12/09 11:46:06 rw Exp $
|
||||
use strict;
|
||||
|
||||
my $C = $0; $C =~ s%^.*/%%;
|
||||
|
||||
my $dbg = (exists( $ENV{"ELILO_DEBUG"})) ? $ENV{"ELILO_DEBUG"} : "";
|
||||
my $Edition = q(@EDITION@);
|
||||
my $MPold = "$dbg/boot";
|
||||
my $MPnew = "$dbg/boot/efi";
|
||||
my $Dlib = "$dbg/usr/lib/elilo";
|
||||
my $Fconf = "elilo.conf";
|
||||
my $Sconf = "$dbg/etc/" . $Fconf;
|
||||
|
||||
my $Reserved = qr(^(efi-mountpoint|vendor-directory|elilo-origin))o;
|
||||
my %Sconf = ();
|
||||
|
||||
my $test = 0;
|
||||
my $verbose = 0;
|
||||
my $warn = 0;
|
||||
my $optional = 1;
|
||||
my $MP = ""; # Mount-Point for EFI/FAT partition
|
||||
my $VD = "SuSE"; # vendor-specific directory in $MP/efi
|
||||
my $D = ""; # will be $MP.$VD
|
||||
my %Labels = ();
|
||||
|
||||
my $Disclaimer = <<EoD;
|
||||
# This file has been transformed by /sbin/elilo.
|
||||
# Please do NOT edit here -- edit /etc/elilo.conf instead!
|
||||
# Otherwise your changes will be lost e.g. during kernel-update.
|
||||
#
|
||||
EoD
|
||||
|
||||
$| = 1;
|
||||
$[ = 0;
|
||||
|
||||
sub Version() {
|
||||
my $v = q($Revision: 0.12 $ );
|
||||
$v =~ s/^\$ Rev.*:\ ([0-9.]+)\ \$\ /$1/x;
|
||||
$v .= " (part of elilo-$Edition)" if ( $Edition ne "\@EDITION\@" );
|
||||
print "$C version $v\n";
|
||||
exit( 0 );
|
||||
}
|
||||
sub Info ($$) {
|
||||
print STDERR $_[1] if ( $verbose >= $_[0] );
|
||||
}
|
||||
sub Warn ($) {
|
||||
print STDERR "$C: Warning: $_[0]";
|
||||
$warn ++;
|
||||
}
|
||||
sub Panic ($$) {
|
||||
print STDERR "$C: $_[1]";
|
||||
exit( $_[0]) if ( $_[0] );
|
||||
$warn ++;
|
||||
print STDERR "...trying to proceed anyway!\n";
|
||||
}
|
||||
sub Parse ($) {
|
||||
my( $f) = @_;
|
||||
my %r = ();
|
||||
|
||||
open( IN, "< $f") || return( %r );
|
||||
# fixme: add failure-detection
|
||||
while ( <IN> ) {
|
||||
chomp;
|
||||
next unless ( m/$Reserved\s*\=\s*(.+)?\s*$/xo );
|
||||
$r{$1} = $2;
|
||||
}
|
||||
close( IN);
|
||||
return( %r );
|
||||
}
|
||||
sub Transfer ($$) {
|
||||
my( $in, $dir) = @_;
|
||||
my( $out, $tmp, $c, @f, %f, $opt);
|
||||
my $default_label = "";
|
||||
my $default_loc;
|
||||
my @Out = ();
|
||||
$out = "$dir/$Fconf";
|
||||
$tmp = "$out.tmp";
|
||||
$opt = $optional;
|
||||
|
||||
open( IN, "< $in") || Panic(1, "$in: failed to open: $!\n");
|
||||
Info( 1, "## filter '$in' to");
|
||||
if ( ! $test ) {
|
||||
Info( 1, " '$tmp'\n");
|
||||
open(OUT, "> $tmp") || Panic( 1, "$tmp: failed to create: $!\n");
|
||||
push @Out, $Disclaimer;
|
||||
} elsif ( $verbose >= 2 ) {
|
||||
Info( 1, " STDOUT\n");
|
||||
open( OUT, ">&STDOUT");
|
||||
push @Out, $Disclaimer unless ( $verbose < 3 );
|
||||
} else {
|
||||
Info( 1, " /dev/null\n");
|
||||
open( OUT, ">/dev/null");
|
||||
}
|
||||
while ( <IN> ) {
|
||||
next if ( m/$Reserved/xo );
|
||||
if ( m%^\s*(?:image|initrd)\s*=\s*% ) {
|
||||
chomp;
|
||||
s%^(\s*(?:image|initrd)\s*=\s*)(/\S+/)?([^/\s]+)\s*$%$1$3%;
|
||||
my( $t, $p, $f) = ($1, $2, $3);
|
||||
$_ .= "\n";
|
||||
if ( ! defined( $p) ) {
|
||||
$p = "/boot/";
|
||||
}
|
||||
if ( ! defined( $f) ) {
|
||||
Warn( "$in: $.: invalid file-specification\n" .
|
||||
">> $_");
|
||||
$c++;
|
||||
} elsif ( exists( $f{$f}) ) {
|
||||
Info( 3, "$in: $.: file duplication skipped (previous: $f{$f})\n" .
|
||||
">> $_");
|
||||
} elsif ( $opt && ! -r "$dbg$p$f" ) {
|
||||
Info( 0, "$C: $in: $.: missing optional '$p$f' skipped\n");
|
||||
} else {
|
||||
push @f, $dbg . "$p$f";
|
||||
$f{$f} = $.;
|
||||
}
|
||||
} elsif (m%^(\s*label\s*=\s*)(\S+)%) {
|
||||
my ($pre, $label) = ($1, $2);
|
||||
if (exists $Labels{$label}) {
|
||||
my $t = 1;
|
||||
my $l = $label;
|
||||
while ( exists $Labels{$l} ) {
|
||||
$l = sprintf "%s.%d", $label, $t++;
|
||||
}
|
||||
Warn( "duplicate label '$label', replaced with '$l'\n");
|
||||
$label = $l;
|
||||
$_ = $pre . $l . "\n";
|
||||
}
|
||||
$Labels{$label} = 1;
|
||||
} elsif (m%^\s*default\s*=\s*(\S+)%) {
|
||||
$default_label = $1;
|
||||
$default_loc = $#Out + 1;
|
||||
}
|
||||
push @Out, $_;
|
||||
}
|
||||
if ($default_label ne "" && !exists $Labels{$default_label}) {
|
||||
$Out[$default_loc] = "#" . $Out[$default_loc];
|
||||
Warn( "undefined default label '$default_label' discarded\n");
|
||||
}
|
||||
|
||||
print OUT @Out;
|
||||
close( OUT);
|
||||
close( IN);
|
||||
Info( 2, "## end of $in\n") unless $test;
|
||||
foreach ( @f ) {
|
||||
if ( ! -r $_ ) {
|
||||
Warn( "$_: not found\n");
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
if ( $c ) {
|
||||
Info( 2, "> unlink( $tmp)\n");
|
||||
unlink( $tmp);
|
||||
Panic( 2, "$in: broken references\n");
|
||||
}
|
||||
if ( ! $test ) {
|
||||
Info( 1, "> unlink( $out)\n");
|
||||
unlink( $out);
|
||||
Info( 1, "> rename( $tmp, $out)\n");
|
||||
rename( $tmp, $out);
|
||||
# fixme: add failure-detection
|
||||
}
|
||||
return( @f );
|
||||
}
|
||||
|
||||
sub System($@) {
|
||||
my( $fatal, @C) = @_;
|
||||
my $cmd = $C[0];
|
||||
my $rc = ($fatal) ? 1 : 0;
|
||||
|
||||
foreach my $c ( @C[1..$#C] ) {
|
||||
if ( $c =~ /\s/ ) {
|
||||
$cmd .= " '$c'";
|
||||
} else {
|
||||
$cmd .= " $c";
|
||||
}
|
||||
}
|
||||
Info( 1, "> $cmd\n");
|
||||
return 0 if ( $test );
|
||||
|
||||
system @C;
|
||||
if ($? == -1) {
|
||||
Panic( $rc, "$C[0]: failed to execute: $!\n");
|
||||
} elsif ($? & 127) {
|
||||
Panic( $rc, sprintf( "$C[0]: died with signal %d, %s coredump\n",
|
||||
($? & 127), ($? & 128) ? 'with' : 'without'));
|
||||
} elsif ( $? >> 8 != 0 ) {
|
||||
Panic( $rc, "$C[0]: failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub Install($$$$) {
|
||||
my( $f, $o, $s, $d) = @_;
|
||||
my @C = ( "install", $o, $s, $d);
|
||||
|
||||
System( $f, @C);
|
||||
}
|
||||
|
||||
sub InstallFPSWA($) {
|
||||
my ( $d) = @_;
|
||||
$d .= "/efi/Intel Firmware";
|
||||
return 0 unless ( -r "$Dlib/fpswa.efi" );
|
||||
|
||||
my $head = "## fpswa: Floating Point Software Assist\n";
|
||||
if ( -d $d && -r "$d/fpswa.efi" ) {
|
||||
# check, if we need to update and failing that do nothing?!
|
||||
my $c = "$Dlib/fpswa-cmp-version";
|
||||
if ( -x $c ) {
|
||||
my $chk = `$c "$d/fpswa.efi" "$Dlib/fpswa.efi"`;
|
||||
if ( $chk =~ /older/ ) {
|
||||
Info( 1, $head .
|
||||
"## Update '$d/fpswa.efi'.\n");
|
||||
Info( 2,
|
||||
"## $chk");
|
||||
Install( 0, "-p", "$Dlib/fpswa.efi", $d);
|
||||
} else {
|
||||
Info( 1, $head .
|
||||
"## Do NOT update '$d/fpswa.efi'.\n");
|
||||
Info( 2,
|
||||
"## $chk");
|
||||
}
|
||||
} else {
|
||||
use File::Compare;
|
||||
if ( compare( "$d/fpswa.efi", "$Dlib/fpswa.efi") == 0 ) {
|
||||
Info( 2, $head .
|
||||
"## Already installed.\n");
|
||||
} else {
|
||||
Info( 1, $head .
|
||||
"## Unable to compare versions.\n" .
|
||||
"## Installation skipped!\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Info( 1, $head . "## Install 'fpswa.efi' to '$d'.\n");
|
||||
System( 0, "mkdir", $d) unless ( -d $d );
|
||||
Install( 0, "-p", "$Dlib/fpswa.efi", $d);
|
||||
}
|
||||
}
|
||||
|
||||
sub isMP($) {
|
||||
my ( $d) = @_;
|
||||
Info( 3, "### isMP($d):\n");
|
||||
foreach my $f ( ("/proc/mounts", "/etc/mtab") ) {
|
||||
Info( 4, "#### looking in $f\n");
|
||||
open( IN, "< $f") || next;
|
||||
while ( <IN> ) {
|
||||
chomp;
|
||||
my @F = split;
|
||||
if ( $F[1] eq $d ) {
|
||||
Info( 3, "### found in '$f' line $. => true\n");
|
||||
close( IN);
|
||||
return( 1);
|
||||
}
|
||||
}
|
||||
close( IN);
|
||||
Info( 3, "### not found in $f => false\n");
|
||||
return( 0);
|
||||
}
|
||||
Info( 3, "### no info available => false\n");
|
||||
return( 0);
|
||||
}
|
||||
|
||||
{
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
$Getopt::Long::debug = 0;
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
$Getopt::Long::bundling = 1;
|
||||
$Getopt::Long::passthrough = 0;
|
||||
my %Opt = ();
|
||||
|
||||
pod2usage(2) unless ( GetOptions( \%Opt,
|
||||
'help|h', 'man|m', 'version|V', 'verbose|v+',
|
||||
'test|t', 'purge') && ! $Opt{'help'} );
|
||||
|
||||
Version() if ( $Opt{'version'} );
|
||||
pod2usage(-exitstatus => 0, -verbose => 2) if ( $Opt{'man'} );
|
||||
pod2usage(1) if ( $Opt{'help'} );
|
||||
$test = 1 if ( $Opt{'test'} );
|
||||
$verbose += $Opt{'verbose'} if ( $Opt{'verbose'} );
|
||||
}
|
||||
|
||||
# try to read variables $Sconf
|
||||
%Sconf = Parse( $Sconf);
|
||||
|
||||
# check environment
|
||||
if ( exists( $Sconf{"efi-mountpoint"}) ) {
|
||||
$MP = $dbg . $Sconf{"efi-mountpoint"};
|
||||
Panic( 1, "EFI partions specification in $Sconf invalid.\n")
|
||||
unless ( -d $MP ); # or is it "$MP/efi"?
|
||||
} elsif ( -d $MPnew . "/efi/" . $VD || isMP($MPnew) ) {
|
||||
$MP = $MPnew;
|
||||
} elsif ( -d $MPold . "/efi/" . $VD ) {
|
||||
$MP = $MPold;
|
||||
} else {
|
||||
Info( 1, "## Neither new ($MPnew/efi/$VD) nor old ($MPold/efi/$VD)?\n");
|
||||
Panic( 2, "EFI partiton not found.\n");
|
||||
}
|
||||
Info( 2, "## Mount-point '$MP'...\n");
|
||||
if ( exists( $Sconf{"vendor-directory"}) ) {
|
||||
$VD = $Sconf{"vendor-directory"};
|
||||
Info( 1, "## Don't forget: '$VD != SuSE'--NVRAM (efibootmgr) issue!\n")
|
||||
unless ( $VD eq "SuSE" );
|
||||
}
|
||||
$D = $MP . "/efi/" . $VD;
|
||||
Info( 1, "## Using '$D'...\n");
|
||||
System( 1, "mkdir", "-p", $D) unless ( -d $D );
|
||||
|
||||
if ( -r $Sconf ) {
|
||||
# extract kernels and initrds and write fixed .conf
|
||||
my @F = Transfer( $Sconf, $D);
|
||||
# copy stuff
|
||||
unshift @F, "$Dlib/elilo.efi";
|
||||
foreach ( @F ) {
|
||||
Install( 0, "-p", $_, $D);
|
||||
}
|
||||
# take care of FPSWA
|
||||
InstallFPSWA( $MP);
|
||||
} elsif ( $MP eq $MPold && -r "$D/$Fconf" ) {
|
||||
# assume old setup with only '/vmlinuz' and '/initrd'
|
||||
Install( 1, "-p", "$Dlib/elilo.efi", $D);
|
||||
InstallFPSWA( $MP);
|
||||
} elsif ( $MP eq $MPold ) {
|
||||
Panic( 2, "$D/$Fconf: not found\n");
|
||||
} else {
|
||||
Panic( 2, "$Sconf: not found\n");
|
||||
}
|
||||
|
||||
if ( $warn > 0 ) {
|
||||
Panic( 1, sprintf("%d warning%s encountered.\n", $warn, ($warn==1)?"":"s"));
|
||||
}
|
||||
exit( 0);
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
elilo - Installer for the EFI Linux Loader
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
/sbin/elilo [options]
|
||||
|
||||
Options:
|
||||
-t --test test only
|
||||
-v --verbose increase verbosity
|
||||
-h --help brief help message
|
||||
--man full documentation
|
||||
-V --version display version
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--test>
|
||||
|
||||
Test only. Do not really write anything, no new boot configuration nor
|
||||
kernel/initrd images.
|
||||
Use together with B<-v> to find out what B<elilo> is about to do.
|
||||
|
||||
=item B<--verbose>
|
||||
|
||||
Increase level of verbosity.
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Print a brief help message and exits.
|
||||
|
||||
=item B<--man>
|
||||
|
||||
Prints the manual page and exits.
|
||||
|
||||
=item B<--version>
|
||||
|
||||
Prints the version information and exits.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This program will perform all steps to transfer the
|
||||
necessary parts to the appropriate locations...
|
||||
|
||||
|
||||
|
||||
=head1 LIMITATIONS
|
||||
|
||||
For now, I<all> image-entries are treated as "optional" in
|
||||
order to more closely match the behavior of the real
|
||||
loader (i.e. C<elilo.efi>), which silently ignores missing files
|
||||
while reading the configuration.
|
||||
|
||||
This may be considered a bug by experienced B<LILO> users,
|
||||
where only those specifically marked as such are treated that way.
|
||||
|
||||
It is planned to introduce keywords like C<mandatory> and C<optional>
|
||||
in future releases though.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
/usr/share/doc/packages/elilo
|
||||
|
||||
=cut
|
165
elilo.spec
Normal file
165
elilo.spec
Normal file
@ -0,0 +1,165 @@
|
||||
#
|
||||
# spec file for package elilo (Version 3.6)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: elilo
|
||||
URL: http://elilo.sourceforge.net/
|
||||
Summary: EFI Linux Loader
|
||||
Version: 3.6
|
||||
Release: 31
|
||||
Group: System/Boot
|
||||
Autoreqprov: on
|
||||
PreReq: /usr/bin/perl
|
||||
License: GNU General Public License (GPL) - all versions
|
||||
Source: http://mesh.dl.sourceforge.net/sourceforge/elilo/elilo-3.6.src.tgz
|
||||
Source1: elilo.pl
|
||||
Patch0: elilo-%{version}-asm.diff
|
||||
Patch1: elilo-%{version}-MAC.diff
|
||||
Patch2: elilo-%{version}-spelling.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: gnu-efi
|
||||
|
||||
%description
|
||||
The EFI Linux boot loader.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Johannes Erdfelt <jerdfelt@valinux.com>
|
||||
David Mosberger <davidm@hpl.hp.com>
|
||||
Stephane Eranian <eranian@hpl.hp.com>
|
||||
Brett Johnson <brett@hp.com>
|
||||
|
||||
%prep
|
||||
%setup -q -n elilo
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
perl -pe 's/\@EDITION\@/%{version}-%{release}/' < %{SOURCE1} > elilo.pl &&
|
||||
chmod 555 elilo.pl && touch -r %{SOURCE1} elilo.pl
|
||||
! fgrep '%%{version}-%%{release}' elilo.pl
|
||||
|
||||
%build
|
||||
make OPTIMFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
pod2man -s 8 -c "System Boot" -r "SuSE Linux" \
|
||||
-n elilo -d "%{version}-%{release}" elilo.pl elilo.8
|
||||
touch -r elilo.pl elilo.8
|
||||
|
||||
%install
|
||||
install -d $RPM_BUILD_ROOT/usr/lib/elilo $RPM_BUILD_ROOT/sbin
|
||||
install -s -m 444 elilo.efi $RPM_BUILD_ROOT/usr/lib/elilo
|
||||
install tools/eliloalt $RPM_BUILD_ROOT/sbin
|
||||
install -p -m 555 elilo.pl $RPM_BUILD_ROOT/sbin/elilo
|
||||
#install -D -p elilo.8 $RPM_BUILD_ROOT/usr/share/man/man8/elilo.8
|
||||
|
||||
%clean
|
||||
rm -fr $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
#/sbin/elilo -v || :
|
||||
echo "Please run /sbin/elilo!"
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc README README.* TODO docs/*.txt
|
||||
/usr/lib/elilo
|
||||
/sbin/elilo
|
||||
/sbin/eliloalt
|
||||
#/usr/share/man/man8/*
|
||||
|
||||
%changelog -n elilo
|
||||
* Fri Nov 10 2006 - schwab@suse.de
|
||||
- Fix spelling.
|
||||
* Thu Feb 02 2006 - rw@suse.de
|
||||
- elilo.efi
|
||||
* Update to final 3.6
|
||||
(Fixed vmcode_name initialization in textmenu chooser)
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- elilo.spec
|
||||
* Converted neededforbuild to BuildRequires.
|
||||
* Fri Jan 20 2006 - schwab@suse.de
|
||||
- elilo.spec
|
||||
* Don't strip binaries.
|
||||
* Mon Jan 09 2006 - rw@suse.de
|
||||
- elilo.efi
|
||||
* Fix vmcode_name initialization in textmenu chooser. (#140519)
|
||||
* Fri Dec 09 2005 - rw@suse.de
|
||||
- /sbin/elilo
|
||||
* Fix formatting of man-page.
|
||||
* Wed Dec 07 2005 - rw@suse.de
|
||||
- elilo.efi
|
||||
* Update to 3.5-pre2.
|
||||
- /sbin/elilo
|
||||
* Make "best effort" instead of giving up early.
|
||||
* Sat Aug 13 2005 - schwab@suse.de
|
||||
- /sbin/elilo
|
||||
* Check that the default label is defined.
|
||||
* Fri Aug 05 2005 - schwab@suse.de
|
||||
- /sbin/elilo
|
||||
* Barf on duplicate labels.
|
||||
* Wed Apr 13 2005 - schwab@suse.de
|
||||
- elilo.efi
|
||||
* Fix for new assembler.
|
||||
* Sat Feb 19 2005 - schwab@suse.de
|
||||
- elilo.efi
|
||||
* Clear extra memory in initrd block so that initramfs works.
|
||||
* Wed Oct 06 2004 - rw@suse.de
|
||||
- elilo.efi
|
||||
* Fix simple-chooser (#45493)
|
||||
* Thu May 27 2004 - rw@suse.de
|
||||
- /sbin/elilo
|
||||
* Make all image-objects (kernel/initrd) *optional* by default (#41315)
|
||||
* Mon Feb 23 2004 - rw@suse.de
|
||||
- elilo.efi
|
||||
* Use '$RPM_OPT_FLAGS' with '-fno-strict-aliasing' appended.
|
||||
- /sbin/elilo
|
||||
* Take care of FPSWA.
|
||||
* Try to avoid copying the same files more than once.
|
||||
* Mon Nov 24 2003 - rw@suse.de
|
||||
- Provide '/sbin/elilo' to simplify separation of '/boot' and the
|
||||
EFI FAT-partition (bug #21644)
|
||||
- Move 'elilo.efi' to '/usr/lib/elilo'
|
||||
* Mon Sep 01 2003 - schwab@suse.de
|
||||
- Update to final 3.4 to remove extraneous debug output.
|
||||
* Tue Aug 26 2003 - rw@suse.de
|
||||
- Add patch from Greg Edwards (SGI) (#29340)
|
||||
* Fri Aug 22 2003 - schwab@suse.de
|
||||
- Update to elilo 3.4.
|
||||
* Improved netbooting.
|
||||
* Tue Jun 10 2003 - schwab@suse.de
|
||||
- Add fix for netbooting.
|
||||
* Tue Apr 08 2003 - schwab@suse.de
|
||||
- Add two fixes from author.
|
||||
* Thu Oct 17 2002 - schwab@suse.de
|
||||
- Update to elilo 3.3a.
|
||||
* More memory management bugs fixed.
|
||||
* Fri Sep 13 2002 - schwab@suse.de
|
||||
- Fix %%post.
|
||||
- Fix eliloalt.
|
||||
* Wed Sep 11 2002 - schwab@suse.de
|
||||
- Fix buffer overrun.
|
||||
* Mon Sep 02 2002 - schwab@suse.de
|
||||
- Move elilo.conf to /boot/efi/SuSE.
|
||||
* Tue Aug 27 2002 - schwab@suse.de
|
||||
- Update to elilo 3.3.
|
||||
* Thu May 16 2002 - schwab@suse.de
|
||||
- Move boot loader to /boot/efi/SuSE.
|
||||
* Tue Mar 05 2002 - schwab@suse.de
|
||||
- Update to elilo 3.2.
|
||||
- Make elilo.conf and startup.nsh %%ghost files.
|
||||
* Sat Aug 18 2001 - schwab@suse.de
|
||||
- Update to elilo 3.1.
|
||||
* Wed Jul 25 2001 - schwab@suse.de
|
||||
- Add two patches from author.
|
||||
* Wed Jul 18 2001 - schwab@suse.de
|
||||
- Split from gnu-efi packages.
|
||||
- New version 3.0.
|
Loading…
Reference in New Issue
Block a user