aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoren Brinkmann <soren.brinkmann@xilinx.com>2013-07-08 15:40:02 -0700
committerPeter Maydell <peter.maydell@linaro.org>2013-07-22 12:01:37 +0100
commitfd76663e3fe59dc7f7d5c439561b74f472727137 (patch)
treec65dd8feb6a6266b5bed7b2452fed114c5a722e9
parent84aee0deae0de620277759e2c3cd3a9cf45390b0 (diff)
downloadqemu-arm-pull-arm-devs-20130722.tar.gz
hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot headerpull-arm-devs-20130722
The load_ramdisk function is used to load ramdisk featuring a U-Boot header. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373323202-17083-3-git-send-email-soren.brinkmann@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/arm/boot.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 9fbe5d22a5..2cbeefdcba 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -411,10 +411,16 @@ 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) {
+ initrd_size = load_image_targphys(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);