From: Hollis Blanchard <[EMAIL PROTECTED]>
This allows qemu to load "bare metal" ELF kernels, useful for standalone
benchmarks and testcases.
We could/should also load the specified file as a flat binary, if both uImage
and ELF loaders fail. (See hw/arm_boot.c.)
Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>
Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]>
---
[diffstat]
ppc440_bamboo.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
[diff]
diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c
--- a/qemu/hw/ppc440_bamboo.c
+++ b/qemu/hw/ppc440_bamboo.c
@@ -35,8 +35,8 @@
qemu_irq *pic;
ppc4xx_pci_t *pci;
CPUState *env;
- target_ulong ep=0;
- target_ulong la=0;
+ uint64_t ep=0;
+ uint64_t la=0;
int is_linux=1; /* Will assume allways is Linux for now */
target_long kernel_size=0;
target_ulong initrd_base=0;
@@ -97,6 +97,9 @@
/* load kernel with uboot loader */
printf("%s: load kernel\n", __func__);
ret = load_uimage(kernel_filename, &ep, &la, &kernel_size, &is_linux);
+ if (ret < 0)
+ ret = load_elf(kernel_filename, 0, &ep, &la, NULL);
+
if (ret < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
kernel_filename);
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html