On Thu, Jan 28, 2016 at 02:06:50PM +0100, Nicolas Dechesne wrote:
to follow up on that.. after a bit of discussion (on irc) and testing, it looks like we should be able to replace make_ext4fs by mkfs.ext4 + ext2simg. And we would get images built properly: the filesystem would be created with linux standard tools, and the resulting sparse image has DONTCARE blocks which is better too.
I did a quick test on my dragonboard, and I could flash the resulting image fine, and resize-helper.sh could do its job properly too.
can someone try on hikey the following:
- download the latest debian rootfs
- simg2img <rootfs> <rootfs.raw>
- dd if=/dev/zero of=image.img xxx
- mkfs.ext4 image.img
- mount image.img and <rootfs.raw>
- cp -a <rootfs.raw mount> --> <image.img mount>
- ext2simg <image.img> <s_image.img>
I wonder if I have problems with either my simg2img/img2simg or my fastboot:
Steps 1-7 are fine, but when I tried flashing the resulting image:
% fastboot flash system hikey-rootfs2.simg target reported max download size of 524288000 bytes error: write_sparse_skip_chunk: don't care size 1306170156 is not a multiple of the block size 4096 error: write_sparse_skip_chunk: don't care size 781824812 is not a multiple of the block size 4096 error: write_sparse_skip_chunk: don't care size 257540908 is not a multiple of the block size 4096 fastboot: core/libsparse/sparse.c:153: write_all_blocks: Assertion `pad >= 0' failed. zsh: abort (core dumped) fastboot flash system hikey-rootfs2.simg
Do we have official binaries for these tools? I build the simg2img/img2simg right out of https://android.googlesource.com/platform/system/core .
David