Commit 52f163b7f4ca67371c15d17bb55b0a9d19d6700c
1 parent
271dd5e0
Fix kernel loading
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6131 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
9 additions
and
1 deletions
hw/ppc_oldworld.c
... | ... | @@ -207,7 +207,15 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, |
207 | 207 | if (linux_boot) { |
208 | 208 | kernel_base = KERNEL_LOAD_ADDR; |
209 | 209 | /* now we can load the kernel */ |
210 | - kernel_size = load_image(kernel_filename, phys_ram_base + kernel_base); | |
210 | + kernel_size = load_elf(kernel_filename, kernel_base - 0xc0000000ULL, | |
211 | + NULL, NULL, NULL); | |
212 | + if (kernel_size < 0) | |
213 | + kernel_size = load_aout(kernel_filename, kernel_base, | |
214 | + ram_size - kernel_base); | |
215 | + if (kernel_size < 0) | |
216 | + kernel_size = load_image_targphys(kernel_filename, | |
217 | + kernel_base, | |
218 | + ram_size - kernel_base); | |
211 | 219 | if (kernel_size < 0) { |
212 | 220 | cpu_abort(env, "qemu: could not load kernel '%s'\n", |
213 | 221 | kernel_filename); | ... | ... |