Skip to content
Robert Bragg edited this page Jul 27, 2016 · 1 revision

These instructions generally avoid assuming much prior experience with building the kernel so if you know what you're doing feel free to diverge however suits you.

git clone https://github.com/rib/linux git checkout -b wip/rib/oa-next origin/wip/rib/oa-next

Configure the build to only build what's currently needed by your running machine, to minimize what needs to be built (TIP: plug in any USB devices you use frequently before doing this step, including a USB stick, so won't have to always reboot to your distro kernel for basic USB functionality):

make localmodconfig

(Say yes to any questions)

Give the kernel a version suffix to distinguish it from your distro kernel:

make menuconfig

Navigate as follows:

->General setup
'Local version - append to kernel release'

And set the Local version to "-drm-intel"

Make sure to uncheck 'Automatically append version information to the version string' if currently set.

Now build the kernel:

make

(Make a cup of tea)

Personally I then have a ./install.sh script for moving the kernel to /boot, generating an initrd and ensuring it will be listed by Grub. For major distros like Ubuntu and Fedora such a script can simply be:

#!/bin/sh sudo make modules_install sudo make install

If you use ArchLinux (I do) then you can use something like:

#!/bin/bash
set +x

VERSION=`cat include/config/kernel.release`

sudo make modules_install
sudo mkinitcpio -k $VERSION -g /boot/initramfs-drm-intel.img
sudo cp -v arch/x86/boot/bzImage /boot/vmlinuz-drm-intel
sudo cp System.map /boot/System.map-drm-intel

With the kernel built, then install it:

chmod +x ./install.sh
./install.sh

Later if fetching newer version of the driver it should typically only be necessary to run:

make
./install.sh
Clone this wiki locally