树莓派Type 3采用64位CPU,但其架构不是arm64,而是armhf。 arm64和armhf有什么区别?


更新:是的,我知道这个答案并不能解释arm64和armhf之间的区别。在这个页面上有一个很好的答案可以解释这个问题。这个回答旨在帮助提问者走上正确的道路,因为他们在提问时显然对树莓派的功能有误解。

你在哪里看到了armhf的架构?在我的树莓派3上,我得到:

$ uname -a
armv7l

无论如何,armv7表明系统架构是32位的。第一个提供64位支持的ARM架构是armv8。参考这张表。

您说的没错,树莓派3的CPU是64位的,但是还没有针对64位设备更新树莓派操作系统。32位软件可以在64位系统上运行(反之则不行)。这就是为什么您没有看到报告为64位的体系结构。

如果你感兴趣,你可以关注GitHub的64位支持问题。


Armhf代表“arm硬浮点”,是一个debian端口的名字,用于支持硬件浮点数的arm处理器(armv7+)。

例如,在比格伯恩黑色上:

:~$ dpkg --print-architecture
armhf

虽然其他命令(如uname -a或arch)将只显示armv7l

:~$ cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 995.32
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls
...

特性下面列出的vfpv3是指浮点支持。

Incidentally, armhf, if your processor supports it, basically supersedes Raspbian, which if I understand correctly was mainly a rebuild of armhf with work arounds to deal with the lack of floating point support on the original raspberry pi's. Nowdays, of course, there's a whole ecosystem build up around Raspbian, so they're probably not going to abandon it. However, this is partly why the beaglebone runs straight debian, and that's ok even if you're used to Raspbian, unless you want some of the special included non-free software such as Mathematica.


It's important to realize which commands are reporting on your kernel software architecture and which refer to hardware. Until recently, Raspberry Pi did not write 64-bit OS releases, so the 64-bit hardware 3b+ for example, ran a 32-bit OS. This can lead to some confusion when you run commands to print architecture. Don't draw the wrong conclusion, though. You'll notice on the Raspberry Pi OS release page that the new 64-bit release is compatible with older Pi 3 hardware, which have 64-bit ARM processors.