qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] qemu-system-ppc unable to boot past "returning from prom_


From: Prasad Deshpande
Subject: Re: [Qemu-ppc] qemu-system-ppc unable to boot past "returning from prom_init"
Date: Fri, 23 Dec 2011 07:12:46 -0800 (PST)


The kernel is cross-compiled for PPC using timesys toolchain (www.timesys.com)

qemu gets stuck in this infinite loop in the kernel. I am assuming that means that it cant find the machine type. This vmlinux is build for mpc5125 instead of mpc8544ds (both are ppc). I am assuming that's the problem. Please let me know if don't think thats the case.

arch/powerpc/kernel/setup-common.c
void probe_machine(void)
{
    extern struct machdep_calls __machine_desc_start;
    extern struct machdep_calls __machine_desc_end;

    /*
     * Iterate all ppc_md structures until we find the proper
     * one for the current machine type
     */
    DBG("Probing machine type ...\n");

    for (machine_id = &__machine_desc_start;
         machine_id < &__machine_desc_end;
         machine_id++) {
        DBG("  %s ...", machine_id->name);
        memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls));
        if (ppc_md.probe()) {
            DBG(" match !\n");
            break;
        }
        DBG("\n");
    }
    /* What can we do if we didn't find ? */
    if (machine_id >= &__machine_desc_end) {
        DBG("No suitable machine found !\n");
===>>        for (;;);                <<======
    }

    printk(KERN_INFO "Using %s machine description\n", ppc_md.name);
}

thanks
-prasad


From: Alexander Graf <address@hidden>
To: Prasad Deshpande <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Friday, December 23, 2011 9:40 AM
Subject: Re: [Qemu-ppc] qemu-system-ppc unable to boot past "returning from prom_init"


On 23.12.2011, at 15:36, Prasad Deshpande wrote:

>
> Thanks. I tried what you suggested but it didn't make a difference. I can see the option being passed to the kernel (>> [ppc] Kernel command line: console=ttyPZ0)
>
> Is there a way to see the kernel printk() somewhere if they are enabled?

Sure. You can attach gdb to the VM and manually write out log_buf:

  $ qemu-system-ppc -kernel vmlinux -s
[ wait until it seems stuck, but keep it running and run the following on a different shell ]
  $ gdb vmlinux -ex 'target remote localhost:1234'
    (gdb) p /s log_buf


>
> I enabled kernel debug info and attached GDB. Using GDB I found that it was an unsupported machine type.

Unsupported machine type? What system is your gdb made for? X86 gdb won't work with ppc guests - you have to use a ppc gdb.

> I am now trying to build the kernel for mpc8544ds

That one and g3beige (default) should work, yes. The others are reasonably flaky.


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]