diff options
Diffstat (limited to 'include/hw/loader.h')
-rw-r--r-- | include/hw/loader.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/hw/loader.h b/include/hw/loader.h index 15d4cc9a55..eb9c9a3612 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -17,6 +17,19 @@ int load_aout(const char *filename, hwaddr addr, int max_sz, int load_uimage(const char *filename, hwaddr *ep, hwaddr *loadaddr, int *is_linux); +/** + * load_ramdisk: + * @filename: Path to the ramdisk image + * @addr: Memory address to load the ramdisk to + * @max_sz: Maximum allowed ramdisk size (for non-u-boot ramdisks) + * + * Load a ramdisk image with U-Boot header to the specified memory + * address. + * + * Returns the size of the loaded image on success, -1 otherwise. + */ +int load_ramdisk(const char *filename, hwaddr addr, uint64_t max_sz); + ssize_t read_targphys(const char *name, int fd, hwaddr dst_addr, size_t nbytes); void pstrcpy_targphys(const char *name, |