summaryrefslogtreecommitdiffstats
path: root/make_boot_img
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-22 13:37:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-22 13:37:10 +0000
commit800d9f9cd26796b153e187652750f6918d53665e (patch)
treee4bc67ae17ab157ca95151eb7669126f7b677a3b /make_boot_img
parent180b6575f94e7357982a1e717fb6a42ed0deb647 (diff)
downloaddrakx-800d9f9cd26796b153e187652750f6918d53665e.tar
drakx-800d9f9cd26796b153e187652750f6918d53665e.tar.gz
drakx-800d9f9cd26796b153e187652750f6918d53665e.tar.bz2
drakx-800d9f9cd26796b153e187652750f6918d53665e.tar.xz
drakx-800d9f9cd26796b153e187652750f6918d53665e.zip
build boot.iso
Diffstat (limited to 'make_boot_img')
-rwxr-xr-xmake_boot_img24
1 files changed, 22 insertions, 2 deletions
diff --git a/make_boot_img b/make_boot_img
index bd2bbca9a..861e75dcc 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -37,8 +37,8 @@ my @kernels = grep { /^2/ } all('kernel/all.kernels');
my @all_images = (
- if_($arch =~ /i.86/, 'cdrom.img', 'cdrom-changedisk.img', 'pcmcia.img', 'isolinux', 'hd_grub.img'),
- if_($arch =~ /x86_64/, 'cdrom.img', 'isolinux'),
+ if_($arch =~ /i.86/, 'cdrom.img', 'cdrom-changedisk.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'hd_grub.img'),
+ if_($arch =~ /x86_64/, 'cdrom.img', 'isolinux', 'boot.iso'),
if_($arch =~ /ia64/, 'all.img'),
);
@@ -55,6 +55,8 @@ foreach my $img (@images) {
if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {
system("/bin/cp -f isolinux/alt0/* $tftpboot 2>/dev/null");
}
+ } elsif ($img =~ /boot.iso/) {
+ boot_iso($img);
} elsif ($extension eq 'rdz') {
initrd($tmp_mnt_initrd, $type, $I, "$img-$_") foreach @kernels;
} elsif ($extension eq 'img') {
@@ -749,3 +751,21 @@ EOF
close $G;
unlink $mapfile;
}
+
+sub boot_iso {
+ my ($iso) = @_;
+
+ my $cfg = cat_('isolinux/isolinux.cfg') or die 'isolinux missing';
+ $cfg =~ s/automatic=method:\w+,?//gm;
+
+ eval { rm_rf('.boot_iso') };
+ mkdir_p('.boot_iso/isolinux');
+ _ "cd .boot_iso/isolinux ; ln -s ../../isolinux/* .";
+
+ my $cfg_file = '.boot_iso/isolinux/isolinux.cfg';
+ unlink $cfg_file;
+ output($cfg_file, $cfg);
+
+ _ "mkisofs -r -f -J -cache-inodes -V 'Mdk Boot ISO' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $iso .boot_iso";
+ rm_rf('.boot_iso');
+}