• Nye Liu's avatar
    initramfs: add option to preserve mtime from initramfs cpio images · 889d51a1
    Nye Liu authored
    When unpacking the cpio into the initramfs, mtimes are not preserved by
    default.  This patch adds an INITRAMFS_PRESERVE_MTIME option that allows
    mtimes stored in the cpio image to be used when constructing the
    initramfs.
    
    For embedded applications that run exclusively out of the initramfs, this
    is invaluable:
    
    When building embedded application initramfs images, its nice to know when
    the files were actually created during the build process - that makes it
    easier to see what files were modified when so we can compare the files
    that are being used on the image with the files used during the build
    process.  This might help (for example) to determine if the target system
    has all the updated files you expect to see w/o having to check MD5s etc.
    
    In our environment, the whole system runs off the initramfs partition, and
    seeing the modified times of the shared libraries (for example) helps us
    find bugs that may have been introduced by the build s...
    889d51a1
initramfs.c 12.7 KB