Closed qmfrederik closed 3 years ago
Yes, it would be nice. Please make sure it can handle both format (packed and extracted).
Resolved in PR #9
Trust cache im4p has 2 types of payload_type:
rtsc
for ramdisk's trustcache
trst
for rootdisk's trustcache
qemu-system-aarch64: Could parse ASN.1 data in file 'Firmware/038-44087-125.dmg.trustcache' because it is not a 'trst' object, found 'rtscIM4P' object.
I suggest leaving payload_type
check to caller of extract_im4p_payload
Addressed in a596748
We're currently required to extract the kernel image, device tree and static trust cache from the .img4 files.
It may be useful if qemu itself can take care of the extraction - it would make the process easier. Qemu already links with OpenSSL and liblzfse, so it already has the infrastructure required to manipulate im4p files in place.
Would you be open to a PR which adds such a feature?