Raspberry Pi 内存限制并不是什么大问题,坦率地说Raspberry Pi RAM Restrictions No Big Deal, Frankly


AI free token/AI免费积分

折腾 Raspberry Pi 板子的内部构造是我最喜欢的话题之一。我对这些可爱的小板子知道不少冷门知识。三年前,我报道过 Raspberry Pi 4 升级内存的故事。搞一颗 BGA 内存芯片然后换上去,对我来说似乎是理所当然的事——尽管其中有诸多不确定因素,你懂的。看到黑客们成功实现,而且运行得还不错,那真是件乐事!

情况变了。现在你真的买不到内存芯片,也买不到内存条,甚至带内存芯片的 SSD 也买不到。除非你知道去哪儿找,否则连 Raspberry Pi 板子都很难买到。这正是 [Jeff Geerling] 最近一段三分钟视频所触及的背景。

原来,Raspberry Pi 基金会通过二进制 blob 引导加载程序更新,限制了用户升级内存的能力。我去年就从传闻中听说了这件事,但不知怎的,当我读到它时,我一点也不在意。甚至没到要写 Hackaday 文章的地步,更别说公开讨论了。为什么我没觉得这是什么大事?今天我坐下来想了想。

我的结论是:我认为这根本不算什么大事,尽管似乎很多人会不同意。请随意看看,希望你觉得我对这件事的思考有点意思。

它是怎么实现的

首先,说一些基本事实。这项改动限制了你在 Pi 4、Pi 5 以及 Compute Modules 上升级内存芯片。从措辞来看,它并不限制用同容量芯片替换原有内存芯片,也就是“将设备锁定在原始内存容量”。因此,它并不会阻止你维修 Raspberry Pi 板子,最多只是对维修时可选的芯片有些限制。

这个限制很容易绕过。引导加载程序储存在 SPI 闪存芯片里,可以通过内置的 mask ROM 用 USB 和 rpiboot 重新烧录,而且目前你仍然可以刷入旧版引导加载程序。这意味着,即使手动更换了内存芯片,你只需要把引导加载程序降级到已知的最后一个正常版本——2024-09-10——然后你的 Pi 板子或 Compute Module 就能以升级后的内存正常运行。既然你有能力升级内存,你肯定也有能力降级 Raspberry Pi 的引导加载程序。

对于大多数日常使用来说,使用两年前的引导加载程序版本其实没什么影响。自 2024-09-10 以来已经发布了大约 15 个版本,我专门去读了一遍更新说明。快速检查下来,NVMe 启动这类重要功能在这个版本之前就已经可用了,可能你只会错过几个生活质量修复或者更冷门的硬件配置问题,仅此而已。希望我没有漏掉什么,如果有请指出来。顺便说一句,2024-09-23 版本的更新说明根本没有提到新增了内存容量检查,也许他们应该补上这一点。

有趣的是,我查看了一些反馈,发现板子在较新的引导加载程序下(大多是 2025 版本)似乎可以正常启动和运行,而在另一些情况下(大多是但并非总是 2026 版本)会直接无法启动,并报 8 或 9 的闪存故障代码。我还没仔细比较具体原因,所以可能你其实没那么迫切需要降级引导加载程序——不过我还是会先用已知最早的稳定版本。

事情是怎么发生的

这是我提不起劲来关注这件事的第一个原因。如果你能升级内存,你就能降级引导加载程序。不过,争议点在于——这个改动真的有必要吗?

作为参考,这次引导加载程序改动大约发生在整整两年前,也就是 2024 年 9 月 10 日到 9 月 23 日之间的某个时间点。正好是我们首次报道 Raspberry Pi 内存升级的一年半之后。发生了什么变化?Raspberry Pi 内存限制并不是什么大问题,坦率地说

Raspberry Pi 基金会(RPF)给出了如下解释:他们发现第三方卖家采购低内存容量的 Compute Module,用来源不明、稳定性未知的内存进行升级。我观察到,这些卖家还会加价出售这些模块以牟取商业利益,同时挤压 RPF 本可以投入到研发的资金,而我非常喜欢看到他们把资金用于研发。这给在网上购买 Raspberry Pi 板子的用户带来了扭曲的激励和风险,RPF 决定主要为了用户利益限制这种做法——在我看来,也有部分是为了他们自己的利益。

这个解释是真的吗?我无法确知,但我去查了一下相关迹象,发现这种未经同意的内存掉包行为似乎到处都在发生!相关的 GitHub issue 里有大量引用,稍微深入看看就觉得问题很严重。

