Loading...
 

Build From Source - Kernel

ESPRESSObin board currently supports Linux kernel versions 4.4.8 and 4.4.52. 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.

Kernel version 4.4.8


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

user@laptop:~$ mkdir -p kernel/4.4.8
user@laptop:~$ cd kernel/4.4.8/


and there we clone linux-marvell repository with:

user@laptop:~/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 (linux-4.4.8-armada-17.02-espressobin):

user@laptop:~/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:

user@laptop:~/kernel/4.4.8$ export ARCH=arm64
user@laptop:~/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):

user@laptop:~/kernel/4.4.8$ make mvebu_v8_lsp_defconfig


and finally start the build with:

user@laptop:~/kernel/4.4.8$ make -j4


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

user@laptop:~/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.

Kernel version 4.4.52


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

user@laptop:~$ mkdir -p kernel/4.4.52
user@laptop:~$ cd kernel/4.4.52/


and there we clone linux-marvell repository with:

user@laptop:~/kernel/4.4.52$ 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.52-armada-17.06):

user@laptop:~/kernel/4.4.52$ git checkout linux-4.4.52-armada-17.06
Branch linux-4.4.52-armada-17.06 set up to track remote branch linux-4.4.52-armada-17.06 from origin.
Switched to a new branch 'linux-4.4.52-armada-17.06'


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

user@laptop:~/kernel/4.4.52$ export ARCH=arm64
user@laptop:~/kernel/4.4.52$ 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):

user@laptop:~/kernel/4.4.52$ make mvebu_v8_lsp_defconfig


and finally start the build with:

user@laptop:~/kernel/4.4.52$ make -j4


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

user@laptop:~/kernel/4.4.52$ ls arch/arm64/boot/
Image  Image.gz  Makefile  dts  install.sh


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