Loading...
 

Build From Source - Kernel

Table of contents


ESPRESSObin board currently supports Linux kernel version 4.4.8, whereas support for mainline kernel will be available soon.

Kernel version 4.4.8


First we need to make the directory into which we will clone the kernel (e.g. /home/espressobin/kernel/4.4.8/) and position into that directory:

espressobin@buildserver:~$ mkdir -p kernel/4.4.8
espressobin@buildserver:~$ cd kernel/4.4.8/


and there we clone linux-marvell repository with:

espressobin@buildserver:~/kernel/4.4.8$ git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell .


and the repo contents will be cloned inside your current directory. Now we checkout the proper branch for ESPRESSObin (linux-4.4.8-armada-17.02-espressobin):

espressobin@buildserver:~/kernel/4.4.8$ git checkout linux-4.4.8-armada-17.02-espressobin
Branch linux-4.4.8-armada-17.02-espressobin set up to track remote branch linux-4.4.8-armada-17.02-espressobin from origin.
Switched to a new branch 'linux-4.4.8-armada-17.02-espressobin'


Next thing we need to do in order to enable building images for ESPRESSObin is to set correct definitions for ARCH and CROSS_COMPILE:

espressobin@buildserver:~/kernel/4.4.8$ export ARCH=arm64
espressobin@buildserver:~/kernel/4.4.8$ export CROSS_COMPILE=aarch64-linux-gnu-


Next we create a default ./.config file using the default values from arch/$ARCH/configs/${PLATFORM}_defconfig (in this case from arch/arm64/configs/mvebu_v8_lsp_defconfig):

espressobin@buildserver:~/kernel/4.4.8$ make mvebu_v8_lsp_defconfig


and finally start the build with:

espressobin@buildserver:~/kernel/4.4.8$ make -j4


If the build process finishes successfully, you can find the Image (named Image) in arch/arm64/boot/:

espressobin@buildserver:~/kernel/4.4.8$ ls arch/arm64/boot/
        dts  Image  Image.gz  install.sh  Makefile


and the device tree blob for ESPRESSObin (named armada-3720-community.dtb) can be found in arch/arm64/boot/dts/marvell/ directory.

Instructions on how to copy the image to SD card and boot with the new kernel can be found on Software HowTo page for Buildroot and Ubuntu distribution.