4

I've switched my Raspberry Pi 4 from 32 bit to 64 bit (Raspbian buster) by adding this to /boot/config.txt

kernel=kernel8.img
arm_64bit=1

This seems to work fine. I'm running docker and that has continued to work.

However, as a person coming from the desktop world, I'm used to explicitly running 32 or 64 bit programs.

Do I need to do anything to install and/or run programs in 64 bit mode?

Should reinstall programs like docker or stuff installed with apt?

  • 1
    You can't. The Raspbian userland is still 32-bit; a 64-bit kernel is compatible with that. – goldilocks Nov 10 '19 at 16:41
  • 3
    by the way, you only need arm_64bit=1 if you use the standard kernel8.img kernel – Jaromanda X Nov 11 '19 at 2:07
2

I have not tried any of this myself, but this is how I would do it. Make sure to have backups and be ready to roll back if something goes wrong.

First, add the Debian repo to your sources.list:

deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main

deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main

deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main

Then add the arm64 architecture and update the package list

sudo dpkg --add-architecture arm64 
sudo apt update
# don't upgrade

Note that it's not recommended to upgrade while you have Debian repos as sources. I got weird issues after such an upgrade, and since quite a few Raspbian packages got replaced by Debian counterparts, I wasn't inclined to track down those issues.

Finally, install an arm64 program:

sudo apt install firefox:arm64

This will pull a lot of dependencies including the most basic ones like libc, since the rest of your system is 32-bit. Then you should be able to run your 64-bit software alongside the rest of your 32-bit userland. If you have the same program in 32 and 64 bits, you'll have to find out where the 64-bit version is installed, my guess would be /usr/lib/aarch64-linux-gnu/bin/, /usr/aarch64-linux-gnu/bin/, /usr/bin/aarch64-linux-gnu/, or something along these lines.

Note: you may already know, but Ubuntu supports RPi and is known to run 64-bit binaries.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.