News & Events

How to build RPI3 ARMv8 aarch64 build

Alexei Sragovitch | November 2, 2017
RPI3 banner

Updated July 22nd, 2018

Introduction

Raspberry Pi 3 (RPi3) currently uses cortex A53, which contains ARMv8 architecture CPU. However, most available documented builds for RPi3 are based on ARMv7 rather than ARMv8. In this post, I’ll explain how to build an RPi3 ARMv8 using Yocto Project on an Ubuntu machine.

The Yocto Project does have official layers for RPi3, both for RPI3 ARMv7 and ARMv8 builds. builds. I needed to create a new layer correctly for the Yocto Project that will build a Linux Kernel and rootfs for ARMv8.

The section below explains how I did this in greater detail.

Creating Yocto ARMv8 aarch64

git clone -b sumo git://git.yoctoproject.org/poky.git poky64sumo
cd poky64sumo/
git clone -b sumo ht​tp://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/
source oe-init-build-env
bitbake-layers add-layer ../meta-raspberrypi

edit conf/local.conf and set:

  1. MACHINE ??= “raspberrypi3-64” #Telling the Yocto system to build RPI3 aarch64
  2. EXTRA_IMAGE_FEATURES ?= “debug-tweaks-tools-sdk ssh-server-openssh” #Adding ssh and gcc to the build system
  3. ENABLE_UART = “1”
    bitbake rpi-basic-image

I now have an image with SSH at: tmp/deploy/images/raspberrypi3-64/rpi-basic-image-raspberrypi3-64.rpi-sdimg

Install and connect to RPI3

To convert from Flash to SD:
sudo dd if=tmp/deploy/images/raspberrypi3-64/rpi-basic-image-raspberrypi3-
64.rpi-sdimg of=/dev/mmcblk0

To install, I set the Ethernet connection on my Ubuntu machine to “Shared to other computers”. The Ubuntu machine gave me an IP address to the RPi3 board once it booted.

Then, I placed the SD card in the RPi3 and connected the Ethernet cable. (You can connect UART to the RPi3, but it’s not necessary.)

After, I booted the board and waited until it received an IP from my Ubuntu machine. Once it received an IP address, it was visible in the UART console.

To get an IP of the device, I ran the following:
cat /var/lib/misc/dnsmasq.leases

To connect to the device:
ssh [email protected]<ip_addr>

This process gave me access to the RPi3 with the ARMv8 build.

RPI3 Build

Learn more about Autonomous Security Solutions

Read more

Get Karamba’s Autonomous Security White Paper

Loc

USA

41000 Woodward Ave
Building East, Suite 350
Bloomfield Hills, MI 48304
Tel: +1 248-574-5171

Loc

Israel

24 HaNagar Street
Hod Hasharon
45277-13
Tel: +972 9 88 66 113

Loc

Germany

Wasserburger
Landstr. 264, Munich
81827
Tel: +49 151 1471 6088