Tuesday, 12 July 2016

[HELP][Q] How to properly repack ramdisk in order to avoid boot stuck?



Hello mates!

I've been playing with XT1097's boot.img and need some help as my boot.img fails to boot if I repack ramdisk.

Using abootimg

Extracting boot.img contents:

Code:


abootimg -x boot.img ==> produces bootimg.cfg, initrd.img and zImage files in the current directory

Updating boot.img contents without touching ramdisk (using the one extracted in the previous step):

Code:


abootimg -u boot.img -r initrd.img

If I extract initrd.img and try to repack it, then system fails at boot:

Extracting ramdisk (initrd.img) contents:

Code:


abootimg-unpack-initrd ==> produces a ramdisk subdir

Repacking without modyfing ramdisk folder contents:

Code:


abootimg-pack-initrd newramdisk.img

Updating boot.img with newramdisk.img

Code:


abootimg -u boot.img -r newramdisk.img

Even though the generated boot.img's size matches the original one - 10444800 bytes - system gets stuck at boot logo.

The same issue happens if I use these tools combined:
mkbootimg, unmkbootimg, gzip and cpio

Any ideas are welcome :)



No comments:

Post a Comment