arm_boot: added linux switch
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): f7256b2be069a80037b977e3f66f4d51418e35d0.1338512893.git.peter.crosthwaite@petalogix.com
Am 01.06.2012 03:16, schrieb Peter A. G. Crosthwaite:
hw/arm_boot.c void arm_load_kernel(CPUARMState *env, struct arm_boot_info *info)
Quoted 18 lines
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(-)hw/arm_boot.c +0
-0@@ -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
Quoted 22 lines
hw/arm_boot.c +1
-0machine_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 ; }qemu-config.c +4
-0@@ -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 */ } },
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
A message that is not in the archive (sent off-list or not yet received): CAFEAcA8RrDD_zthmmO99DsOPnYz3zGVcg5oLAnRvHR=smfBrpA@mail.gmail.com
Ping! @PMM
You rejected my workaround in V2 (i.e. using -dtb to force is_linux) on the grounds that youd "accept some reasonable way of saying "this ELF file is a Linux kernel"," That brings us back to V1 - this patch. Any objections?
Regards,
Peter
Quoted 18 lines · Peter Maydell
Quoted 6 lines · 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
This whole area is a mess. Personally I think we should have a standard way to say "load this ELF file into memory" which isn't target-dependent, and then we could make -kernel actually load a kernel rather than its current "load a kernel unless it's an ELF file in which case do something else".
There are some back-compatibility issues there, though.
-- PMM