Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Last active November 1, 2020 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Akkiesoft/20da41f7ef801e680e30 to your computer and use it in GitHub Desktop.
Save Akkiesoft/20da41f7ef801e680e30 to your computer and use it in GitHub Desktop.
Raspberry Pi上にカーネルソースを持ってきてコンパイルで使えるようにするやつ
#!/bin/bash
# Original: http://www.raspberrypi.org/forums/viewtopic.php?t=39096&p=393810
# コンパイラーのインストール
apt-get update
apt-get install -y build-essential
# ソースコードのダウンロードと用意
cd /usr/src
wget https://github.com/raspberrypi/linux/archive/rpi-3.12.y.tar.gz
tar xvfz rpi-3.12.y.tar.gz
ln -s /usr/src/linux-rpi-3.12.y/ /lib/modules/`uname -r`/build
cd /lib/modules/`uname -r`/build
make mrproper
gzip -dc /proc/config.gz > .config
make modules_prepare
wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment