Fix kernel loading

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6131 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1 2008-12-24 20:30:01 +00:00
parent 271dd5e09e
commit 52f163b7f4

View File

@ -207,7 +207,15 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
if (linux_boot) {
kernel_base = KERNEL_LOAD_ADDR;
/* now we can load the kernel */
kernel_size = load_image(kernel_filename, phys_ram_base + kernel_base);
kernel_size = load_elf(kernel_filename, kernel_base - 0xc0000000ULL,
NULL, NULL, NULL);
if (kernel_size < 0)
kernel_size = load_aout(kernel_filename, kernel_base,
ram_size - kernel_base);
if (kernel_size < 0)
kernel_size = load_image_targphys(kernel_filename,
kernel_base,
ram_size - kernel_base);
if (kernel_size < 0) {
cpu_abort(env, "qemu: could not load kernel '%s'\n",
kernel_filename);