[coreboot] Extracting an image created with mkelfImage

Peter Stuge peter at stuge.se
Mon Jan 9 23:15:00 CET 2012

Brian Luckau wrote:
> root at admin cache]# readelf -a Compute.ebi 
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   NOTE           0x0000d4 0x00000000 0x00000000 0x000a4 0x000a4 RWE 0
>   LOAD           0x000178 0x00010000 0x00010000 0x01288 0x05524 RWE 0
>   LOAD           0x001400 0x00020000 0x00020000 0x00000 0x01070 RWE 0
>   LOAD           0x001400 0x00100000 0x00100000 0x20029c 0x700000 RWE 0

The above looks like the kernel.

>   LOAD           0x20169c 0x02800000 0x02800000 0x7dbdc6 0x7dbdc6 RWE 0

And this would be the initrd.

Could perhaps extract as such:

dd if=Compute.ebi of=Compute-kernel bs=1 skip=$[0x1400] count=$[0x20029c]
dd if=Compute.ebi of=Compute-initrd bs=1 skip=$[0x20169c] count=$[0x7dbdc6]

Run file on the initrd to find out if it is compressed, but since
it's 8 MB I guess it might be uncompressed.

Depending on the format of the initrd you would proceed perhaps by
mounting it through the loopback device, or if it's a more modern
kernel and actually initramfs instead of initrd then you would use
cpio to unpack.


More information about the coreboot mailing list