Skip to content

Build Kernel from source code

Xiaogang Li edited this page May 16, 2022 · 6 revisions

Environment Preparation

Here will take Ubuntu as the example.

Ubuntu 18.04+ requires additional packages:

$ sudo apt-get install git flex bison libssl-dev

Build kernel

Download stable kernel from https://www.kernel.org/

$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Or the latest kernel from https://github.com/freedesktop/drm-tip

$ git clone https://github.com/freedesktop/drm-tip.git

Then build kernel by below commands.

$ make defconfig
$ make -j8
$ sudo make modules_install
$ sudo make install
Clone this wiki locally