无法像文档中所述那样使用runqemu运行Yocto图像

问题描述 投票:2回答:1

我想在QEMU中运行Yocto图像,但是the documentation中描述的方式不起作用。

为了验证我没有做错任何事情,我遵循了快速构建指南中的步骤:

  • 安装必需的软件包
  • 克隆戳
  • 结帐正确版本
  • 源代码构建环境
  • 在local.conf中将计算机设置为qemux86
  • 添加sstate镜像并允许并行构建
  • 开始bitbake core-image-sato
  • 接下来的几个小时要做其他事情

[当我现在尝试在qemu中运行该映像时,如文档中所述:

runqemu qemux86

我只得到以下输出,什么都没有发生:

runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
runqemu - INFO - Continuing with the following parameters:

KERNEL: [/mnt/wwn-0x50014ee0576fe9ef- part1/test_python3_in_yocto/build/tmp/deploy/images/qemux86/bzImage--4.14.76+git0+3435617380_2c5caa7e84-r0-qemux86-20190305114605.bin]
MACHINE: [qemux86]
FSTYPE: [ext4]
ROOTFS: [/mnt/wwn-0x50014ee0576fe9ef-part1/test_python3_in_yocto/build/tmp/deploy/images/qemux86/core-image-base-qemux86-20190305151244.rootfs.ext4]
CONFFILE: [/mnt/wwn-0x50014ee0576fe9ef-part1/test_python3_in_yocto/build/tmp/deploy/images/qemux86/core-image-base-qemux86-20190305151244.qemuboot.conf]

runqemu - INFO - Setting up tap interface under sudo
runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255.255.255.0
runqemu - INFO - Running /mnt/wwn-0x50014ee0576fe9ef-part1/test_python3_in_yocto/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=/mnt/wwn-0x50014ee0576fe9ef-part1/test_python3_in_yocto/build/tmp/deploy/images/qemux86/core-image-base-qemux86-20190305151244.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -device usb-tablet -device virtio-rng-pci   -cpu pentium2 -m 256 -serial mon:vc -serial null -kernel /mnt/wwn-0x50014ee0576fe9ef-part1/test_python3_in_yocto/build/tmp/deploy/images/qemux86/bzImage--4.14.76+git0+3435617380_2c5caa7e84-r0-qemux86-20190305114605.bin -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 '

[当我尝试运行没有图形的qemu时,我会出现内核崩溃:

runqemu nographic qemux86
...

[    6.171521] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null)
[    6.172937] VFS: Mounted root (ext4 filesystem) on device 253:0.
[    6.175806] devtmpfs: error mounting -2
[    6.237143] Freeing unused kernel memory: 852K
[    6.238001] Write protecting the kernel text: 8752k
[    6.238722] Write protecting the kernel read-only data: 2376k
[    6.244382] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin.
[    6.245455] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.76-yocto-standard #1
[    6.245913] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/4
[    6.246730] Call Trace:
[    6.247788]  dump_stack+0x58/0x72
[    6.248071]  ? rest_init+0x90/0xc0
[    6.248320]  panic+0x94/0x1c6
[    6.248529]  ? rest_init+0xc0/0xc0
[    6.248807]  kernel_init+0xda/0xf0
[    6.249046]  ret_from_fork+0x2e/0x38
[    6.249834] Kernel Offset: 0xd800000 from 0xc1000000 (relocation range: 0xc0000000-0xd07dbfff)
[    6.250595] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentat.

文档中是否缺少某些内容?

我也尝试过其他图像...

  • core-image-sato
  • 核心图像库
  • core-image-minimal

最后我用版本2.5.2(sumo)代替了版本2.6.1(thud)尝试过...但是没有任何变化...

当我搜索该问题时,除了增加内存并没有任何改变外,我并没有发现其他有用的东西,所以我希望这里的任何人都知道怎么了...

yocto qemu
1个回答
0
投票

可能缺少第二个参数的附件。浏览到错误消息中的文件夹,并检查目录qemux86是否存在,可能不是。

我必须

runqemu qemux86-64

不是

runqemu qemux86
© www.soinside.com 2019 - 2024. All rights reserved.