[PATCH v2 21/31] bootstd: Update bootmeth_alloc_file() to record images