Table of contents
ESPRESSObin board currently supports Linux kernel versions 4.4.8, 4.4.52 and 4.14 mainline kernel. Kernel images and dtb files for both kernel versions can be:
- Generated manually by following instructions on this page
- Downloaded as a zip archive from our Tech Spec page, Software table.
To build the kernel from source, make sure that your toolchain is set up as shown in Build from source - Toolchain.
For the ESPRESSObin v7 hardware revision use the 4.4.52 kernel version.
Kernel version 4.4.8
Create the directory into which the kernel will be cloned (e.g. /home/user/kernel/4.4.8/
) and position into that directory:
$ mkdir -p kernel/4.4.8 && cd kernel/4.4.8/
and there we clone linux-marvell repository with:
$ git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell .
Now we checkout the linux-4.4.8-armada-17.02-espressobin
branch:
$ git checkout linux-4.4.8-armada-17.02-espressobin
Next thing we need to do is to set correct values for ARCH
and CROSS_COMPILE
variables:
$ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu-
Next, create a default ./.config
file using the arch/arm64/configs/mvebu_v8_lsp_defconfig
file:
$ make mvebu_v8_lsp_defconfig
Custom features can be added using the menuconfig interface, which is triggered via make menuconfig
command.
Start the build with:
$ make -j4
After a successful build, you will find the kernel image ( Image
) in arch/arm64/boot/
directory. The device tree file for ESPRESSObin ( armada-3720-community.dtb
) has been generated in arch/arm64/boot/dts/marvell/
directory.
Kernel version 4.4.52
Create the directory into which the kernel will be cloned (e.g. /home/user/kernel/4.4.52/
) and position there:
$ mkdir -p kernel/4.4.52 && cd kernel/4.4.52/
Clone the linux-marvell repository:
$ git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell .
Create a new branch espressobin-v7
that uses a commit from the linux-4.4.52-armada-17.10
branch as a starting point:
$ git checkout 6adee55d3e07e3cc99ec6248719aac042e58c5e6 -b espressobin-v7
A series of patches needs to be applied for kernel version 4.4.52, branches linux-4.4.52-armada-17.06
and onward. These patches address the changes required for ESPRESSObin v7 hardware revision, as well as ensure backward compatibility with previous ESPRESSObin revisions (v5 and older).
The archive containing the patches can be downloaded below:
Extract the archive with:
$ unzip ebin_v7_kernel_patches.zip
Apply the patches using the git am
command:
$ git am *.patch
Set the correct definitions for ARCH
and CROSS_COMPILE
variables:
$ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu-
Next, create a default .config
file using the arch/arm64/configs/mvebu_v8_lsp_defconfig
file:
$ make mvebu_v8_lsp_defconfig
Custom features can be added using the menuconfig interface which is triggered via make menuconfig
command.
Start the build with:
$ make -j4
After a successful build, you will find the kernel image ( Image
) in arch/arm64/boot/
directory. The device tree files for different ESPRESSObin hardware revisions have been generated in arch/arm64/boot/dts/marvell/
directory.
For ESPRESSObin v7 use the file armada-3720-community-v7.dtb
and for ESPRESSObin v5 and older revisions use the armada-3720-community-v5.dtb
device tree file.
Kernel version 4.14
This section will show how to download, configure and build mainline kernel 4.14 for your ESPRESSObin board. Make sure that all the requirements listed in Build system requirements are installed on your build machine.
Now you are ready to clone the mainline kernel and checkout the linux-4.14y
branch. We will clone it to /home/user/kernel/4.14/
:
$ mkdir -p kernel/4.14 && cd kernel/4.14/ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git . $ git checkout linux-4.14.y
Set correct values for ARCH
and CROSS_COMPILE
variables:
$ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu-
Create a default .config
file using the default values from arch/arm64/configs/defconfig
configuration file:
$ make defconfig
Custom features can be added using the menuconfig interface, which is triggered via make menuconfig
command.
Start the build with:
$ make -j4 Image dtbs modules
This will build:
- arch/arm64/boot/Image
-> vmlinux binary
- arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb
-> device tree file for U-Boot
- All modules specified in .config
file.
Do not run make modules_install unless you are just updating your local system.
The newly created kernel image and device tree file can now be copied to the removable media, as instructed in tutorials regarding various supported file systems.
Mainline notes
- To install the modules belonging to the kernel image, from the kernel root directory do:
$ sudo make ARCH=arm64 modules_install INSTALL_MOD_PATH=/mnt/sdcard/
here/mnt/sdcard/
is the path to the root of the file system on your removable media.
- The device tree file name for mainline kernel differs from other supported kernel versions, so make sure the
fdt_name
U-Boot variable is adjusted accordingly:
Marvell>> setenv fdt_name 'boot/armada-3720-espressobin.dtb'
- Due to the size of kernel files increasing, you will likely need to increase the allocated memory location of the kernel image and device tree file by adjusting these U-Boot variables accordingly, for example:
Marvell>> setenv fdt_addr 0x1500000 Marvell>> setenv kernel_addr 0x5000000