Building the imx8mminievk kernel from source

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Building the imx8mminievk kernel from source

1,794 次查看
andreasgustafss
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 http://source.codeaurora.org/external/imx/linux-imx --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:

sed -i 's/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' .config

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
boot
标签 (2)
1 回复

1,386 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Great!!!

0 项奖励
回复