Skip to content

Instantly share code, notes, and snippets.

@dceejay
Created January 18, 2016 23:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dceejay/7f350c56a8a6bc4d1932 to your computer and use it in GitHub Desktop.
Save dceejay/7f350c56a8a6bc4d1932 to your computer and use it in GitHub Desktop.
Rebuild/Patch Pi kernel for Pizero microUSB 3Port USB/Ethernet hub...
#!/bin/bash
# Rebuild Pi kernel
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo apt-get -y install gcc make bc ncurses-dev build-essential git
sudo apt-get -y autoremove --purge
sudo apt-get -y autoclean
git clone --depth 1 git://github.com/raspberrypi/linux.git
git clone https://github.com/kmtaylor/rpi_patches.git
cd linux
patch -p1 < ../rpi_patches/dm9601-bug.patch
sudo modprobe configs
KERNEL_SRC=/home/pi/linux/
make mrproper
zcat /proc/config.gz > .config
make oldconfig
make
sudo make modules_install
sudo cp arch/arm/boot/zImage /boot/kernel.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment