[PATCH v3 07/19] bootstd: Update bootmeth_alloc_file() to record images