I think split_bootimg.pl splits the image per the spec in bootimg.h, but it looks like there for some reason is an extra empty page (2048 bytes) after the header page in the superboot image. Modifying the script as below will make it extract a valid ramdisk image.
So, had a little time today to try some more and it seems like there IS something wrong with the split_bootimg.pl script after all. If I use unpack-bootimg.pl instead, I do get proper ramdisk extracted from the boot.superboot.img... (and hopefully kernel image as well, although it's called *-kernel.gz, but doesn't seem to be a gzip file)
The kernel is in zImage format (which contains an unpacker and a gzipped kernel).
The reason unpack-bootimg.pl works is that it does not follow the spec, it just looks for some magic bytes and splits the file there. This is unreliable, but will in most cases extract the ramdisk properly, even if the file does not follow the bootimg.h structure.
--- split_bootimg.pl 2008-12-03 21:59:25.000000000 +0100 +++ split_bootimg_modified.pl 2010-08-01 12:21:53.000000000 +0200 @@ -72,7 +72,7 @@ my $m = int(($RAMDISK_SIZE + $PAGE_SIZE - 1) / $PAGE_SIZE); my $o = int(($SECOND_SIZE + $PAGE_SIZE - 1) / $PAGE_SIZE); -my $k_offset = $PAGE_SIZE; +my $k_offset = 2*$PAGE_SIZE; my $r_offset = $k_offset + ($n * $PAGE_SIZE); my $s_offset = $r_offset + ($m * $PAGE_SIZE);I am still trying to figure out why the superboot image (as well as Pauls Amon Ra recovery image) does not follow the bootimg.h spec...
Edited by mohrun, 01 August 2010 - 07:26 PM.