粗略地花了 15 到 20 分钟查看,仅 GitHub 上我就轻易找到了十五个不同的人抱怨这种故障。[(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15)] 就热门硬件的故障模式而言,这个数字相当惊人,表明至少有数百名黑客和爱好者受到影响,甚至可能更多。他们看起来都不是自己动手用热风和焊锡升级内存的 Hackaday 方式——他们都只是从 Aliexpress 或 Amazon 买了所谓“8 GB”版本。至少在一个案例中,卖家立刻向买家撒谎,完全不承认进行了升级,尽管显然已经升级过了。

为什么这样做是合理的

这似乎与 RPF 所说的情况完全吻合。我很能理解他们为什么会担心。例如——如果他们没记错的话,当时 CM5 或 CM4 的 2 GB 版本售价在 30 到 40 美元左右,8 GB 版本大约 100 美元,4 GB 版本则介于两者之间。就黑客小工具和准工业硬件的交集而言,这个价格已经相当公道。

到了这一步,我们讨论的已经不是人们为了好玩给自己的板子升级内存了——而且记住,你仍然可以这么做。相反,这是某些人用 20 分钟热风枪工作就能攫取的相当可观的利润,而他们并没有做过 RPF 投入的任何研发。我个人更愿意看到这部分利润归 RPF,也希望他们不用为这些麻烦事头疼。

放任这种掉包生意不受限制,会形成极具腐蚀性的激励。首先,给那些板子装上劣质或拆机芯片的人完全不用承担后果。RPF 作为一家经验丰富的硬件公司,当然知道采购拆机或来源可疑的内存和其他芯片是怎么回事。而 Amazon/Aliexpress 上的第三方把这些芯片不声不响地卖给缺乏经验的终端用户,这远超一般的拆机芯片恐怖故事。它变成了一场“用户会不会注意到异常并及时找卖家退货”的赌局,而在 100 到 200 美元的价位,加上这些价位通常要求的寄回商品,答案往往是“不会”。现在,买家几乎立刻就能发现被篡改,因为 Raspberry Pi 板子会自动更新固件。

如果你还不认为这本身具有腐蚀性——请注意这种“升级”过的板子显然要求卖家虚假宣传自己卖的东西?你在商品详情里找不到这个“升级”的信息,不会有“8GB 翻新改装”的标签,因为那样显然需要降价或压缩利润。正如没有动力使用全新内存芯片而不是拆机芯片一样,公开改装信息也毫无动力。这样卖一支笔都不合适,更别说卖一台完整电脑了。

RPF 的行事方式

最让我困惑的是这一点。我看到 [Jeff] 和其他人说这不像 RPF 会做的事。在我看来,这完全不成立?我不记得 Raspberry Pi 曾经在任何法律或竞争问题出现时,还努力让用户自由折腾板子本身。

Raspberry Pi 在 Pi Camera v2 及以后的摄像头板上放了加密 EEPROM,以遏制 v1 时代泛滥且廉价的克隆摄像头,我自己至少有五个不同形态的克隆版。我不喜欢这样,但至少 Compute Module 版本的 authenticity 检查是禁用的,如果我没记错的话。他们仍然不销售 MLX7704 PMIC,这个芯片在你不小心把 GPIO 排针的 5 V 和 3.3 V 短路时会立刻烧毁,而这两根公头针就在板子边缘,非常容易同时从三个方向短接。

Raspberry Pi 自 2013 年以来只发布“精简版”原理图,而且 Pi 5 的原理图至今没有发布。Pi 4 USB-C 问题的修复原理图他们也承诺过发布,但同样没有兑现。现代 Raspberry Pi 板子上一半芯片都是单一来源且板子专用的,前面提到的 PMIC 就是个典型例子。Raspberry Pi 板子搭载的是闭源软件,从引导加载程序到驱动 CPU 的 GPU 代码,再到迄今用过的所有板载无线芯片,当你把板子推到极限时,这会带来实实在在的问题。JTAG 端口一直都被锁死,连引导加载程序都是加密签名的——别想着把内存检查代码 patch 掉,提前告诉你。

我还没列完 Raspberry Pi 阻止或与低级别硬件折腾作对的方式,如果现在愿意仔细查证,我至少还能再列出五项。重点是,如果谁当初是为了低级别硬件可折腾性而选择 Raspberry Pi,那早就有一堆理由该另寻他处了。这从来不是它的优势。

我认为人们内心深处其实根本不指望 Raspberry Pi 提供低级别硬件折腾空间,即使他们嘴上可能这么说——因为这基本上从来没真正实现过。你没法真正指望一个几乎从未存在过的东西。相比之下,市面上有不少竞品会发布完整板级原理图,有时甚至发布 gerber 文件,尽可能使用开源代码,不签名引导加载程序,等等。按这些标准,Raspberry Pi 不是开放或可折腾的硬件,而且从来都不是。它与其说是一块可折腾的硬件,不如说是为黑客设计的硬件,这显然是两回事。

我们是怎么走到这一步的

实际上,人们选择 Raspberry Pi 显然是因为它拥有数百万用户的社区、经过细致探索和记录的硬件、无可匹敌的板子和软件可获得性、几乎对每个小问题都有解决方案、RPF 每年持续试验并发布酷炫新硬件的能力,以及他们在过程中创造的新标准。大多数低级别问题都被规模效应掩盖了——比如去年 [Jonathan Clark] 逆向工程了 Raspberry Pi Zero 2 W,然后 [TubeTime] 又逆向工程了 Compute Module 5,多酷啊!

我可以同意 [Jeff Geerling] 的观点,即它本可以采用类似“保修位”的机制,但实际上,引导加载程序降级并不是什么太重的代价,而且“板子自动更新固件,下次启动就失败”是一个强烈得多的信号,提醒你应该赶紧去退货。如果你说“嘿,这板子一拿到手就坏了”,退款也会更容易拿到,说不定你还能退款成功并留下这块板子,然后降级固件继续使用!双赢,卖家卖 shady 板子的如意算盘落空,而你免费得到一块也许还能用的 shady 板子。要不是内存短缺,我们甚至可能根本不会讨论内存替换限制,而这一点无论如何都不是 RPF 的错。

我的建议是:不必为 Raspberry Pi 内存升级哀叹,尤其是因为现在只是稍微麻烦了一点而已。真正亲手升级过的黑客寥寥无几,主要受众结果变成了网上的不良硬件经销商,而且在大多数情况下,维修似乎也根本没有受到阻碍。

想想那些不会再被 Amazon 上 shady 卖家欺骗的用户,尤其是在板子改装和复用拆机内存芯片的扭曲激励达到顶峰的当下。内存短缺可能让任何与内存相关的话题都比平时更让人刺痛,这在我看来很可能是我们直到 2026 年而不是 2025 年还在讨论此事的最主要原因,但这项改动在实践中更可能帮助到黑客,而不是伤害他们。

Hacking on Raspberry Pi board internals is one of my favourite topics. I know a bunch of obscure things about these cute little boards. Three years ago, I covered a Raspberry Pi 4 RAM upgrade story. Getting a BGA RAM chip and swapping it in seemed like a no-brainer to me – apart from all the numerous uncertain parts about it, you know. It was a joy to see hackers pull it off, and for it to function as well as it did!

Things changed. You can’t really get RAM chips anymore. You also can’t get RAM sticks. You can’t get even SSDs with RAM chips on them. Even getting Raspberry Pi boards can be hard unless you know where to look. This is where a recent three-minute video by [Jeff Geerling] finds us.

Turns out, Raspberry Pi Foundation pushed binary-blob bootloader changes that limit your ability to upgrade RAM. I’ve known about it since last year through the grapevine, and somehow, as I read about it, this didn’t bother me at all. Not enough to write a Hackaday article about it, even, much less talk about it more widely. Why didn’t it bother me? Today, I sat down and pondered this for a bit.

Here’s my conclusion: I don’t think it’s a big deal at all, even if it seems that many people would disagree. Come in, as you are, and I hope you find my thoughts on the situation entertaining.

How It’s Made

First, some ground facts. This change restricts upgrading the RAM chip on your Pi 4 and Pi 5, as well as Compute Modules. By the looks of it, it does not restrict replacing the RAM chip with a chip of a similar size, quote, “locking devices to their original RAM size”. As such, this does not prevent repair of your Raspberry Pi board, but does somewhat limit your repair part choice, at most.

This restriction is easily bypassable. The bootloader is stored in the SPI flash chip, which can be reflashed using the built-in mask ROM over USB and rpiboot, and you are not prevented from flashing older versions of the bootloader, so far. This means even if you manually swap the RAM chip, all you need to do is to also downgrade the bootloader to the last known good release — 2024-09-10 — and then your Pi board or Compute Module will function with upgraded RAM. If you have the skills to upgrade your RAM, you most certainly have the skills to downgrade the Raspberry Pi bootloader.

