Bug 11232 - The qemu can not get correct ip in meta-ide-support environment
Summary: The qemu can not get correct ip in meta-ide-support environment
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M4
Assignee: Robert Yang
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-24 02:53 UTC by Yi Zhao
Modified: 2017-04-01 02:41 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2017-03-24 02:53:50 UTC
Git rev: master/6e20b31d5d17133e0fca086e12a0ad06ab5c4cc8

Steps:
1. Download poky source and set the environment.
2. Run bitbake meta-ide-support
3. Run bitbake core-image-sato
4. Set the environment for meta-ide-support
   $ . ./tmp/environment-setup-i586-poky-linux 
5. Run runqemu to launch a qemu image
   $ runqemu tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf 

The qemu can be launched but the ip address is not correct. The root cause is sudo command is not in the PATH so the tap device can not be created.

#############################################
$ runqemu tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf nographic
runqemu - INFO - CONFFILE: /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf
runqemu - INFO - Continuing with the following parameters:

KERNEL: [/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/bzImage--4.10.2+git0+69bfa87234_827a1164b1-r0-qemux86-20170320041334.bin]
MACHINE: [qemux86]
FSTYPE: [ext4]
ROOTFS: [/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86-20170324004454.rootfs.ext4]
CONFFILE: [/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf]

runqemu - INFO - Running /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/hosttools/ip link...
runqemu - INFO - Setting up tap interface under sudo
/bin/sh: sudo: command not found
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/.lock...
runqemu - INFO - Created tap: 
runqemu - ERROR - Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.
runqemu - INFO - Running ldd /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/recipe-sysroot-native/usr/bin/qemu-system-i386...
runqemu - INFO - Running /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/recipe-sysroot-native/usr/bin/qemu-system-i386  -drive file=/buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/core-image-sato-qemux86-20170324004454.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci  -nographic  -cpu qemu32 -m 256 -serial mon:stdio -serial null -kernel /buildarea3/yzhao1/sdk-automation-test/ubs-build/build-i586/tmp/deploy/images/qemux86/bzImage--4.10.2+git0+69bfa87234_827a1164b1-r0-qemux86-20170320041334.bin -append 'root=/dev/vda rw highres=off  console=ttyS0 mem=256M vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 '
###################################

On target:
###################################
root@qemux86:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fec0::5054:ff:fe12:3456%134535719/64 Scope:Site
          inet6 addr: fe80::5054:ff:fe12:3456%134535719/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19 errors:4 dropped:0 overruns:0 frame:4
          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2526 (2.4 KiB)  TX bytes:10431 (10.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%134535719/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:140 (140.0 B)  TX bytes:140 (140.0 B)

########################################
Comment 2 Yi Zhao 2017-04-01 02:41:46 UTC
Verified with 2.3 M3 rc2.
git rev: master/415b72ffcbd26e5f3664370d8b2a9b8105fb6342