qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH V1 1/2] arm_boot: added linux switch


From: Peter A. G. Crosthwaite
Subject: [Qemu-devel] [RFC PATCH V1 1/2] arm_boot: added linux switch
Date: Fri, 1 Jun 2012 11:16:11 +1000

Added a switch to tell the bootloader that the image is linux and should be
bootstrapped as such. This is needed to boot an elf that is linux.

Syntax would be:

qemu-system-arm ... -kernel linux.elf -machine linux=on

Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
---
 hw/arm_boot.c |    1 +
 qemu-config.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/arm_boot.c b/hw/arm_boot.c
index 7447f5c..8e25873b 100644
--- a/hw/arm_boot.c
+++ b/hw/arm_boot.c
@@ -320,6 +320,7 @@ void arm_load_kernel(CPUARMState *env, struct arm_boot_info 
*info)
     machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
     if (machine_opts) {
         info->dtb_filename = qemu_opt_get(machine_opts, "dtb");
+        is_linux = qemu_opt_get_bool(machine_opts, "linux", 0) ? 1 : 0;
     } else {
         info->dtb_filename = NULL;
     }
diff --git a/qemu-config.c b/qemu-config.c
index be84a03..0ee781c 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -582,6 +582,10 @@ static QemuOptsList qemu_machine_opts = {
             .name = "dtb",
             .type = QEMU_OPT_STRING,
             .help = "Linux kernel device tree file",
+        }, {
+            .name = "linux",
+            .type = QEMU_OPT_BOOL,
+            .help = "Bootstrap Linux",
         },
         { /* End of list */ }
     },
-- 
1.7.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]