Introduction
This article describes building the Linux kernel for Maivin as stand-alone, without Yocto. This is useful during development to speed up build-test iterations.
The linux-maivin repository on GitHub is forked from the NXP linux-imx though Maivin's official upstream is the linux-toradex repository which is not hosted on GitHub. When looking at branches on linux-maivin note the following ownership associations.
Vendor | Branch Naming | Upstream |
Au-Zone Technologies - Maivin | maivin_* | https://github.com/MaivinAI/linux-maivin |
Toradex | toradex_* | https://git.toradex.com/cgit/linux-toradex.git/ |
NXP | lf-* | https://github.com/nxp-imx/linux-imx |
Requirements
You will need an appropriate Linux ARM64 development environment, refer to Building VisionPack Applications with Ubuntu Toolchains for guidance.
- ssh
- git
- aarch64-linux-gnu toolchain
Before you start, you must clone the linux-maivin repository to your local machine. If you're using Windows, clone from WSL into a native Linux partition.
Linux does not work well from Windows or Mac partitions which are not case-sensitive!
Compilation
First, ensure you configure three important environment variables. The first two are required to cross-compile for ARM64 while the last one is required to enable device tree overlays, which are used by Maivin.
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export DTC_FLAGS=-@
Once your environment is configured, you may load the default kernel configuration for Maivin with the following command. Note this is only required during initial setup, or to return to the default configuration, otherwise, your further updates are saved to the .config file.
make maivin_defconfig
You're now setup to build the Linux kernel, modules, and device trees for Maivin. Note you may adjust -j8 up or down depending on your computer's available processors and memory.
make -j8
Comments
0 comments
Please sign in to leave a comment.