Skip to content

Instantly share code, notes, and snippets.

@austinsc
Created February 2, 2016 19:12
Show Gist options
  • Select an option

  • Save austinsc/0d29476086e7b45e85e3 to your computer and use it in GitHub Desktop.

Select an option

Save austinsc/0d29476086e7b45e85e3 to your computer and use it in GitHub Desktop.
sudo -s
apt-get install build-essential bc ncurses-dev tmux git
tmux
cd /usr/src/
# find out which kernel you are using – in my case 4.1+
uname -r
# get the source – in my case 4.1.y (change if needed)
wget https://github.com/raspberrypi/linux/archive/rpi-4.1.y.tar.gz
tar xfvz rpi-4.1.y.tar.gz
mv linux-rpi-4.1.y linux
ln -s /usr/src/linux /lib/modules/$(uname -r)/build
ln -s /usr/src/linux /lib/modules/$(uname -r)/source
cd /usr/src/linux
make mrproper
# get your config
gzip -dc /proc/config.gz > .config
# building, that is going to take a while!
make
make modules_prepare
make modules_install
# copy the new kernel image
cp /usr/src/linux/arch/arm/boot/zImage /boot/linux-4.1.y
# choose it
echo "kernel=linux-4.1.y" >> /boot/config.txt
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment