Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a1936600f2
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (12 sloc) 0.578 kb
#!/usr/bin/perl -W
use strict;
use Cwd;
my $dir = getcwd;
my $usage = " <kernel> <ramdisk-directory> <outfile>\n";
die $usage unless $ARGV[0] && $ARGV[1] && $ARGV[2];
chdir $ARGV[1] or die "$ARGV[1] $!";
system ("find . | cpio -o -H newc | gzip > $dir/ramdisk-repack.cpio.gz");
chdir $dir or die "$ARGV[1] $!";;
system ("mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel $ARGV[0] --ramdisk ramdisk-repack.cpio.gz -o $ARGV[2]");
unlink("ramdisk-repack.cpio.gz") or die $!;
print "\nrepacked boot image written at $ARGV[1]-repack.img\n";
Jump to Line
Something went wrong with that request. Please try again.