I'm creating a QEMU startup script in which I compile a rootfs to cpio.gz each time I launch the env. This is fine for the moment, but when the rootfs gets bigger in size, it is going to be a problem. Is there any way to check if a given directory structure and a compiled xxx.cpio.gz are different? I mean, if a file is added to the base rootfs directory structure, then a new cpio.gz must be created, but if its not the case, the one compiled in a previous launch would be fine.
Thanks in advance.