A 64-bit Raspberry Pi with 8GB of RAM and USB boot

Pi in the Sky

© Lead Image © innovari, fotolia.com

© Lead Image © innovari, fotolia.com

Article from Issue 244/2021
Author(s):

The Raspberry Pi 4 equipped with 8GB of RAM is the top end of this popular small-board computer. A 64-bit version of Raspberry Pi OS and the ability to boot from storage devices connected over USB are also just around the corner.

When the fourth generation of the Raspberry Pi was presented in June 2019, the Raspberry Pi Foundation fulfilled almost all the wishes of its loyal fans. With directly wired Gigabit Ethernet, fast USB 3.0 ports, and two monitor connections, the Raspberry Pi had finally come of age [1]. Technical details, such as the new BCM2711 system on a chip (SoC), along with the four Cortex A72 cores and up to 4GB of RAM were nearly forgotten.

Almost a year later, the Foundation launched a new variant of the Raspberry Pi 4. Besides versions with 1, 2, and 4GB of RAM, the new version was now also available with 8GB of RAM for an official price of $75 (£73/EUR78) – hardly a surprise, because the variant was listed in the Safety and User Guide enclosed with each board, more or less by mistake. Technically, the BCM2711 chip on the Raspberry Pi 4 can address up to 16GB of memory, but no chip manufacturer was able to supply LPDDR4 (low power, double data rate) chips with 8GB of capacity for the 2019 release [2].

In terms of components, the 8GB version hardly differs from the previous Raspberry Pi 4 versions; the only difference is that the RAM chip's identifier ends in D9ZCL (Figure 1). Having more RAM also means a minor adjustment of the power supply. Apart from that, the boards of the different variants are like identical twins.

Figure 1: Check the end number on the memory chip to distinguish between the Raspberry Pi 4 variants: D9WHZ (2GB), D9WHV (4GB), and the new D9ZCL (8GB).

Raspberry Pi OS

After the memory upgrade, the 8GB Raspberry Pi 4 now exceeds the 4GB limit that 32-bit systems can address [3]. Thanks to a large physical address extension (LPAE) kernel, however, the entire RAM is accessible by Raspberry Pi OS (the Raspberry Pi Foundation version of Raspbian diverged significantly and so became a distinct OS [4]), which is still only a 32-bit system. However, individual processes have to make do with a maximum of 3GB of memory. Memory-hungry applications are not usually limited by this ceiling, because they typically use multiple processes. For example, the Chromium browser starts a separate process for each tab.

To be prepared for the future, the Raspberry Pi Foundation is also working on a 64-bit version of its operating system. Meanwhile, users can install a public beta on their Raspberry Pi, if they are interested in doing so [5]. It is important to make sure you use a suitable version of the small-board computer (SBC). Ever since the Raspberry Pi 2B v1.2, the SBC has used 64-bit processors (BCM2837-SoC with ARM Cortex-A53). Since Raspberry Pi 3, the SBC has only been available in a 64-bit architecture. The Raspberry Pi Zero and Zero W, on the other hand, are not 64-bit capable because they are based on the first generation of the Raspberry Pi.

Booting over USB

Another feature of the new OS for the Raspberry Pi 4 is the ability to boot from USB. This option is recommended for scenarios in which applications are expected to write a large amount of data to the Raspberry Pi's memory card. An SD card is not designed for this type of use and will eventually stop working. A classic hard drive or solid state drive, on the other hand, does not fail, even if it writes large amounts of data regularly.

To enable USB boot, you have to install the system as usual on an SD card and update it to the current version (Listing 1, first line). Usually you will have to update the firmware, as well. Firmware versions provided by the Raspberry Pi Foundation can be found in the filesystem under /lib/firmware/raspberrypi/bootloader/. The developers distinguish between stable and beta versions (second and third commands) – the beta is only recommended for experienced testers.

Listing 1

Enabling USB Boot

$ sudo apt update && sudo apt full-upgrade
[...]
$ ls -al /lib/firmware/raspberrypi/bootloader/stable
[...]
-rw-r--r-- 1 root root 524288 Apr 23 17:53 pieeprom-2020-04-16.bin
-rw-r--r-- 1 root root 524288 Jun 17 11:15 pieeprom-2020-06-15.bin
$ ls -al /lib/firmware/raspberrypi/bootloader/beta
[...]
-rw-r--r-- 1 root root 524288 Jun 16 11:59 pieeprom-2020-06-15.bin
-rw-r--r-- 1 root root 524288 Jul  8 01:18 pieeprom-2020-07-06.bin
$ vcgencmd bootloader_version
Apr 16 2020 18:11:26
version a5e1b95f320810c69441557c5f5f0a7f2460dfb8 (release)
timestamp 1587057086
$ cd /lib/firmware/raspberrypi/bootloader/stable
$ sudo rpi-eeprom-update -d -f pieeprom-<2020-06-15>.bin
BCM2711 detected
VL805 firmware in bootloader EEPROM
BOOTFS /boot
*** INSTALLING pieeprom-<2020-06-15>.bin  ***
BOOTFS /boot
EEPROM update pending. Please reboot to apply the update.

The rest of the commands in Listing 1 check the currently loaded firmware and then import the latest version. After a reboot, issuing the

vcgencmd bootloader_version

command again reports the new version; the date of the bootloader then corresponds to the date contained in the name of the pieeprom-<date>.bin file.

Workarounds

A suitable bootloader is now installed, but the 32-bit version of Raspberry Pi OS (published on May 27, 2020), which was current at the time of testing, could not yet be booted from USB. As a workaround, start as usual by installing the system on an SD card. Then install all the current updates and transfer the complete data medium to the USB storage device connected to the Raspberry Pi with the Accessories | SD Card Copier menu option. Optionally, you can switch to the 64-bit version of Raspberry Pi OS: It booted directly from USB in our lab without any workarounds.

If you prefer the 32-bit version of Raspberry Pi OS and want to save yourself the time-consuming procedure of transferring a preinstalled system, use the boot.zip archive from the download section for this article [6]. The archive contains a number of .dat and .elf files that you need to transfer to the Raspberry Pi OS boot partition (Figure 2). Because these files overwrite existing files, be sure to save the old files first. After the action, the operating system should boot from USB, even if some error messages still appear on the screen (Figure 3).

Figure 2: For a freshly installed Raspberry Pi OS (32-bit) to boot from USB, you need to replace the boot files with the files in the boot.zip archive.
Figure 3: Starting a 32-bit installation of Raspberry Pi OS on a Raspberry Pi 4 from USB currently requires a number of workarounds.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • BerryLan

    BerryLan installs a system on a Raspberry Pi that can be integrated into the wireless network with a smartphone app over Bluetooth.

  • Ubuntu 20.10 Now Supports Raspberry Pi

    Ubuntu 20.10 is the first release from Canonical to support the Raspberry Pi single board computer.

  • Pi OS 2020-12-02

    The Raspberry Pi Foundation regularly adds new features to the official operating system, Raspberry Pi OS. The December 2020 update added the PulseAudio sound server and a print manager.

  • Raspberry Pi

    The sudden popularity of miniboard systems like Raspberry Pi have brought back the pioneering spirit of Linux’s early days. Suddenly, “do it yourself” in the open source community is back.

  • Raspberry Pi Media Center

    Tired of that big clunky media center unit taking up shelf space in your living room? We'll show you how to put together a tiny multimedia system with the versatile and ever-popular Raspberry Pi.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News