mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/loader: Support ramdisk with u-boot header
Introduce 'load_ramdisk()' which can load "normal" ramdisks and ramdisks with a u-boot header. To enable this and leverage synergies 'load_uimage()' is refactored to accomodate this additional use case. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373323202-17083-2-git-send-email-soren.brinkmann@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
c8a07b355d
commit
84aee0deae
2 changed files with 72 additions and 25 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue