简体   繁体   English

在 qemu 中启动 ppc linux 内核

[英]Booting a ppc linux kernel in qemu

i am new at this.我是新手。 I am trying to boot a linux kernel image cross compiled for powerpc inside qemu.我正在尝试在 qemu 中启动为 powerpc 交叉编译的 linux 内核映像。 I followed guides on the web, but i am stuck and i don;t really know what do to next.我遵循了网上的指南,但我被卡住了,我不知道接下来该怎么做。

qemu-system-ppc -kernel vmlinux_2 -hda ss1.1.img -append "console=ttyS0 root=/dev/sda1" -nographic

>> =============================================================
>> OpenBIOS 1.1 [Jul 30 2013 21:44]
>> Configuration device id QEMU version 1 machine id 2
>> CPUs: 1
>> Memory: 128M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,750
Welcome to OpenBIOS v1.1 built on Jul 30 2013 21:44
>> [ppc] Kernel already loaded (0x01000000 + 0x001e5608) (initrd 0x00000000 + 0x00000000)
>> [ppc] Kernel command line: console=ttyS0 root=/dev/sda1

from here on it does nothing, i can enter monitor mode but nothing.从这里开始它什么都不做,我可以进入监控模式但什么也没有。 Nothing happens.什么都没发生。 I even tried to copy a fs to the img file hoping that smt would happen but nothing.我什至试图将 fs 复制到 img 文件,希望 smt 会发生,但什么也没发生。 If i run the command without the nographic option vnc only shows me a white screen with the bios version, and a blinking cursor.如果我在没有 nographic 选项的情况下运行命令,则 vnc 只会显示带有 bios 版本的白屏和闪烁的光标。 Any ideeas / advice?任何想法/建议? I looked trough the qemu documentation, but the problem is i don't even know where i am wrong.我查看了 qemu 文档,但问题是我什至不知道我错在哪里。

Looking your initrd output:查看您的 initrd 输出:

(0x01000000 + 0x001e5608) (initrd 0x00000000 + 0x00000000) (0x01000000 + 0x001e5608) (initrd 0x00000000 + 0x00000000)

It really does not look normal at all.它看起来真的一点也不正常。

My bootup attempt:我的启动尝试:

qemu-system-ppc -m 1024 -kernel vmlinux -cdrom mini.iso -boot d

where the mini.iso, initrd.gz, vmlinux is loaded from here:从这里加载 mini.iso、initrd.gz、vmlinux:

http://ports.ubuntu.com/ubuntu-ports/dists/xenial/main/installer-powerpc/current/images/powerpc/netboot http://ports.ubuntu.com/ubuntu-ports/dists/xenial/main/installer-powerpc/current/images/powerpc/netboot

does work.确实有效。 At the installation prompt, just enter "alt-F2" (or "alt-F3") to switch to another console and "dmesg" and you can see that the entire kernel has been successfully booted up.在安装提示下,只需输入“alt-F2”(或“alt-F3”)切换到另一个控制台和“dmesg”就可以看到整个内核已经成功启动了。

The dmesg tail-end and starting lines are shown here: dmesg 尾端和起始行如下所示:

在此处输入图片说明

I had the same problem when building a qemuppc image with Yocto.使用 Yocto 构建 qemuppc 映像时遇到了同样的问题。 Please try to rebuild your kernel without this config - it solved the problem in my case:请尝试在没有此配置的情况下重建内核 - 它解决了我的问题:

  • CONFIG_KEXEC CONFIG_KEXEC

kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. kexec 是一个系统调用,它实现了关闭当前内核和启动另一个内核的能力。 It is like a reboot but it is independent of the system firmware.这就像重新启动,但它独立于系统固件。

If you google "CONFIG_KEXEC PowerPC" you will also find some answers.如果你用谷歌搜索“CONFIG_KEXEC PowerPC”,你也会找到一些答案。

For me it was when I built the kernel.对我来说,那是我构建内核的时候。 If I did not enable: Platform support ---> Support booting from Open firmware or yaboot I got the exact same screen as you.如果我没有启用:平台支持 ---> 支持从 Open 固件或 yaboot 引导,我得到的屏幕与您完全相同。 When I flipped it to on, rebuilt the kernel using bitbake virtual/kernel -c menuconfig for yocto/poky all was well!当我打开它时,使用 bitbake virtual/kernel -c menuconfig for yocto/poky 重建内核一切都很好! :) :)

OF[openfirmware] can't boot kdump kernel. OF[openfirmware] 无法启动 kdump 内核。 qemuppc using openbios. qemuppc 使用 openbios。

Dont use nographic use below command ,不要在命令下面使用nographic use ,

qemu-system-ppc -kernel vmlinux_2 -hda ss1.1.img -append "console=ttyS0 root=/dev/sda1"

or要么

qemu-system-ppc -kernel vmlinux_2 -hda ss1.1.img -append "root=/dev/sda1"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM