系统与基础设施jaycarlson.net编辑精选
如何构建一个嵌入式 Linux 系统
So you want to build an embedded Linux system?
2020 — 2024,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Jay Carlson 的长篇指南,讲如何从零搭建一个嵌入式 Linux 系统:从选型(带 DRAM 的 SiP、SoC、SoM 模块)到成本、内存、外设、启动流程和 Buildroot / Yocto(OpenEmbedded) 等构建系统的取舍,并附有大量具体芯片与价格对比。作者刻意聚焦便宜的入门级方案,读起来像一份十年经验的浓缩笔记。
为什么经久不衰:它把散落在论坛和厂商文档里的嵌入式 Linux 入门知识整理成一篇可长期参考的选型与上手手册,硬件价格和方案几经迭代仍不过时。
HN 评论精选
澄清 Yocto、Bitbake、OpenEmbedded、Poky 这几个常被混淆的名字各自的定位。
Yocto 恰恰相反。Buildroot 是 BusyBox/uClibc 那帮人搞出来的草根项目,而 Yocto 是由产业界资助、零件繁多的大项目。你会看到这套构建系统被叫作 Yocto、OpenEmbedded 和 Poky,我写文章前查了资料也没完全搞清它们的关系。简单说:Bitbake 是通用构建系统;OpenEmbedded 是社区维护的、与发行版无关的构建配方(recipe)集合;Poky 是 Yocto 组织用这些配方维护的参考发行版;而 Yocto 首先是一群人组成的组织。
nickysielicki查看英文原文
> Yocto is totally the opposite. Buildroot was created as a scrappy project by the BusyBox/uClibc folks. Yocto is a giant industry-sponsored project with tons of different moving parts. You will see this build system referred to as Yocto, OpenEmbedded, and Poky, and I did some reading before publishing this article because I never really understood the relationship. I think the first is the overall head project, the second is the set of base packages, and the third is the… nope, I still don’t know. Someone complain in the comments and clarify, please. Bitbake is the generic build system around which openembedded recipes (for particular packages) were implemented. Anyone could create a distro using those recipes, dates to the early to mid 2000s. Yocto was/is a project of the Linux Foundation, basically a working group, where they looked at the state of embedded linux and said, "We want to contribute to this project with documentation and more recipes", starting externally but with hopes to get it mainlined. Poky was/is their reference distro for this effort. Nowadays all the packages contributed by the Yocto project have been consolidated into openembedded, but poky remains the reference distro. tl;dr: Yocto is first and foremost an organization of people. Bitbake is the build system. OpenEmbedded is a community of distro-agnostic build system recipes. Poky is a distro maintained by the Yocto organization utilizing OpenEmbedded recipes.
高度赞赏,但提醒便宜的芯片(如全志)适合玩票,量产需考虑长期供货。
起立鼓掌!一篇文章装下了十年的知识量,以后同事朋友问我怎么入门,我就直接转这篇。我也理解作者为什么只关注便宜的入门级芯片——便宜又好玩;他也因此几乎略过了主流 SoM 模块(我几乎只用这些做设计),或许可以再补一篇更全面的评测。用来路不明的全志芯片确实很吸引人,但要做 5 年以上生命周期的量产,我不敢。
joezydeco查看英文原文
Standing ovation! This is a decade's worth of knowledge in a single article. I'll be forwarding this one to coworkers and acquaintances when they ask about how to do this kind of stuff. I can understand why the author focuses on cheap entry-level parts. It's cheap and it's fun. He also kind of dismisses the major SOMs for this reason so maybe there can be a more comprehensive review of those (I build almost exclusively with these), but that's probably out of his view. Going with a mystery AllWinner part is really compelling, but I can't go into production (with a 5+ year expected run lifetime) on that.
指出文中 MCU/MPU 定义不够严谨,用 MMU 来区分并不成立。
我对“微控制器 vs 微处理器:区别”那一节有疑问。微处理器只是 CPU,通常把系统总线引出;微控制器是集成系统,包含处理器以及固件存储和 RAM。通常可以靠引脚是地址/数据线还是类 GPIO 来区分。文中说“微处理器有内存管理单元”,可 8086 并没有。有没有 MMU 似乎和 MCU/MPU 的区分无关……至少我学到的是这样。难道这词也像 crypto 一样,在我没注意的时候变味了?
blueflow查看英文原文
I have issues with the section "Microcontroller vs Microprocessor: Differences" Microprocessors are just the CPU, usually with the system bus wired out. Microcontrollers are combined systems, which include a processor and usually some kind of firmware storage and RAM. You can usually differentiate them by whether their pins are address/data lines or gpio-like. > microprocessors have a memory management unit The 8086 didn't. Having an MMU seems unrelated to the MCU/MPU distinction... At least, this was my knowledge until now. Is this like "crypto" where the meaning changed while i was not paying attention?
推荐作者同系列的 1 美元 MCU 横评,可作延伸阅读。
Jay 几年前还写过一篇关于 1 美元微控制器的详细评测:https://jaycarlson.net/microcontrollers/ ,这篇嵌入式 Linux 文章是很好的续作。
cushychicken查看英文原文
Jay also did a great rundown of $1 microcontrollers a few years ago: https://jaycarlson.net/microcontrollers/ This embedded Linux article is a really worthy followup!
历次讨论
同类还值得读
TTY 揭秘(2008)
The TTY demystified (2008)
经典文章深入剖析了 Unix/Linux 中 TTY 子系统的工作原理,包括线路规程、终端驱动、信号与控制字符等机制。
系统与基础设施上首页 11 次 · 2009–2025linusakesson.net编辑精选为什么 GNU grep 这么快
Why GNU grep is Fast
FreeBSD 邮件列表上一篇广为流传的帖子,解释 GNU grep 为什么快:核心在于 Boyer-Moore 字符串搜索算法配合精心优化的内部循环和 I/O,让程序在搜索时“…
系统与基础设施上首页 9 次 · 2010–2022lists.freebsd.orgXplain:为普通人讲解 X11
Xplain – Explaining X11 for the rest of us
《Xplain》是作者(HN 用户 Jasper_)写的一系列 X11 长文,用他在浏览器中重建的 X11 绘图模型做交互演示,讲解 X11 的绘图模型与窗口系统设计。
系统与基础设施上首页 6 次 · 2013–2020magcius.github.io编辑精选旋风教程:为 Linux 创建极小 ELF 可执行文件(1999)
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux (1999)
breadbox 写于 1999 年的经典教程,主题是如何为 Linux 手工构造并裁剪出体积极小的 ELF 可执行文件。
系统与基础设施上首页 6 次 · 2007–2025muppetlabs.comPostgreSQL 内部原理
The internals of PostgreSQL
《The Internals of PostgreSQL》是一本免费在线书籍,系统讲解 PostgreSQL 的内部实现,包括查询处理、并发控制、WAL、缓冲区管理等核心机制。
系统与基础设施上首页 5 次 · 2017–2025interdb.jp编辑精选