cascardo/bootimg.git
10 years agoLoad kernel and initrd into an existing image.
Thadeu Lima de Souza Cascardo [Fri, 28 Mar 2014 02:39:08 +0000 (23:39 -0300)]
Load kernel and initrd into an existing image.

This allows us to replace both kernel and initrd from an existing image
and keep its command line, atags, and load addresses, just changing the
kernel and initrd sizes.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
10 years agoChange the dump function to also be able to load a component.
Thadeu Lima de Souza Cascardo [Thu, 27 Mar 2014 21:38:02 +0000 (18:38 -0300)]
Change the dump function to also be able to load a component.

It might be desirable to load a kernel and initrd and save it to a
bootimg. They need to be padded with zeroes to align to a page size.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
10 years agoFix dump of extra page.
Thadeu Lima de Souza Cascardo [Thu, 27 Mar 2014 11:03:48 +0000 (08:03 -0300)]
Fix dump of extra page.

On the last page, just the remaining data is dump, ignoring any
padding. However, a page is dumped like in every loop, resulting in an
extra page on the output file. Just dump an entire page when it isn't
the last one.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
10 years agoDump kernel and initrd from an Android boot image.
Thadeu Lima de Souza Cascardo [Thu, 27 Mar 2014 10:54:58 +0000 (07:54 -0300)]
Dump kernel and initrd from an Android boot image.

Samsumg Android devices use a boot image format that contains the kernel
and initrd, and the command line. This program extracts kernel and
initrd from those.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>