Build Kernel for RaspberryPi

make the config first

Pi 1

cd linux
KERNEL=kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig

Pi 2/3

cd linux
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig

build zImage + modules

Then for both:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  zImage modules dtbs

install with dtbs

install the modules

sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install

copy bcm2709-rpi-2-b.dtb
sudo cp arch/arm/boot/dts/*.dtb mnt/fat32/
copy overlays:
sudo cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/