DEV Community

DEBIX Industrial Computers
DEBIX Industrial Computers

Posted on

Compiling Linux Source Code for DEBIX Boards

This guide outlines the steps to compile the Linux kernel source code for DEBIX Model A, Model B, and DEBIX SOM A I/O Board.

First, install the necessary build tools and libraries on your system. Open a terminal and run the following command:

sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev

2.Install the cross-compiler:

sudo mkdir /opt/toolchain

cd /opt/toolchain

sudo wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz

tar xpf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
Enter fullscreen mode Exit fullscreen mode

3.Export the cross-compilation environment variables:

export CROSS_COMPILE=/opt/toolchain/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-export ARCH=arm64

Enter fullscreen mode Exit fullscreen mode

4.Download the source code:
git clone --depth=1 --branch <branch> https://github.com/debix-tech/linux

has two branches: debix and SOM_A_IO_BOARD.

debix branch supports DEBIX Model A and DEBIX Model B:

Command: git clone --depth=1 --branch debix https://github.com/debix-tech/linux

SOM_A_IO_BOARD branch supports DEBIX SOM A I/O Board

Command: git clone --depth=1 --branch SOM_A_IO_BOARD https://github.com/debix-tech/linux

5.To generate the kernel default configuration file:

cd linux-debix

make imx_v8_defconfig
Enter fullscreen mode Exit fullscreen mode

6.Compile the kernel source code:

make -j4

7.Compile kernel modules

make modules

8.Install the kernel module to the out directory

make INSTALL_MOD_STRIP=1 modules_install INSTALL_MOD_PATH=out

Check if the kernel modules you need to compile are already installed in the out folder.

cd linux-debix/out/lib/modules/5.10.72

9.Location of image files and device tree files

linux-debix/arch/arm64/boot/image

linux-debix/arch/arm64/boot/dts/freescale/imx8mp-evk.dtb

linux-debix/arch/arm64/boot/dts/freescale/imx8mp-debix-lora-board.dtb
Enter fullscreen mode Exit fullscreen mode

10.Update the module kernel to debix

Run the command on DEBIX:

sudo scp @<Server Ip>:/linux-debix/out/lib/modules/5.10.72 /lib/modules

Top comments (0)