For most regular use, having a two-year old bootloader version won’t really matter. There have been about 15 releases since the 2024-09-10 one, so I went and read through the patchnotes. Checking quickly, the important features like NVMe boot have been available for a fair bit before this release, maybe you will miss out on a few quality of life fixes or more obscure hardware configuration problems, but that’s it. Hopefully I’m not missing something, please point it out if I am. You know what is an issue, by the way? The patch notes for the 2024-09-23 release don’t mention the RAM size check addition at all, maybe they should fix that.

What’s funny is, I am checking reports and it seems that the board will boot and function well with newer bootloaders (mostly 2025 versions), and in other cases (mostly but not always 2026 bootloader versions) it will outright refuse to boot with a 8 or 9 flash failure code. I haven’t compared details on what exactly might be causing this yet, but it might be that you don’t even need to downgrade bootloader all that badly – though I’d definitely start with the oldest known-good release.

How It Happened

This is the first reason I can’t bring myself to care. If you can upgrade your RAM, you can downgrade the bootloader. However, here’s the point of contention – did this change really need to happen?

Raspberry Pi RAM Restrictions No Big Deal, FranklyFor the reference, this bootloader change happened almost exactly two years ago, at some point between September 10 and September 23, 2024. This was exactly a year and a half after we covered the first Raspberry Pi RAM upgrade. What changed?

The Raspberry Pi Foundation (RPF) justifies this as follows: they saw third-party resellers sourcing low-RAM Compute Modules, upgrading them with RAM from unknown source and unknown stability. My observation is that they’d also be reselling the modules at a markup for purely commercial gain, while undercutting RPF who would otherwise direct that money into RnD, something I much enjoy to see them do. This creates perverse incentives and risk for people buying Raspberry Pi boards online, and RPF decided to limit this primarily for their users’ benefit, plus, if you ask me, some of theirs.

Is this justification true? I can’t know, but I went to check for signs of this happening, and the non-consensual RAM switcheroos seems to be happening all over the place! The related GitHub issues have a fair few pingbacks, and exploring them makes the problem look grim to me.

Off the cuff, I spent 15-20 minutes checking, and I can easily find fifteen different people on GitHub alone complaining about this failure. [(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15)] As far as failure modes in popular hardware go, this is a surprisingly large number that suggests at least hundreds of hackers and hobbyists affected, if not more. None of them appear to have performed the upgrade themselves, hot air and flux way, the Hackaday way – all of them seemingly simply bought a “8 GB” version from either Aliexpress or Amazon. In at least one case, the seller immediately lied to the buyer about the issue and did not at all admit that an upgrade took place, even though it clearly did.

How It Makes Sense

This seems to map exactly to what RPF says happened. I can very much see why they would be worried. For instance – at the time they made this change, if my memory isn’t failing me, CM5 or CM4 2 GB boards went for $30-$40, 8 GB boards went for $100ish, and 4 GB boards were somewhere inbetween. As far as the intersection of hacker gadgets and industrial-lite hardware goes, that price is more than fair.

At this point, we’re no longer talking about people upgrading RAM on their boards for fun, and remember, you can still do all of that. Instead, that’s a fair bit of margin for someone to grab for 20 minutes of hot air work, someone who hasn’t done any of the RnD that RPF has put in. I personally much rather would see that margin go to RPF, and I’d like to have them deal with none of the headache, too.

Creating incentives for this kind of switcheroo business, unimpeded, seems deeply corrosive to me. For one, there’s zero repercussions for someone equipping those boards with substandard and harvested chips. RPF, as any experienced hardware company, would know about sourcing harvested or otherwise shady-origin RAM and other chips. A third party on Amazon/Aliexpress passing on those chips undisclosed to unqualified end users, now that goes far beyond the usual harvested chip horror stories. It turns into a game of “will/won’t the user notice the weirdness and ask the seller for a refund on time”, and at $100-$200, together with the ship-item-back requirement these prices bring, the answer will generally be “no”. Now, the buyer finds out about the tampering almost immediately, since Raspberry Pi boards auto-update the firmware.

If you don’t agree that this alone is corrosive – notice how this kind of “upgraded” board clearly requires sellers to misrepresent what they’re selling? You’re not going to find about this “upgrade” in the listing, there won’t be a “8GB reworked” label, clearly that would require lowering the price and/or cutting into the margins. Just like there’s no incentive for using a fresh RAM chip instead of a harvested one, there’s also zero incentive to be open about the mod. That’s no way to sell a pen, much less a full computer.

How RPF Does Things

Here’s the most confusing part to me. I’m seeing [Jeff] and others say that this is out of character for RPF to do. This does not seem true to me, at all? I don’t recall a time when Raspberry Pi has put effort into giving users freedom to hack on the board itself as soon as any sort of legal or competition issue arose.

Raspberry Pi puts cryptographic EEPROMs on Pi Camera boards, v2 and beyond, to thwart clone cameras that became so prolific and cheap with v1, I own at least five of those clones in different form-factors. I don’t like it, but at least the authenticity checks are disabled for Compute Module versions, as far as I remember. They still don’t sell the MLX7704 PMIC that immediately dies if you accidentally short-circuit GPIO header 5 V to 3.3 V, two male pins that are right on the side of the board and exceptionally easy to short-circuit from three sides simultaneously.

Raspberry Pi only ever publishes “reduced” schematics, ever since 2013, and they haven’t even released those for Pi 5. Neither have they published Pi 4 USB-C issue fix schematics despite having promised to do so. Half of the chips on a modern Raspberry Pi board are single-source and board-specific, the aforementioned PMIC being a fun example. Raspberry Pi boards ship closed-source software, from the bootloader to the GPU code whipping the CPU, to all the onboard wireless chips they have used so far, and this brings real issues you’ll stumble upon as you push the limits. The JTAG port has always been locked down, and even the bootloader is cryptographically signed – no patching out the RAM check code, sorry to spoil it.

I’m far from done listing ways in which Raspberry Pi prevents or works against low-level board tinkering, there’s at least five more things I could list from memory if I were bothered to check them thoroughly enough right now. Point is, if anyone came to Raspberry Pi for the low-level hackability of the hardware, there was never a shortage of reasons to look elsewhere. That was never the upside.

I don’t think low-level board hackery is what people genuinely expect from Raspberry Pi at all, even if they might say that they do – because it was never really there. You can’t genuinely expect something that was barely ever present. In contrast, there’s plenty of competition that publishes full board schematics, sometimes even gerbers, uses as much open code as possible, doesn’t sign bootloaders, and so on. Raspberry Pi is not open or hackable hardware by those metrics, and it never was. It’s not hackable hardware anywhere as much as it’s hardware made for hackers to use, and there’s clearly a big difference.

How Did We Get Here?

In practice, people clearly come to Raspberry Pi because of their community in the millions, meticulously explored and documented hardware, unmatched availability of boards and software alike, having solutions for nigh every little niggle and nitpick, RPF’s ability to experiment and release new cool hardware year after year, and even new standards they create along the way. Most of low-level problems get papered over through sheer scale – say, last year [Jonathan Clark] reverse-engineered the Raspberry Pi Zero 2 W, and then [TubeTime] reverse-engineered the Compute Module 5, how cool is that?

I could agree with [Jeff Geerling] that it could instead benefit from a “warranty bit” type of mechanism, but really, the bootloader downgrade isn’t that hard of a penalty, and “board autoupdates firmware, fails on next boot” is a much stronger indicator that you should go get a refund at haste. A refund is also way easier to get if you say “hey, the board stopped working immediately”, and who knows, maybe you’ll get a refund and get to keep the board so that you can downgrade its firmware and still use it! Win-win, seller loses out on selling you a shady board, and you get a shady board that might just work, for free. Chances are, we wouldn’t even be talking about the RAM swap restrictions if it weren’t for the RAM shortage, and that is not RPF’s fault at all whatsoever.

My advice: don’t lament Raspberry Pi RAM upgrades, especially given they’re only slightly harder to perform now. Very few hackers ever performed them, the main audience for them turned out to be dodgy hardware resellers online, and in most cases, repair doesn’t seem to be impeded at all, either.

Think of the users that will no longer be fooled by a shady seller on Amazon, especially now that the perverse incentives for board mods and reusing harvested RAM chips are at their highest. RAM shortages might make any RAM topic hurt deeper than usual, which to me is the most likely reason we’re discussing this in 2026 instead of 2025, but this change is far more likely to help a hacker in practice, than it is to hurt.

本文来源:https://hackaday.com/2026/09/22/raspberry-pi-ram-restrictions-no-big-deal-frankly/
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry