Q:

Build a customized Linux kernel for the Raspberry Pi

I downloaded a Linux kernel "linux-4.1.13.tar.xz" from kernel.org that I want to compile it for Raspberry Pi.
Is it possible?

A:

The following comes from raspberrypi.org ... there is more, but I am just posting the minimum to answer the question.
There are two main methods for building the kernel. You can build locally on a Raspberry Pi which will take a long time; or you can cross-compile, which is much quicker, but requires more setup.
LOCAL BUILDING
On a Raspberry Pi first install the latest version of Raspbian from the downloads page. Then boot your Pi, plug in Ethernet to give you access to the sources, and log in.
First get the sources, which will take some time:
git clone --depth=1 https://github.com/raspberrypi/linux

Add missing dependencies:
sudo apt-get install bc

Configure the kernel - as well as the default configuration you may wish to configure your kernel in more detail or apply patches from another source to add or remove required functionality:
Run the following commands depending on your Raspberry Pi version.
RASPBERRY PI 1 (OR COMPUTE MODULE) DEFAULT BUILD CONFIGURATION
cd linux
KERNEL=kernel
make bcmrpi_defconfig

RASPBERRY PI 2/3 DEFAULT BUILD CONFIGURATION
cd linux
KERNEL=kernel7
make bcm2709_defconfig

Build and install the kernel, modules and Device Tree blobs; this step takes a long time...
make -j4 zImage modules dtbs
sudo make modules_install
sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img

Note: On a Raspberry Pi 2/3, the -j4 flag splits the work between all four cores, speeding up compilation significantly.

