Am 01.06.2012 03:16, schrieb Peter A. G. Crosthwaite:
> 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 <[email protected]>
> ---
> 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)
Beware that this signature has changed on qom-next branch, but I don't
see a conflict here.
Andreas
> 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 */ }
> },
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg