wget http://www.gnuwakes.org/depot/1.0/main/sources/linux-4.1.3.tar.xz tar -xf linux-4.1.3.tar.xz wget http://www.gnuwakes.org/depot/1.0/main/sources/linux-sources-4.1.3.patch cd linux-4.1.3 patch -p1 < ../linux-sources-4.1.3.patch cd .. SOURCES_DIR=$PWD/linux-4.1.3 INSTALL_DIR=$PWD/linux-4.1.3-install BUILD_DIR=$PWD/linux-4.1.3-build mkdir $INSTALL_DIR $BUILD_DIR cd $BUILD_DIR file=$(ls $SOURCES_DIR/linux-*) VERSION=$(ls $file | sed 's%^.*linux-%%; s%\.tar.*$%%') mkdir -vp $INSTALL_DIR/usr/src cd $INSTALL_DIR/usr/src xzcat $file | tar -xf - ln -s linux-$VERSION linux cd linux make mrproper cp $SOURCES_DIR/config-$VERSION .config make prepare make scripts ln -s ../generated/uapi/linux/version.h include/linux/version.h