Among one of file systems supported by ESPRESSObin is Ubuntu file system (latest available releases are 14.04.5 LTS and 16.04.4 LTS). Here we will show you how to create Ubuntu file system for ESPRESSObin for both releases. Note that you will need a Linux machine to follow the instructions on this page.
Begin by downloading a copy of Ubuntu file system (14.04.5 LTS). Make a directory where you will download the file system (e.g.
$ mkdir -p ubuntu_14.04 && cd ubuntu_14.04 $ wget http://cdimage.ubuntu.com/ubuntu-base/releases/14.04.5/release/ubuntu-base-14.04.5-base-arm64.tar.gz
Make a new directory where we will extract the file system:
$ mkdir fs && cd fs $ sudo tar -xvf ../ubuntu-base-14.04.5-base-arm64.tar.gz
fs/ directory now contains the Ubuntu file system.
Now we will need to edit a few configuration files in order for the Ubuntu file system to boot properly. Open the file
etc/init/rc-sysinit.conf and there set the variable
DEFAULT_RUNLEVEL variable to 3:
$ sudo vim etc/init/rc-sysinit.conf # Default runlevel, this may be overriden on the kernel command-line # or by faking an old /etc/inittab entry env DEFAULT_RUNLEVEL=3
Next, remove the login password for root by editing the
/etc/passwd file (remove the
$ sudo vim etc/passwd root::0:0:root:/root:/bin/bash
Last thing needed is to create a file
$ sudo vim etc/init/ttyMV0.conf
and in it paste the following (if this is incorrect the boot will freeze):
start on stopped rc or RUNLEVEL= stop on runlevel [!12345] respawn exec /sbin/getty -L 115200 ttyMV0 vt100 -a root
Kernel image and dtb file can be either generated manually from source by following instructions on Build from source - Kernel, or they can be downloaded at Tech Spec page, Software table under Linux kernel. Copy the kernel image and device tree file to the
$ sudo cp ~/kernel/4.4.52/arch/arm64/boot/Image boot/ $ sudo cp ~/kernel/4.4.52/arch/arm64/boot/dts/marvell/armada-3720-community.dtb boot/
Lastly, zip the folder to later extract it to a removable media:
$ cd .. $ sudo tar -cjvf rootfs.tar.bz2 -C fs/ .
This archive containing the Ubuntu 14.04.5 LTS root file system (with kernel binary and dtb file included) can also be downloaded from our Tech Spec page, Software table under Ubuntu 14.04.5 LTS.
Head over to Boot from MicroSD card/USB stick - Ubuntu to prepare your removable media for booting Ubuntu 14.04 on your ESPRESSObin board.
Begin by downloading a copy of Ubuntu OS (16.04.4. LTS) into a newly created directory (e.g.
$ mkdir -p ubuntu_16.04 && cd ubuntu_16.04 $ wget http://cdimage.ubuntu.com/releases/16.04.5/release/ubuntu-16.04.4-server-arm64.iso
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.4-server-arm64.iso tmp/
The Ubuntu file system (
filesystem.squashfs ) is located in the
$ 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
$ sudo unsquashfs -d rootfs/ tmp/install/filesystem.squashfs Parallel unsquashfs: Using 4 processors 11381 inodes (12201 blocks) to write [=====================================================================================|] 12201/12201 100% created 9488 files created 1130 directories created 1809 symlinks created 79 devices created 0 fifos
This directory now contains the Ubuntu file system:
$ ls rootfs/ bin boot dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
A few additional tweaks to the file system are needed to boot it on ESPRESSObin.
First, remove the password for root login by opening
rootfs/etc/passwd file and removing the
:0 so that the line looks like this:
$ sudo vim rootfs/etc/passwd root::0:0:root:/root:/bin/bash
ttyMV0 to the end of the
$ sudo vim rootfs/etc/securetty [...] # Serial Console for MIPS Swarm duart0 duart1 # s390 and s390x ports in LPAR mode ttysclp0 ttyMV0
Lastly, we need to transfer the kernel binary and dtb file to the root file system. Kernel image and dtb file can be either generated manually from source by following instructions on Build from source - Kernel, or they can be downloaded at Tech Spec page, Software table under Linux kernel. Copy the kernel binary and the device tree file to the
$ sudo cp ~/kernel/4.4.52/arch/arm64/boot/Image rootfs/boot/ $ sudo cp ~/kernel/4.4.52/arch/arm64/boot/dts/marvell/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/ .
This archive containing the Ubuntu root file system (with kernel binary and dtb file included) can also be downloaded from our Tech Spec page, Software table under Ubuntu 16.04.4 LTS.
Head over to Boot from MicroSD card/USB stick - Ubuntu to prepare the removable media from which you can boot Ubuntu 16.04 on your ESPRESSObin board.