TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to Emulate a Raspberry Pi (Raspbian Jessie) on Mac OS X

128 点作者 hfreire超过 7 年前

5 条评论

pm215超过 7 年前
I think it's worth noting that this isn't actually emulating a Raspberry Pi. The option "-M versatilepb" to QEMU tells it to emulate a VersatilePB, which is an Arm development board that's now a decade or more old. It happens that this can be set up to use an ARM1176 CPU, which is the same as the one in the RPi. So you can run a kernel built for the VersatilePB on a VersatilePB model, and use the same userspace/filesystem as the RPi, provided that your userspace doesn't rely on any particular characteristics of the rpi hardware beyond the CPU type. Luckily for most uses that's close enough...
评论 #16223152 未加载
评论 #16223290 未加载
jimmies超过 7 年前
On Linux, it&#x27;s even easier (lol, who would have guessed?).<p>I recently had the need to compile quite a bit of software to run on the Pi zero, and the ability to be able to &quot;chroot&quot; to the Pi on my PC has made the experience so much more pleasant. Everything compiles ten times faster!<p>I also noticed that none of the available guides work well with Ubuntu 17.04 (and possibly newer&#x2F;older), so I put together a simple script to do that on Ubuntu for anyone who is interested. It will always work when you chroot on the sdcard:<p><a href="https:&#x2F;&#x2F;gist.github.com&#x2F;htruong&#x2F;7df502fb60268eeee5bca21ef3e436eb" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;htruong&#x2F;7df502fb60268eeee5bca21ef3e4...</a><p>You can theoretically chroot into the image directly, but the resizing the partitions operation is unreliable on the host for some reason, and it might cause the image to not be bootable. I&#x27;ve found myself better off booting the sd card once with the vanilla image on the Pi first so it resizes itself before chrooting into the SD card.
评论 #16223942 未加载
评论 #16225276 未加载
评论 #16222995 未加载
stuaxo超过 7 年前
As mentioned below newer versions of QEMU can emulate the CPUs in newer Pis.<p>The main thing missing is proprietary graphics API &quot;dispmanx&quot;.<p>I didn&#x27;t try and emulate the GPIO, but assume that is also not possible ?
nly超过 7 年前
I&#x27;ve looked in to this before to build rPi binaries on a more powerful x86 machine, but i&#x27;ve never been able to get Jenkins&#x2F;Java running under QEMU
评论 #16227634 未加载
ramconx超过 7 年前
why this old version of raspbian? <a href="https:&#x2F;&#x2F;downloads.raspberrypi.org&#x2F;raspbian&#x2F;images&#x2F;" rel="nofollow">https:&#x2F;&#x2F;downloads.raspberrypi.org&#x2F;raspbian&#x2F;images&#x2F;</a>
评论 #16222983 未加载