diff options
Diffstat (limited to 'make_boot_img')
-rwxr-xr-x | make_boot_img | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/make_boot_img b/make_boot_img index aa1bf0edb..45eb6fbe7 100755 --- a/make_boot_img +++ b/make_boot_img @@ -30,20 +30,23 @@ $0 =~ /initrd/ ? sub __ { print @_, "\n"; system(@_); } sub _ { __ @_; $? and die; } +sub install_s { _ "strip $_[0]"; _ "$sudo install $_[0] $_[1]" } sub initrd { my ($mnt, $img) = @_; my $tmp = "$ENV{HOME}/tmp/initrd"; - my $inst1 = -d "$instdir/install1_$type" ? "install1_$type" : "install1"; - - _ "install -s $instdir/installinit/init $instdir/$inst1/sbin/init"; - _ "install -s $instdir/$install $instdir/$inst1/sbin/install"; + my $tar = "$instdir/install1_$type.tar.bz2"; + -e $tar or $tar = "$instdir/install1.tar.bz2"; __ "$sudo umount $tmp $mnt 2>/dev/null"; _ "dd if=/dev/zero of=$tmp bs=1k count=2000"; _ "$mke2fs $tmp"; _ "$sudo mount -t ext2 $tmp $mnt -o loop"; - _ "$sudo cp -a $instdir/$inst1/* $mnt"; + + _ "$sudo tar xyC $mnt -f $tar"; + install_s("$instdir/installinit/init", "$mnt/sbin"); + install_s("$instdir/$install", "$mnt/sbin/install"); + _ "$sudo cp -f install_${type}_modules/* $mnt/modules/" if -d "install_${type}_modules"; _ "$sudo cp -f modules/${type}_modules.cgz $mnt/modules/modules.cgz"; _ "$sudo cp -f modules/modules.dep $mnt/modules/"; |