ESPRESSObin Ubuntu 16.04 file system on an SD card

Last Update: May 24, 2023 @ 15:20

This page contains the latest information as the above date.

Ubuntu 16.04.7 LTS

Begin by downloading a copy of Ubuntu OS (16.04.7. LTS) into a newly created directory (e.g. /home/user/ubuntu_16.04/):

$ mkdir -p ubuntu_16.04 && cd ubuntu_16.04
$ wget

After the iso image has been downloaded, create a new sub-directory where the iso image will be mounted:

$ mkdir tmp
$ sudo mount -o loop ubuntu-16.04.7-server-arm64.iso tmp/

The Ubuntu file system ( filesystem.squashfs ) is located in the tmp/install sub-directory:

$ ls tmp/install/
filesystem.manifest filesystem.squashfs hwe-initrd.gz hwe-vmlinuz netboot 
filesystem.size filesystem.squashfs.gpg hwe-netboot initrd.gz vmlinuz

Unsquash that file system into a directory named rootfs:

$ sudo unsquashfs -d rootfs/ tmp/install/filesystem.squashfs
Parallel unsquashfs: Using 4 processors 11381 inodes (12201 blocks) to write
[=====================================================================================|] 12201/12201 100%
created 9528 files 
created 1148  directories 
created 1813 symlinks 
created 79 devices 
created 0 fifos

This directory now contains the Ubuntu file system. Use the ls command to check:
$ ls rootfs/ 
bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

The file system requires some adjustments to boot it on the ESPRESSObin board.

First, remove the password for root login by opening (with a text editor, e.g. vi or nano, or your choice)
rootfs/etc/passwd file and in the first line, removing the x between root: and :0 so that the line looks like this:

$ sudo vi rootfs/etc/passwd 

Next, append ttyMV0 to the end of the /etc/securetty file (it’s quite long, so scroll down to the end):

$ sudo vi rootfs/etc/securetty [...] 
# Serial Console for MIPS Swarm 
# s390 and s390x ports in LPAR mode
ttyMV0       // This is the entry to add!

Lastly, we need to transfer the kernel binary and dtb file to the root file system.

Kernel image and dtb file can be downloaded at Tech Spec page, Software table under Linux kernel. The file is

and contains the following files:

  • armada-3720-community.dtb // This is for the V4 board. Use this one…
  • armada-3720-community-v5.dtb
  • armada-3720-community-v7.dtb
  • Image // This is the 13MB kernel binary image.

Unzip these files into a directory , starting in your ubuntu_16.04 directory

$  mkdir ./kernel
$  mkdir ./kernel/4.4.52
$  mkdir ./kernel/4.4.52/arch/arm64
$  mkdir ./kernel/4.4.52/arch/arm64/boot/

Copy the Image and .dtb to the

from a transfer media or the download location.

Now, copy the kernel binary (4.4.52) and the device tree file to the rootfs/boot/ directory:

$ sudo cp ./kernel/4.4.52/arch/arm64/boot/Image rootfs/boot/
$ sudo cp ./kernel/4.4.52/arch/arm64/boot/armada-3720-community.dtb rootfs/boot/

Finally, zip the folder to later extract it to a removable media:

$ sudo tar -cjvf rootfs.tar.bz2 -C rootfs/ .   // Note the '.', it's important!

Setting U-Boot parameters

For the ESPRESSObin to boot the Ubuntu file system and images placed on the removable media, we must configure U-Boot parameters.

Micro SD card

Unplug the removable media you have transferred the file system to and plug it into the SD card slot on the ESPRESSObin, plug the power adapter and connect to the board using the micro USB cable and Serial connection.

When the boot starts, hit any key to stop autoboot and get to the Marvell U-Boot prompt:

Hit any key to stop autoboot:

Check that the micro SD card has necessary files using the ext4ls command:

Marvell>> ext4ls mmc 0:1
Marvell>> ext4ls mmc 0:1 boot

There are only a few variables required to boot from microSD card. First, set proper image and device tree path and name:

Marvell>> setenv image_name boot/Image
Marvell>> setenv fdt_name boot/armada-3720-community.dtb

Next, set the boot command by defining the bootmmc variable, which we will use to boot from the microSD card:

Marvell>> setenv bootmmc ‘mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr – $fdt_addr’

Be careful to set the root path above to point to where you have extracted the Ubuntu file system (first partition in our case).

Alternately, set up the bootcmd variable for the ESPRESSObin to automatically boot with these values:

Marvell>> setenv bootcmd ‘mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr – $fdt_addr’

You can preserve the set variables across reboots using the saveenv command.

Finally, boot the ESPRESSObin either with run bootmmc or if you set the bootcmd variable simply type reset :

Marvell>> run bootmmc


Ubuntu 16.04.7 LTS localhost.localdomain ttyMV0

localhost login: root
Last login: Mon Sep 6 18:32:12 UTC 2021 on ttyMV0
Welcome to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.52-armada-17.06.2-gcaa3a4f aarch64)

Log in with root.

Copyright © 2024 PiXCL Automation Tech Notes, Canada. All Rights Reserved.