microblaze: Support loading of u-boot initrd images

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
Edgar E. Iglesias 2013-05-03 15:19:45 +02:00
parent 06b4f00d53
commit 1b939d9227

View File

@ -174,9 +174,15 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
high = ROUND_UP(high + kernel_size, 4); high = ROUND_UP(high + kernel_size, 4);
boot_info.initrd_start = high; boot_info.initrd_start = high;
initrd_offset = boot_info.initrd_start - ddr_base; initrd_offset = boot_info.initrd_start - ddr_base;
initrd_size = load_image_targphys(initrd_filename,
boot_info.initrd_start, initrd_size = load_ramdisk(initrd_filename,
ram_size - initrd_offset); 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) { if (initrd_size < 0) {
error_report("qemu: could not load initrd '%s'\n", error_report("qemu: could not load initrd '%s'\n",
initrd_filename); initrd_filename);