summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-19 18:58:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-19 18:58:11 +0000
commit65b809e36d811591b9f7a9b0e34c287ade61b931 (patch)
treeb1cbb20ca0995d3391d6de42a0d8492fab94dd55
parentbda2b02c424243c7108382a170dc3b7eb5d3ce25 (diff)
downloaddrakx-65b809e36d811591b9f7a9b0e34c287ade61b931.tar
drakx-65b809e36d811591b9f7a9b0e34c287ade61b931.tar.gz
drakx-65b809e36d811591b9f7a9b0e34c287ade61b931.tar.bz2
drakx-65b809e36d811591b9f7a9b0e34c287ade61b931.tar.xz
drakx-65b809e36d811591b9f7a9b0e34c287ade61b931.zip
add isolinux stuff generation
-rw-r--r--.cvsignore1
-rw-r--r--Makefile8
-rwxr-xr-xmake_boot_img52
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 <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);
}