diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2004-01-22 15:12:23 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2004-01-22 15:12:23 +0000 |
commit | 35958ed805a8aa590fff4cae23bffc7036c9a826 (patch) | |
tree | a773a9734e3c45f6db32caf0065085b0633ce2ea | |
parent | 48130561b573e9f4923ad66a370ed562afed7dd7 (diff) | |
download | drakx-35958ed805a8aa590fff4cae23bffc7036c9a826.tar drakx-35958ed805a8aa590fff4cae23bffc7036c9a826.tar.gz drakx-35958ed805a8aa590fff4cae23bffc7036c9a826.tar.bz2 drakx-35958ed805a8aa590fff4cae23bffc7036c9a826.tar.xz drakx-35958ed805a8aa590fff4cae23bffc7036c9a826.zip |
revive network.img and allow a drivers second floppy to be used with
-rwxr-xr-x | make_boot_img | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/make_boot_img b/make_boot_img index 6080149d4..bc32e60ba 100755 --- a/make_boot_img +++ b/make_boot_img @@ -37,7 +37,7 @@ my @kernels = grep { /^2/ } all('kernel/all.kernels'); my @all_images = ( - if_($arch =~ /i.86/, 'cdrom.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'hd_grub.img'), + if_($arch =~ /i.86/, 'cdrom.img', 'pcmcia.img', 'isolinux', 'boot.iso', 'hd_grub.img', 'network.img', 'network_drivers.img'), if_($arch =~ /x86_64/, 'cdrom.img', 'isolinux', 'boot.iso'), if_($arch =~ /ia64/, 'all.img'), ); @@ -57,6 +57,9 @@ foreach my $img (@images) { } } elsif ($img =~ /boot.iso/) { boot_iso($img); + } elsif ($img =~ /drivers/) { + drivers($type, $I, "$img-$_") foreach @kernels; + rename("$img-$main", $img); } elsif ($extension eq 'rdz') { initrd($tmp_mnt_initrd, $type, $I, "$img-$_") foreach @kernels; } elsif ($extension eq 'img') { @@ -768,3 +771,21 @@ sub boot_iso { _ "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'); } + +sub drivers { + my ($type, $I, $img) = @_; + + my $tmp = "$ENV{HOME}/tmp/initrd"; + + _ "dd if=/dev/zero of=$img bs=1k count=1440"; + _ "$mke2fs $img"; + _ "$sudo mount -t ext2 $img $tmp_mnt -o loop"; + + my ($ext) = $img =~ /img-(.*)/ or die "bad image name ($img)"; + _ "$sudo cp -f kernel/all.modules$I/$ext/${type}_modules.mar $tmp_mnt/modules$I.mar"; + + _ "sync"; + _ "df $tmp_mnt"; + + _ "$sudo umount $tmp_mnt"; +} |