qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Bamboo target: couldn't load device tree


From: Young Sheng
Subject: Re: [Qemu-discuss] Bamboo target: couldn't load device tree
Date: Sat, 31 Mar 2012 21:47:18 +0800



On Sat, Mar 31, 2012 at 2:48 PM, Young Sheng <address@hidden> wrote:
Yo, everybody,
  I'm a newbie using qemu for powerpc.  I want to emulate a 4xx processor, like:
qemu-system-ppc -M bamboo -kernel vmlinux -initrd initrd.gz  -append "root=/dev/ram init=/bin/sh"

But I only get "couldn't load device tree".  I checked /usr/share/qemu/, there is the bamboo.dtb.  Can anyone give me some advice?
Thanks a lot!


Sorry for that question.  I think I already find out the reason.  I install the qemu directly from the source list.  It seems that the default qemu doesn't support fdt.  And in the source code of qemu - qemu/hw/ppc440_bamboo.c, the bamboo_load_device_tree() function looks like:

static int bamboo_load_device_tree(xxxxxxx)
{
    int ret = -1;
#ifdef CONFIG_FDT
    ... ...
out:
#endif
    return ret;
}

static void bamboo_init(xxxxxxx)
{
    if(bamboo_load_device_tree(xxxxxx) < 0) {
        fprintf(stderr, "couldn't load device tree\n);
        exit(1);
    }
    ... ...
}

So, if the fdt is not enabled, the bamboo_load_device_tree() will always return -1, and the error message ``couldn't load device tree'' will be always displayed.  So, just download the source code of qemu and rebuild it.  When config the qemu, enable the fdt like: ./configure --target-list=ppc-softmmu --enable-fdt.

BUT, there is another question: when I boot it, the qemu can only give a prompt of qemu monitor. It seems that the qemu stops booting the system.  Any suggestions please?

Thanks!

--
Sheng Yong
 
BTW, the vmlinux and initrd.gz is from the Debian netboot.  And my qemu is 1.0.1-1.

--
Sheng Yong


reply via email to

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