Install 64 OS on Raspberry Pi zero 2 - Q-engineering
Q-engineering
Q-engineering
Go to content
images/empty-GT_imagea-1-.png
64-bit OS Raspberry Pi 4

Install 64 bit OS on Raspberry Pi zero 2 W

64-OS RPi 3 + 4
Last updated: November 23, 2021

Introduction.

If you want to install a 64-bit operating system on the new Raspberry Pi Zero 2 W, you are facing some problems. At the release time of the latest 64 bit RPi OS, the RPi Zero 2 was in development. No wonder it missses some files. This guide will help you install the 64-bit operating system on Raspberry Pi Zero 2. No doubt, the Raspberry Foundation will update the 64 OS soon, making the installation as smooth as ever.

Some people are concerned about the remarks 'unstable' and 'beta version'. For those, don't worry. We have used the 64 bit OS now for more than a year in different settings. Not one problem. The only part missing is the Userland video engine necessary for the Raspistill and Raspivid apps. On the other hand, there are many solutions to take pictures and videos, like GStreamer or FFmpeg.
On the other hand.....
Warnings.
  • The 1 GHz RPi zero 2 is not a 1.4 GHz RPi 3B+, let alone an RPi 4. Temper your performance expectations.
  • The memory is of type DDR 2, not the fast DDR4 found on the RPi 4. The transfers rate between CPU and RAM will be lower.
  • Most 64-bit apps expect a lot of memory, not just 512 MByte.
  • You can expand the memory by swapping only for a very brief period. Otherwise, it will wear your SD card in no time.
  • Chromium, Firefox, motionEye will not work on the 64-bit OS. They fall in an endless loop during graphics output.

Tip.

noneThe installation of the 64-bit Raspberry Pi operating system on a Raspberry Pi Zero 2 is somewhat cumbersome as you will see in this article. That's why we have placed a SD image our GitHub page.
Download the zip file from our GDrive site, unzip and flash the image on a 16 GB SD-card, and enjoy!

Bullseye.

On November 8, 2021, the Raspberry Foundation has released the new Debian 11 version: Bullseye.
There are some major changes and improvements. You can read all about it in this article.

One of the most important changes is the new camera driver. Bullseye uses the standard Linux libcamera API and has dropped the previous Userland video engine. It means that any camera software ever written for the 'old' Raspberry Pi Buster OS will most likely stop working! In due course, most software will undoubtedly be ported to libcamera. It's early days, though, and if you have any software that uses the camera, consider using the previous Buster version for now.

Another significant thing to know is the complete removal of Python2. The transition from Python2 to Python3 has been going on for a while now. But now Raspberry Pi, like Ubuntu 20.04, has also depreciated Pyhton2. Meaning, for instance, you cannot pip install anymore. You have to use pip3 install from now on. Not a big deal. However, if you have a lot of software written exclusively in Python2, you may still want use the Buster version.

A minor point to mention is the swapping. If you need to enlarge the swap space temporarily, it will take several minutes to take effect. Staring for a nerve-wracking 6 minutes to a blank screen during a reboot is not user friendly. We have posted an issue rapport at Raspberry GitHub. Hopefully, it's solved soon.

Last, Python3 is upgraded to version 3.9. Keep in mind when selecting the proper installation wheel for TensorFlow or PyTorch.

If you want to use the Debian 10 version, you can find the old Buster.zip file here.

none

Download.

The first step in installing a 64-bit OS on your Raspberry Pi 4 is to download the new Raspberry Pi Image Tool from this site. The Image Tool can write an operating system of your choice on an SD card. At the same time, it will format the card into the correct ext4 for the Raspberry Pi, even a 64, 128 or 256 GByte card. Different image formats are supported, making this tool a better alternative to balena Etcher.

The second step is downloading the correct 64-bit OS for your Raspberry Pi 4. At the moment, the latest version is the 2021-11-08-raspios-bullseye-arm64 version. You can download the new Bullseye.zip file here.

The slideshow below shows the ease of the entire image writing process.
  1. Select the operating system dialogue.
  2. In the drop-down list select the custom option
  3. Find the 2021-05-07-raspios-buster-arm64.zip you just downloaded.
  4. Select the SD card.
  5. Here, we used a 64 Gbyte SD card.
  6. Start the erase, format and writing activities in one go.
  7. You can follow the progress.
  8. Succes.

Device tree blob.

After writing your 64-bit image, you have to copy and rename a file in the boot partition. There is no special *.dtb, a device tree blob file, for the RPi Zero 2.
However, the new Raspberry Pi Zero 2 and the Raspberry Pi 3 are almost identical twins. Given this fact, we can luckily use the RPi 3 dtb file for the RPi Zero 2.

  • Remove the SD card from your computer once flashed.
  • Next, insert it again, so Windows or Linux can scan the contents.
  • Copy the bcm2710-rpi-3-b.dtb file in the /boot folder
  • Rename it to bcm2710-rpi-zero-2.dtb.

Zero.dtb

