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
  • 509
  • 2
  • 5
  • 15
  • Worth? Depends! If you want to roll your own kernel, then yes. Do you want to? – Fabian Jan 13 '18 at 17:12
  • @Fabian, if its needed/worth than - yes. But isn't the Raspbian 9.1 "ARMv8 -ready"? – madneon Jan 13 '18 at 17:18
  • 2
    Possible duplicate of [Raspberry Pi 3 and 64-bit kernel, differences between armv7 and armv8](https://raspberrypi.stackexchange.com/questions/49466/raspberry-pi-3-and-64-bit-kernel-differences-between-armv7-and-armv8) – Ciro Santilli OurBigBook.com Jul 28 '18 at 06: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,854
  • 10
  • 39
  • OpenGL doesn't provide hardware acceleration for 64-bit systems? Or is that only in the Pi? – JAB Jan 13 '18 at 20:04
  • @JAB my comment was specific to Pi 64-bit kernel status, although the problem is [rather unclear](https://github.com/bamarni/pi64/issues/37) at this time. Even on my system I can `modprobe vc4` and get 60+ fps glxgears, while Minecraft Java Edition is crawling. Also, gentoo-on-rpi3-64bit claims VC4 compatibility in its subject line. I've edited my post to remove mention of OpenGL until I have something more factual. – jdonald Jan 13 '18 at 20:31
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
  • 56,430
  • 17
  • 109
  • 217
  • So there is no other gain other that v8 is 64 bit (and can support 64b OS)? – madneon Jan 13 '18 at 18:34
  • Again, whatever benefit there is from running a 64-bit system would require software compiled to exploit it, starting with the kernel (since otherwise anything else will not work). So as far as I am aware, enabling this won't make any difference (and from the sound of things may create a problem). – goldilocks Jan 13 '18 at 18:40
  • Fedora is hardly obscure and has offered aarch64 on the RPi3 almost from the day the RPi3 hit the market. [Download here.](https://fedoraproject.org/wiki/Architectures/ARM/Raspberry_Pi#Raspberry_Pi_3_aarch64_support) @madneon – Michael Hampton Jan 14 '18 at 03:02
  • @MichaelHampton Thanks for the update -- Fedora is in fact my preferred distro, I use [the stock arm7](https://raspberrypi.stackexchange.com/q/27544/5538) on 2's & 3's. It is a bit odd I missed that though (the wiki says pi support in general has been around since v. 25, which would be closer to a year after the 3 was released). Anyway, edited. – goldilocks Jan 14 '18 at 11:05
  • Ah yes, right, there were 23 and 24 aarch64 builds but they were unofficial. – Michael Hampton Jan 14 '18 at 16:43
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