Patchwork [2/2] hw/arm: Use 'load_ramdisk()' for loading ramdisk

login
register
mail settings
Submitter Soren Brinkmann
Date June 14, 2013, 4:36 p.m.
Message ID <1371227783-23086-3-git-send-email-soren.brinkmann@xilinx.com>
Download mbox | patch
Permalink /patch/251463/
State New
Headers show

Comments

Soren Brinkmann - June 14, 2013, 4:36 p.m.
The load_ramdisk function takes over loading traditional ramdisks images
and does also load ramdisks with u-boot header.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
 hw/arm/boot.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index f310f73..ab2b234 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -436,10 +436,10 @@  void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
     info->entry = entry;
     if (is_linux) {
         if (info->initrd_filename) {
-            initrd_size = load_image_targphys(info->initrd_filename,
-                                              info->initrd_start,
-                                              info->ram_size -
-                                              info->initrd_start);
+            initrd_size = load_ramdisk(info->initrd_filename,
+                                       info->initrd_start,
+                                       info->ram_size -
+                                       info->initrd_start);
             if (initrd_size < 0) {
                 fprintf(stderr, "qemu: could not load initrd '%s'\n",
                         info->initrd_filename);