Install the required packages to recompile the kernel with (logged in as root) and prepare the directory for the source code.
mkdir ~/installed cd ~/installed apt-get install build-essential git debootstrap u-boot-tools libncurses5-dev
Download the tools needed to compile the kernel and configure the environment:
git clone https://github.com/linux-sunxi/sunxi-bsp.git cd sunxi-bsp/scripts export PATH=$PATH:$PWD cd ../..