Tip: Use a micro USB hub to connect both your keyboard and mouse to the Raspberry Pi Zero 2. It makes life a lot easier!
USB hub
Insert the SD card into the Raspberry Pi Zero 2 and boot. Once the Wi-Fi connection is established, exit the Updater by selecting the Skip and Done button.
Do not get any new software. Some old packages block the automatic upgrade. Ultimately, if you continue now, your Raspberry Pi Zero 2 will not boot.
Also, do not reboot as the system will hang during startup.

NoUpdateSoftwareZero2

We will now install the required upgrades manually. Follow the steps carefully.
First, open a terminal and update with the new release with the command $ sudo apt-get update --allow-releaseinfo-change.
Then you need to uninstall the VLC player as its components interfere with the new software. VLC can be restored at the end of the procedure.

VLCerrorZero

Once done, delete the other redundant libraries and clean up your system $ sudo apt-get autoremove.
Now it's time for the upgrade $ sudo apt-get upgrade.
Most likely, your local data is lost in the process.

NoLocalInfo

You can fix it using the raspi-config tool, as shown in the slideshow below.
Now is the time to reboot, not before. After the reboot, you may want to restore the VLC player.
All instructions are below the slideshow.
# allow new releases
$ sudo apt-get update --allow-releaseinfo-change
# now you have only four sources
$ sudo apt-get update
# VLC blocks the upgrade, remove it for now
$ sudo apt-get remove --purge vlc
$ sudo apt-get autoremove
$ sudo apt-get clean
# The major upgrade (± 30 min)
$ sudo apt-get upgrade
# restore your locale information
$ sudo raspi-config
# ready
$ sudo reboot
# if you want restore VLC
$ sudo apt-get install vlc

Overclocking the Raspberry Pi Zero 2 W.

The Raspberry Pi Zero 2 has two devices in one housing. You have the BM2710 SoC and literally, on top of this die, you have the LPDDR2 RAM chip.
This very compact design has a drawback. It is not the best thermal solution because the RAM chip will act as an insulation blanket. It will prevent heat to flow from the four CPU cores to the top of the case. That's why this device comes in a plastic package and not in a metal housing like the Raspberry Pi 3. And of course, the plastic housing is also cheaper, a key factor in this design.

Obvious, you need a heat sink. This can be a metal case like the FLIRC, if you don't use the camera. Or a dedicated heatsink for the Raspberry Pi zero like the one below. Be sensible and choose a solution that suits you. Ultimately, we will only achieve about 20% speed gain. Don't spend a fortune on cooling, while it contributes little to nothing to the final result.
Heat RPiZero
FLIRC
Heat isn't the overclocking showstopper, though. It's the hardware itself. Those familiar with the Raspberry Pi 3 B+ will know the DDR2 RAM with its relatively low clock frequency and subsequently the transfer speed. In this design, it is the same. You can overclock up to 1100 MHz without any special precautions. Above 1100 MHz, you also have to overclock the DDR2 RAM.

Overvoltage, including the DDR2, is recommended in this case. See our tutorial on how to overclock the RPi 4 for more information on this topic.
In contrast to the RPi 4, we would recommend overruling the governor overvoltage choice. It is too prudent and let your Rasberry Pi Zero 2 chrash too often.
In the case of RPi Zero 2, the governor still switches between default and over-voltage depending on the clock frequency. It's another point of difference with the RPi 4, which always selects the over-voltage once it's set, regardless of the governor's choice of clock frequency.

If you have a special use for the GPU, such as gaming, you can also overclock it. We were able to reach 700 MHz. Otherwise it will just generate unnecessary heat. The GPU frequency seems to interfere with the VNC connection. After the GPU was overclocked, the VNC connection did not always start.

One last remark: there is a reason why the RPi programmers have chosen these settings. If the ARM core could safely run on above the 1000 MHz under all circumstances, they have sold the Raspberry Pi Zero 2 with this higher clock frequency.

Below is a list of default settings. Most have to do with other hardware. Those related to overclocking are highlighted.

VCgencmd_zero

With too aggressive overclocking, it can happen that your Raspberry Pi Zero 2 will not complete its boot. You see most of the time only a blank screen without a cursor. You can alter your settings without flashing the SD card again. Insert it on a Linux or Windows PC and modify the /boot/config.txt with an editor. Use only Notepad++ in Windows, as it supports the Unix line endings. See also this example.

Open the Nano text editor with the following command and place your lines at the end of the file. Close the session with the <Ctrl+X> key combination. With <Y> and <Enter> changes are being saved. Now reboot and your Raspberry Pi Zero 2 runs at the new speed. Please note, the figures given are only examples. You can adjust them to your own good.
$ sudo nano /boot/config.txt

# Add your lines at the end of the config.txt file.
# this is an example.
arm_freq=1300
gpu_freq=500
sdram_freq=500
over_voltage_sdram=3
# over_voltage is done by the governor.
# set the parameter to overrule its moderate choice.
over_voltage=5

# Ctrl+X, Y, Enter to save the session
# Reboot to run at the new clock frequency
$ sudo reboot

Deep learning benchmark.

Under construction


Raspberry 64 OS
Raspberry 32 OS
Raspberry and alt
Raspberry Pi 4
Jetson Nano
images/GithubSmall.png
images/YouTubeSmall.png
images/SDcardSmall.png
Back to content