From 65b809e36d811591b9f7a9b0e34c287ade61b931 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 19 Sep 2001 18:58:11 +0000 Subject: add isolinux stuff generation --- .cvsignore | 1 + Makefile | 8 +++++++- make_boot_img | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index f6f0748da..9eb313d3a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -5,3 +5,4 @@ unused all.modules all.kernels drakxtools.tar.bz2 +isolinux diff --git a/Makefile b/Makefile index 441609f09..a1768b5dc 100644 --- a/Makefile +++ b/Makefile @@ -53,10 +53,15 @@ endif fi cd $(ROOTDEST)/images; md5sum *.img* > MD5SUM +ifeq (i386,$(ARCH)) + rm -rf $(ROOTDEST)/isolinux + cp -af isolinux $(ROOTDEST) +endif + install live_update $(ROOTDEST)/live_update make -C perl-install full_stage2 -build: $(FBOOT_IMG) +build: $(FBOOT_RDZ) $(FBOOT_IMG) dirs: @for n in . $(DIRS); do \ @@ -127,6 +132,7 @@ upload: upload images MD5SUM ;\ upload images *.img* ;\ upload images/alternatives '' ;\ + upload isolinux '' ;\ echo upload_sparc: 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 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); } -- cgit v1.2.1