Building the imx8mminievk kernel from source

Showing results for 
Search instead for 
Did you mean: 

Building the imx8mminievk kernel from source

Contributor III

This guide will show you how to build the kernel for the imx8mminievk from source natively on the board. It will assume that you are on a Debian system (see my guidedebootstrap Debian Buster on imx8mminievk). Please note that you will need about 3GB of free disk space.

First off we need to install some tools:

sudo apt install git build-essential bc

Clone the imx_4.14.78_1.0.0_ga branch from the linux-imx git repository:

git clone --branch imx_4.14.78_1.0.0_ga --single-branch linux-imx_4.14.78_1.0.0_ga

Copy the running linux configuration:

cd linux-imx_4.14.78_1.0.0_ga
zcat /proc/config.gz > .config

Blank the CONFIG_LOCALVERSION, Debian packaging does not accept underscores:


Optional, Reconfigure the kernel:

sudo apt install libncurses5-dev
make menuconfig

Build kernel and debian packages:

make -j$(nproc) bindeb-pkg

Install the Debian kernel packages:

sudo dpkg -i ../linux-image-4.14.78-*deb ../linux-headers-4.14.78-*deb

Backup old kernel and install new:

sudo mkdir /mnt/boot && sudo mount /dev/mmcblk1p1 /mnt/boot
sudo cp /mnt/boot/Image /mnt/boot/Image.bak
sudo sh -c "zcat $(ls -t /boot/vmlinuz* | head -n1) > /mnt/boot/Image"

Reboot system:

sudo reboot

Verify your kernel version with:

uname -a

If the new kernel won't boot, you can connect via serial console (usb-uart) and interrupt the u-boot booting and boot old kernel with:

setenv image Image.bak
Labels (2)
1 Reply

NXP TechSupport
NXP TechSupport


0 Kudos