Raspberry Pi Arch Linux 上的 qemu 最新 sd 映像 [英] qemu on Raspberry Pi Arch Linux latest sd image

查看:18
本文介绍了Raspberry Pi Arch Linux 上的 qemu 最新 sd 映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置 Arch 映像并使用 qemu 以便在将映像加载到 Pi 之前交叉编译一些东西.我认为最简单的方法是 qemu 最新的入门镜像,准备好我需要的任何东西,然后在我完成后将它添加到 Pi 上.

I am trying to set up an Arch image and use qemu in order to cross-compile some stuff before I load the image onto the Pi. I thought the easiest way to do it would be to qemu the latest starter image, prepare it with whatever I needed, and then dd it onto the Pi when I was done.

我从 http://downloads.raspberrypi.org/arch_latest 下载了 Arch 镜像,想在 Qemu 下运行类似于 http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/.

I downloaded the Arch image from http://downloads.raspberrypi.org/arch_latest, and wanted to run it under Qemu similar to http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/.

我在他们提供的 qemu 命令行上尝试了许多变体

I tried many variations on the qemu command line they gave

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2013-05-25-wheezy-raspbian.img

替换archlinux-hf-2013-07-22.img.但这最终导致内核恐慌 - 未同步:未找到 init.尝试将 init= 选项传递给内核"

substituting the archlinux-hf-2013-07-22.img. But this eventually led to "Kernel panic - not syncing: No init found. Try passing init= option to kernel"

我确定这意味着我下载的 kernel-qemu 不适用于 Arch 映像,但我不确定解决问题的正确方法.

I'm sure this means the kernel-qemu I downloaded won't work with the Arch image, but I'm not sure the right way to fix the issue.

当我使用上面的命令行时,即使是最新的 Raspbian 映像内核也会崩溃.我想这不应该让我感到惊讶,因为它很可能是一个旧内核.

Even the latest Raspbian image kernel panics when I use the command line above with it. Which I guess shouldn't have surprised me, since it's most likely an old kernel.

所以我想我真正的问题是,如何使用映像中包含的任何内核,而不必构建自己的内核?

So I guess my real question is, how can I use whatever kernel is included in the image, rather than having to build my own kernel?

推荐答案

万一 archlinux-hf-2013-07-22.img这里有 3 个分区.您可以使用

In case archlinux-hf-2013-07-22.img Here there 3 partion are made. you can check by using

fdisk -l archlinux-hf-2013-07-22.img

rootfs 在 sd5 中,即第 5 部分.

所以传递这个参数 "root=/dev/sda5 panic=1" ,它会完美启动.

So pass this parameter "root=/dev/sda5 panic=1" , it will boot perfectly.

这篇关于Raspberry Pi Arch Linux 上的 qemu 最新 sd 映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