diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-09-19 18:58:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-09-19 18:58:11 +0000 |
commit | 65b809e36d811591b9f7a9b0e34c287ade61b931 (patch) | |
tree | b1cbb20ca0995d3391d6de42a0d8492fab94dd55 /make_boot_img | |
parent | bda2b02c424243c7108382a170dc3b7eb5d3ce25 (diff) | |
download | drakx-backup-do-not-use-65b809e36d811591b9f7a9b0e34c287ade61b931.tar drakx-backup-do-not-use-65b809e36d811591b9f7a9b0e34c287ade61b931.tar.gz drakx-backup-do-not-use-65b809e36d811591b9f7a9b0e34c287ade61b931.tar.bz2 drakx-backup-do-not-use-65b809e36d811591b9f7a9b0e34c287ade61b931.tar.xz drakx-backup-do-not-use-65b809e36d811591b9f7a9b0e34c287ade61b931.zip |
add isolinux stuff generation
Diffstat (limited to 'make_boot_img')
-rwxr-xr-x | make_boot_img | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/make_boot_img b/make_boot_img index b033a44e1..1901a7422 100755 --- a/make_boot_img +++ b/make_boot_img @@ -3,6 +3,7 @@ @ARGV >= 2 or die "usage: $0 <image> all|other|cdrom|hd|network|usbnet|blank|pcmcia|live|tftp|tftprd\n"; use Config; +use MDK::Common; Config->import; my ($arch) = $Config{archname} =~ /(.*)-/; my $corporate = $ENV{CORPORATE} && " corporate"; #- use this for building a corporate version. @@ -62,6 +63,9 @@ foreach (@kernels) { rename("$img-$main", "$img"); } } +if ($arch =~ /i.86/ && $img =~ /all/) { + isolinux($main, @kernels); +} sub install_stripped { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" } @@ -464,9 +468,47 @@ cd /tools/ppc } -sub output { - my $f = shift; - local *F; - open F, "> $f" or die "error writing to $f"; - print F join '', @_; +sub isolinux { + my ($main, @kernels) = @_; + @kernels = ($main, grep { $_ ne $main } @kernels); + my $debug = 1 ? '-debug' : ''; + _ "rm -rf isolinux"; mkdir "isolinux", 0777; + my $i = 0; + foreach (@kernels) { + mkdir "isolinux/alt$i", 0777; + my ($kernel) = glob("all.kernels/$_/boot/vmlinu*"); + _ "cp $kernel isolinux/alt$i/vmlinuz"; + _ "cp images/all.rdz-$_ isolinux/alt$i/all.rdz"; + $i++; + } + _ "cp /usr/lib/isolinux$debug.bin isolinux/isolinux.bin"; + output "isolinux/isolinux.cfg", " +default linux +display help.msg +label linux + kernel alt0/vmlinuz + append ramdisk_size=32000 initrd=alt0/all.rdz root=/dev/ram3 vga=788 +label vgalo + kernel alt0/vmlinuz + append ramdisk_size=32000 initrd=alt0/all.rdz root=/dev/ram3 vga=785 +label vgahi + kernel alt0/vmlinuz + append ramdisk_size=32000 initrd=alt0/all.rdz root=/dev/ram3 vga=791 +label vga16 + kernel alt0/vmlinuz + append ramdisk_size=32000 initrd=alt0/all.rdz root=/dev/ram3 vga16 +label text + kernel alt0/vmlinuz + append ramdisk_size=32000 initrd=alt0/all.rdz root=/dev/ram3 text +" . join('', map_index { +"label alt$::i + kernel alt$::i/vmlinuz + append ramdisk_size=32000 initrd=alt$::i/all.rdz root=/dev/ram3 vga=788 +" } @kernels); + + output "isolinux/help.msg", +"This is a special bootable CDROM giving you a choice between various kernels. + +The default is kernel $main. +" . join('', map_index { $::i ? "\"alt$::i\" is kernel $_\n" : '' } @kernels); } |