meta-ivi/13.0.0 qemu arm not working.

Gunnar Andersson gandersson at genivi.org
Mon Dec 4 13:02:28 EST 2017


Followup -->

On Thu, 2017-11-30 at 11:52 +0100, Gunnar Andersson wrote:
> Aviv,
> 
> On Wed, 2017-11-29 at 16:16 +0000, Stephen Lawrence wrote:
> > Forwarding to the meta-ivi ML.
> > 
> > From: genivi-projects [mailto:genivi-projects-bounces at lists.genivi.org]
> > On
> > Behalf Of Aviv Sinai
> > Sent: 28 November 2017 14:33
> > To: genivi-projects at lists.genivi.org
> > Subject: meta-ivi/13.0.0 qemu arm not working.
> > 
> > Hello, 
> > 
> > I am trying to run meta-ivi on qemu for arm. 
> > I followed the instruction on the site:
> > https://at.projects.genivi.org/wiki/pages/viewpage.action?pageId=1497643
> > 9
> > 
> > Running the command=  ../meta-ivi/scripts/runqemu orion-image vexpressa9
> > Got this error:
> > 
> > ### Shell environment set up for builds. ###
> > 
> > You can now run 'bitbake <target>'
> > 
> > Common targets are:
> >     orion-image
> >     ivi-image
> > 
> > there is no tmp/deploy/images/qemux86-64/*-qemux86-64.bin
> > there is no tmp/deploy/images/qemux86-64/-qemux86-64.ext*
> 
> ^^ Yes, it looks like the local runqemu sets MACHINE to qemux86-64, if not
> specified.
> 
> The steps on the web page only deal with building and propose a local
> setting of the variable:
> 
> $ MACHINE=qemux86-64 bitbake orion-image
> 
> But to ensure MACHINE continues to be set set correctly also if someone
> runs
> runqemu afterwards, I think it should be changed to:
> 
> $ export MACHINE=qemux86-64
> 
> In your case I would guess you also needed to set MACHINE=vexpressa9
> before
> runqemu, but I think you might have done that already, since you were able
> to start the script?
> 
> > 
> > 
> > So I added the -I and -m switches and run the command= ../meta-
> > ivi/scripts/runqemu -i orion -m vexpressa9
> > 
> > And got this error: 
> > 
> > ### Shell environment set up for builds. ###
> > 
> > You can now run 'bitbake <target>'
> > 
> > Common targets are:
> >     orion-image
> >     ivi-image
> > 
> > runqemu - INFO - Running bitbake -e...
> > runqemu - INFO - CONFFILE:
> > /home/build/users/aviv/genivi/build/tmp/deploy/images/vexpressa9/orion-
> > image-vexpressa9.qemuboot.conf
> > runqemu - INFO - Continuing with the following parameters:
> > 
> > KERNEL: [tmp/deploy/images/vexpressa9/zImage
> > --4.1.39+git0+c55c877244_398d1785c6-r0-vexpressa9-20171127115703.bin]
> > DTB: [tmp/deploy/images/vexpressa9/zImage-vexpress-v2p-ca9.dtb]
> > MACHINE: [vexpressa9]
> > FSTYPE: [ext4]
> > ROOTFS: [tmp/deploy/images/vexpressa9/orion-image-vexpressa9-
> > 20171127115703.rootfs.ext4]
> > CONFFILE:
> > [/home/build/users/aviv/genivi/build/tmp/deploy/images/vexpressa9/orion-
> > image-vexpressa9.qemuboot.conf]
> > 
> > runqemu - INFO - Running /sbin/ip link...
> > runqemu - INFO - Setting up tap interface under sudo
> > runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
> > runqemu - INFO - Created tap: tap0
> > runqemu - INFO - Network configuration:
> > 192.168.7.2::192.168.7.1:255.255.255.0
> > runqemu - INFO - Running ldd tmp/work/x86_64-linux/qemu-helper-
> > native/1.0-
> > r1/recipe-sysroot-native/usr/bin//qemu-system-arm...
> > runqemu - INFO - Running tmp/work/x86_64-linux/qemu-helper-native/1.0-
> > r1/recipe-sysroot-native/usr/bin//qemu-system-arm -device virtio-net-
> > pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
> > tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-
> > device,netdev=net0,mac=@MAC@ -drive
> > id=disk0,file=tmp/deploy/images/vexpressa9/orion-image-vexpressa9-
> > 20171127115703.rootfs.ext4,if=none,format=raw -device virtio-blk-
> > device,drive=disk0 -show-cursor  -machine vexpress-a9  -m 512 -serial
> > mon:vc -serial null -kernel tmp/deploy/images/vexpressa9/zImage
> > --4.1.39+git0+c55c877244_398d1785c6-r0-vexpressa9-20171127115703.bin
> > -append 'root=/dev/vda rw highres=off  mem=512M
> > ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyAMA0,115200 ' -dtb
> > tmp/deploy/images/vexpressa9/zImage-vexpress-v2p-ca9.dtb
> > qemu-system-arm: -device virtio-net-
> > pci,netdev=net0,mac=52:54:00:12:34:02: 
> > No 'PCI' bus found for device 'virtio-net-pci'
> > runqemu - INFO - Running sudo
> > /home/build/users/aviv/genivi/poky/scripts/runqemu-ifdown tap0
> > tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-
> > native/usr/bin/
> > Set 'tap0' nonpersistent
> > runqemu - INFO - Releasing lockfile for tap device 'tap0'
> > Traceback (most recent call last):
> >   File "../poky/scripts/runqemu", line 1238, in <module>
> >     ret = main()
> >   File "../poky/scripts/runqemu", line 1231, in main
> >     config.start_qemu()
> >   File "../poky/scripts/runqemu", line 1142, in start_qemu
> >     raise Exception('Failed to run %s' % cmd)
> > Exception: Failed to run tmp/work/x86_64-linux/qemu-helper-native/1.0-
> > r1/recipe-sysroot-native/usr/bin//qemu-system-arm -device virtio-net-
> > pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
> > tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-
> > device,netdev=net0,mac=@MAC@ -drive
> > id=disk0,file=tmp/deploy/images/vexpressa9/orion-image-vexpressa9-
> > 20171127115703.rootfs.ext4,if=none,format=raw -device virtio-blk-
> > device,drive=disk0 -show-cursor  -machine vexpress-a9  -m 512 -serial
> > mon:vc -serial null -kernel tmp/deploy/images/vexpressa9/zImage
> > --4.1.39+git0+c55c877244_398d1785c6-r0-vexpressa9-20171127115703.bin
> > -append 'root=/dev/vda rw highres=off  mem=512M
> > ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyAMA0,115200 ' -dtb
> > tmp/deploy/images/vexpressa9/zImage-vexpress-v2p-ca9.dtb
> > 
> > Any Idea why this should happen? And how to fix?
> 
> The runqemu exception is due to qemu booting failure, would you agree?
> 
> Not sure - maybe this is the fatal error:  
> No 'PCI' bus found for device 'virtio-net-pci'?
> 
> First step I would take is to take runqemu out of the equation and repeat
> the qemu command separately (with parameters as listed in the error), and
> then try to tweak those input parameters.  Where does it fail?  In the
> middle of the boot?  Can it be started without network?  And then go from
> there...
> 
> SIDENOTE: For GDP we've decided not to consider Yocto-built QEMU anymore,
> and realize that most people run the QEMU installed on their system with
> their package manager (apt-get/yum/dnf/etc.), and we described the
> parameters needed to do so on a Wiki page [1], but there's a small risk of
> differences between systems.
> 
> But I agree, for meta-ivi testing it would be good if launching QEMU works
> directly from the Yocto build results itself.
> 
> For what it's worth I'll spin up a build to reproduce what you are
> describing.

I've confirmed the problem as you described it.  Unfortunately I personally
don't have either the skills or the time to debug right now.  Someone else
has to help out here.

Perhaps you want to file a bug [2] to make sure it's tracked.  The next 
baseline maintainer (we're about to assign a new one) might want to look at
this, e.g. next year.  If you don't get any other answers, you may have to
try to work it out or seek support on running QEMU correctly -- just work
out what flags you need to give to get networking working.  (#qemu IRC
channel is a good idea, or a mailing list etc. -- [3]).

> 
> Anyone with more QEMU knowledge, please jump in and help.
> 
> Best Regards
> - Gunnar


[2] https://at.projects.genivi.org/jira/projects/BASE/issues
[3] https://wiki.qemu.org/Links#Development

> 
> [1] https://at.projects.genivi.org/wiki/x/qIiw
> 
> 
> > 
> > Thanks,
> > Aviv
> > 
> > 
> > 
> > Aviv Sinai, Red Team R&D 
> > Mobile: +972-53-426-9917         |         Office: +1-734-794-4745 
> > 
> > 
> > _______________________________________________
> > genivi-projects mailing list
> > genivi-projects at lists.genivi.org
> > https://lists.genivi.org/mailman/listinfo/genivi-projects




More information about the genivi-projects mailing list