简体   繁体   English

嵌入式Linux适合初学者

[英]Embedded Linux for total beginner

I want to learn how to develop in embedded linux. 我想学习如何在嵌入式Linux中开发。 What materials should I need? 我需要什么材料? I don't have the actual embedded device so I plan to use some device emulator for the PC. 我没有实际的嵌入式设备,所以我打算为PC使用一些设备模拟器。 I want to know how to load the kernel and the filesystem in the device. 我想知道如何在设备中加载内核和文件系统。

Depending on the device you plan on using, you may be able to emulate it using QUEMU . 根据您计划使用的设备,您可以使用QUEMU进行模拟。

Even without a device, you could probably get started by reading through some of the articles on http://www.linuxfordevices.com . 即使没有设备,也可以通过阅读http://www.linuxfordevices.com上的一些文章开始。

A good starting point may be The Embedded Linux Overview Quick Reference Guide . 一个很好的起点可能是“嵌入式Linux概述快速参考指南”

You might want to check out http://www.linuxfromscratch.org/ 您可以查看http://www.linuxfromscratch.org/
Most standard linux distros are intended for full-blown desktops. 大多数标准的Linux发行版都适用于成熟的桌面。 The "linux from scratch" approach is ideal for embedded platforms, since you can create bare-bones kernels that can be fit into very small memory footprints. “linux from scratch”方法非常适合嵌入式平台,因为您可以创建可以适应非常小的内存占用空间的简单内核。

It's fairly common for embedded single board computers to have at least one RS-232 serial port and at least one ethernet interface, and a boot loader stored in flash. 嵌入式单板计算机至少具有一个RS-232串行端口和至少一个以太网接口,以及存储在闪存中的引导加载程序是相当普遍的。 The bootloader will often let you use the serial port to configure one of several boot options, such as boot from on-board flash, possibly from SD or USB flash, or use TFTP over ethernet, or sometimes even through the serial port itself. 引导加载程序通常允许您使用串行端口配置多个引导选项之一,例如从板载闪存引导,可能从SD或USB闪存引导,或使用以太网上的TFTP,有时甚至通过串行端口本身。

The device manufacturer should provide some sort of SDK, development environment, or at least some documentation for loading an OS on the device. 设备制造商应提供某种SDK,开发环境或至少一些用于在设备上加载OS的文档。

You'll need some sort of cross-compiler and linker to create executables for the device. 您需要某种交叉编译器和链接器来为设备创建可执行文件。 A remote debugger would be nice, but may not be available. 远程调试器会很好,但可能无法使用。

An emulator or simulator that runs on your workstation would be very, very helpful. 在您的工作站上运行的模拟器或模拟器将非常非常有用。

You'll need whatever hardware is needed to move data and executables to and from the device. 您需要使用任何硬件来将数据和可执行文件移入和移出设备。 This may be Ethernet, RS-232, wi-fi, Bluetooth, USB, optical, eprom burner, or something weird. 这可能是以太网,RS-232,Wi-Fi,蓝牙,USB,光学,eprom刻录机或奇怪的东西。

Without more information about exactly what kind of device you are targeting, there is not much more to suggest. 如果没有关于您所针对的设备类型的更多信息,则无需提供更多建议。

If you want to work on a real board instead of emulator, you can try some popular development board such the beagle board. 如果你想在真正的主板而不是模拟器上工作,你可以尝试一些流行的开发板,如beagle板。 Download a kernel source tree and make your own build, and then flash the bootloader and kernel images onto the board. 下载内核源代码树并进行自己的构建,然后将引导加载程序和内核映像刷新到板上。

Many of the more commonly used boards use flash memory for "disk" storage. 许多较常用的电路板使用闪存进行“磁盘”存储。 Learning how to create and manipulate bootable images, including multiple partition disk images, will be one of those things you'll learn along the way. 学习如何创建和操作可启动映像(包括多个分区磁盘映像)将是您在此过程中学习的内容之一。

As an earlier poster responded, you really need to decide which device you want to target, and that means deciding the applications you're intending to develop. 正如之前的海报所做的那样,您确实需要决定要定位哪个设备,这意味着要决定您打算开发的应用程序。

Not that you asked for a recommendation, but the ALIX boards from pcengines are widely available, reasonably priced, and relatively simple to get started with. 并不是你要求推荐,但是pcengines的ALIX板可以广泛使用,价格合理,开始时相对简单。

I suggest try from the basics and then move up. 我建议尝试从基础知识然后向上移动。 Try Cross Linux from Scratch http://www.linuxfromscratch.org/clfs/view/clfs-2.0/arm/ ? 从Scratch尝试Cross Linux http://www.linuxfromscratch.org/clfs/view/clfs-2.0/arm/

Another good starting point, to get familiar with embedded Linux: www.embedded.org . 另一个好的起点,熟悉嵌入式Linux: www.embedded.org You'll find a good intro there. 你会在那里找到一个很好的介绍。 I'm trying to get myself familiar with embedded Linux as well and this 7 part intro gave me more insight in the differences, how it works, and how to get started. 我也想让自己熟悉嵌入式Linux,这个7部分的介绍让我对差异,工作原理以及如何开始有了更深入的了解。

If you want to quickly start with something, I suggest to use QEMU and Angstrom precompiled packages. 如果你想快速开始,我建议使用QEMU和Angstrom预编译包。 You can try this tutorial: running-qt4-examples-on-embedded-linux 您可以尝试本教程: running-qt4-examples-on-embedded-linux

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

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