summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>2013-05-03 15:19:45 +0200
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-05-13 09:12:40 +1000
commit1b939d922737fac86a854dbc5e186fe9fb7b0573 (patch)
tree2eb05c5c6efd0bbb9875b3613460810487d80bde
parent06b4f00d53637f2c16a62c2cbaa30bffb045cf88 (diff)
downloadqemu-1b939d922737fac86a854dbc5e186fe9fb7b0573.zip
microblaze: Support loading of u-boot initrd images
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-rw-r--r--hw/microblaze/boot.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index 48d9e7afa4..deeecfca6f 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -174,9 +174,15 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
high = ROUND_UP(high + kernel_size, 4);
boot_info.initrd_start = high;
initrd_offset = boot_info.initrd_start - ddr_base;
- initrd_size = load_image_targphys(initrd_filename,
- boot_info.initrd_start,
- ram_size - initrd_offset);
+
+ initrd_size = load_ramdisk(initrd_filename,
+ boot_info.initrd_start,
+ ram_size - initrd_offset);
+ if (initrd_size < 0) {
+ initrd_size = load_image_targphys(initrd_filename,
+ boot_info.initrd_start,
+ ram_size - initrd_offset);
+ }
if (initrd_size < 0) {
error_report("qemu: could not load initrd '%s'\n",
initrd_filename);