In case you just want some particular kernel feature to be enabled in the config, check out my pre-built kernels, maybe these will already have what you need (and save you some time compiling).
apt-get install git build-essential fakeroot kernel-package u-boot-tools zlib1g-dev libncurses5-dev
deb http://www.emdebian.org/debian/ unstable main
apt-get update apt-get install emdebian-archive-keyring apt-get install gcc-4.7-arm-linux-gnueabihf ln -sf `which arm-linux-gnueabihf-gcc-4.7 ` /usr/local/bin/arm-linux-gnueabihf-gcc # ^ FIXME: find/fix why the version-less filename is not created automatically
git clone https://github.com/linux-sunxi/linux-sunxi linux-sunxi cd linux-sunxi git checkout sunxi-3.4
I suggest my configs available at:
Save the config file you downloaded as ”
.config” in the kernel source directory.
If you wish to check and adjust settings, run:
ARCH=arm make menuconfig
In the kernel source directory do:
export ARCH=arm export DEB_HOST_ARCH=armhf export CONCURRENCY_LEVEL=`grep -m1 cpu\ cores /proc/cpuinfo | cut -d : -f 2` fakeroot make-kpkg --arch arm --cross-compile arm-linux-gnueabihf- --initrd --append-to-version=-custom1 kernel_image kernel_headers make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- EXTRAVERSION=-custom1 uImage cp arch/arm/boot/uImage ../uImage
You can save the above as a script for convenience. You can also replace
custom1 with something else, e.g. your nickname and a number that represents the order number of the new package of this particular kernel (as it is common to recompile the same kernel version a few times to get everything just right in the config, or to try out different patches).
After the compilation, in the directory one level above the kernel source tree, you will get:
linux-image-*.deb, a Debian package with the kernel;
linux-headers-*.deb, a Debian package with kernel headers (mostly unneeded);
uImage, the kernel itself in the u-boot compatible format.
Now you will need to:
linux-image-*.debto your target device and install it there;
uImageinto the device's
Until you have ensured that the new kernel works, keep the previous
uImage that already was there, just rename it into something different (e.g.
uImage.bak). In case your new kernel doesn't boot, you can simply insert your the SD card into some other device, mount the boot partition and restore the previous