如何使用QEMU学习ARM Linux内核开发?

发布于 2024-11-25 01:04:06 字数 125 浏览 2 评论 0原文

我想学习它,比如开发一些设备驱动程序等,并为此使用 QEMU,因为我没有像 beagle 板这样的 ARM 硬件板。你们有什么建议?我可以使用 Qemu 模拟器来学习 ARM 目标上的 Linux 内核吗?或者我应该尝试的任何其他选择?

I want to learn it like developing some device driver etc and use QEMU for this because i have no hardware board for ARM like beagle board. What you guys suggest? Can i use Qemu simulator to learn Linux kernel on ARM targets? or any other option i should try ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

爱*していゐ 2024-12-02 01:04:06

这取决于您想学习什么:硬件还是软件。如果您确实想尝试不同的 GPIO 输出来实现伺服电机控制、LED 灯闪烁和显示等功能,那么便宜的板(例如 Raspberry Pi,约 25 美元)是首选。

但如果你想学习一般的软件,qemu 肯定要快得多,而且它可以让你看到正在发生的事情的内部。使用硬件进行实验需要示波器等。但是使用软件进行实验将取决于其他人在其软件中实现的错误输出。

至于驱动开发,第一个版本应该在QEMU上快速开发。但测试自然涉及硬件,应该在硬件上进行。

底线是:x86 速度快得多,因此交叉编译始终在 x86 上完成,然后再在 ARM 板上启动。在板上编译非常耗时,有时可能需要大量的开发库和源代码存储空间。

It depends on what you want to learn: hardware or software. If you really want to experiment with the different GPIO output to implement things like servo motor control, LED light blinking and display, a cheap board (eg, Raspberry Pi, about USD25) is much preferred.

But if you want to learn software in general, qemu is definitely much faster, and it lets you see the internal of what is happening. Experimenting with hardware will require oscilloscope etc. But experiment with software will depends on the error output of what others has implemented in their software.

As for drivers development, first version should be rapidly developed on QEMU. But testing which naturally involved hardware, should be done on the hardware.

Bottomline is: x86 is so much faster, that cross-crompilation is always done on x86 before it gets booted on the ARM board. Compiling on the board is too time consuming, and sometimes it may involved considerable amount of storage space for development libraries and source codes.

迷爱 2024-12-02 01:04:06

QEMU + Buildroot 是 ARM 内核开发的绝佳组合

这是我的设置,支持(大部分)x86 和 ARM:https://github.com/cirosantilli/linux-kernel-module-cheat

内核、工具链、用户区和 QEMU 具有惊人的可移植性,从 x86 到 ARM 几乎是微不足道的。

实际上,您很少会接触 arch 细节,所以您不妨从 x86 开始。

我还没有玩过 ARM 设备,

QEMU + Buildroot is great combination for ARM kernel development

Here is my setup that supports (mostly) both x86 and ARM: https://github.com/cirosantilli/linux-kernel-module-cheat

The kernel, toolchain, userland and QEMU are amazingly portable, that going from x86 to ARM is almost trivial.

Actually, you will seldom touch arch specifics, so you might as well start with x86.

I haven't played with ARM devices yet, only x86, but I bet it will be equally easy (i.e. not trivial due to lack of tutorials, but doable).

叹倦 2024-12-02 01:04:06

我不久前使用 Qemu 为嵌入式编程课程开发设备驱动程序。效果很好。当时我们正在学习设备驱动程序编程,然后过渡到 Gumstix 板。我不记得我们使用的具体核心是什么,但 Qemu 运行良好。

我没有做过任何ARM开发,所以我不知道它是否是学习ARM的最佳选择。但如果您是驱动程序新手,这可能是一个不错的起点。

I used Qemu a while back to develop device drivers for an embedded programming class. It worked quite well. At the time we were learning device driver programming and then transitioning to Gumstix boards. I don't remember exactly what core we were using, but Qemu worked well.

I haven't done any ARM development, so I don't know if it is the best choice for learning ARM. But if you are new to drivers, it is probably a good place to start.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文