15

According to this article I should be able to switch to ARMv8 on my Raspberry Pi Model 3B, but I'm getting "rainbow screen" after adding to config.txt the line:

arm_control=0x200
  • Why is it not working?
  • Is it even worth switching from ARMv7 to ARMv8 (taking into account I'm willing to compile some C++ programs in the future).

I'm using Raspbian 9.1 "stretch" and /prc/cpuinfo reports "ARMv7 Processor rev 4 (v7l)".

madneon
  • 529
  • 2
  • 5
  • 16

4 Answers4

10

I think others here have done a good job answering:

Is it even worth switching from ARMv7 to ARMv8

Various software cited to require ARMv8 includes CockroachDB, MongoDB (if accessing >2 GB), the Dolphin emulator, and OpenMW. However, likewise you'll lose out on other features or programs that may be less-supported with a 64-bit kernel (e.g. gaming with brcmEGL + dispmanx).

arm_control=0x200

Why is it not working?

It seems you've skipped the key step of actually copying in the 64-bit kernel and its modules. That eLinux article may also be out-of-date as the default Raspbian Stretch bootloader will automatically boot kernel8.img if present.

If you aren't building a 64-bit kernel from source, you can download a working version from the original author of this article, here on GitHub (Pi 3B only). His image is based on Debian arm64, and if you intend to use this kernel with Raspbian make sure to copy in /boot/{kernel8.img,*.dtb,overlays,config.txt,cmdline.txt} and /lib/modules/ from the Pi64 image. You may also download and install such pre-configured Raspbian images:

Back to part of your other question:

(taking into account I'm willing to compile some C++ programs in the future).

If it's your intent to use your Pi 3 to develop and test both armhf and arm64 applications, you might as well run Pi64 directly. Unlike Raspbian, it has support for MultiArch and thus doesn't require running 64-bit containers. Outside of the Raspbian/Debian ecosystem, other 64-bit distros include Ubuntu Server, Gentoo, openSUSE, and Fedora (see others' comments).

jdonald
  • 2,972
  • 14
  • 39
8

Is it even worth switching from ARMv7 to ARMv8?

Not unless you are running a kernel and OS userland compiled for ARMv8; there are at least a few such things for the Pi 3 around, including Fedora. For some hints about why there still isn't a special version of Raspbian, see here:

Raspbian moving to 64-bit mode

Otherwise, I think the only relevance is in what the processor reports itself as, which can be found via /proc/cpuinfo. Some people use this as a means of telling one model of pi from another, although the practice is obviously not widespread. Put another way, unless you know of a reason to do so, there isn't one.

goldilocks
  • 60,325
  • 17
  • 117
  • 234
3

As of today, it seems Fedora and Archlinux are well supported.

If you go the Arch way, this will help you build the image (for me on linux / rpi3 it was make linux) and this will help you start wifi.

In case you need to be sure which raspberry you have, use this guide.

Also arm_control=0x200 is deprecated and arm_64bit should be used instead in /boot/config.txt.

1

Is it even worth switching from ARMv7 to ARMv8

I've just been looking into this. I benchmarked some programs and one saw a substantial performance increase. Digger deeper it turns out to be because ARMv8 adds a new instruction for integer division that is substantially faster than the traditional assembly routine.

So there's at least one reason to upgrade to v8!

Otherwise, I must confess, ARMv8 looks almost identical to ARMv7.

EDIT: I tell a lie. Turns out I am talking about AArch32 when the 64-bit mode has AArch64 which is a substantially different instruction set according to this great presentation.

J D
  • 111
  • 4