Updated July 22nd, 2018
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
conf/local.conf and set:
MACHINE ??= "raspberrypi3-64" # Telling the Yocto system to build RPI3 aarch64
EXTRA_IMAGE_FEATURES ?= "debug-tweaks-tools-sdk ssh-server-openssh" # Adding ssh and gcc to the build system
ENABLE_UART = "1"
I now have an image with SSH at:
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:
To connect to the device:
ssh [email protected]<ip_addr>
This process gave me access to the RPi3 with the ARMv8 build.
Learn more about Autonomous Security Solutions