There are two ways to get the source
apt-get install linux-source git clone https://github.com/mmplayer/linux-sunxi.git -b dev/sunxi-3.4 --depth=1 Linux source files is a 7z archive which is located at /usr/src/. Use p7zip -d filename to decompress it.
Header package name is linux-headers.
Kernel Config
Build Guide
make ARCH=arm menuconfigmake -j4 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modulesmake STRIP=arm-none-linux-gnueabi-strip INSTALL_MOD_PATH=ROOTFS_PATH ARCH=arm INSTALL_MOD_STRIP=1 modules_installBranch info
Build Guide
make Cubieboard|Cubieboard2|Cubietruck CROSS_COMPILE=arm-none-linux-gnueabi-make Cubieboard CROSS_COMPILE=arm-none-linux-gnueabi-make sun7i CROSS_COMPILE=arm-none-linux-gnueabi-Hardware Config (script.bin)
Branch info