What is difference between arm64 and armhf?

LinuxArmDebianArm64

Linux Problem Overview


Raspberry Pi Type 3 has 64-bit CPU, but its architecture is not arm64 but armhf. What is the difference between arm64 and armhf?

Linux Solutions


Solution 1 - Linux

armhf stands for "arm hard float", and is the name given to a debian port for arm processors (armv7+) that have hardware floating point support.

On the beaglebone black, for example:

:~$ dpkg --print-architecture
armhf

Although other commands (such as uname -a or arch) will just show 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
...

The vfpv3 listed under Features is what refers to the floating point support.

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.

Solution 2 - Linux

Update: Yes, I understand that this answer does not explain the difference between arm64 and armhf. There is a great answer that does explain that on this page. This answer was intended to help set the asker on the right path, as they clearly had a misunderstanding about the capabilities of the Raspberry Pi at the time of asking.

Where are you seeing that the architecture is armhf? On my Raspberry Pi 3, I get:

$ uname -a
armv7l

Anyway, armv7 indicates that the system architecture is 32-bit. The first ARM architecture offering 64-bit support is armv8. See this table for reference.

You are correct that the CPU in the Raspberry Pi 3 is 64-bit, but the Raspbian OS has not yet been updated for a 64-bit device. 32-bit software can run on a 64-bit system (but not vice versa). This is why you're not seeing the architecture reported as 64-bit.

You can follow the GitHub issue for 64-bit support here, if you're interested.

Solution 3 - Linux

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfurushchevView Question on Stackoverflow
Solution 1 - Linuxargentum2fView Answer on Stackoverflow
Solution 2 - LinuxFrancesca NannizziView Answer on Stackoverflow
Solution 3 - LinuxEvan CView Answer on Stackoverflow