How-to compile kernel and header for Banana Pi

Check if the necessary modules are available. If not install it.

build-essential libncurses5-dev u-boot-tools uboot-mkimage

As unpriviledged user

git clone --depth 1
cd linux-bananapi
make sun7i_defconfig
make menuconfig              # exit & save or make necessary changes
make -j2 uImage modules      # several hours working

As super user “root”

make modules_install
mount /dev/mmcblk0p1 /mnt
mv /mnt/uImage /mnt/uImage_old  # save precedent uImage, can be restored
cp arch/arm/boot/uImage /mnt
umount /mnt

Later you can verify if updates are available with

git pull

To verify from which repository you cloned the tree run

git remote show -n origin

See also: