forked from notro/fbtft
-
Notifications
You must be signed in to change notification settings - Fork 2
Install kernel sources
notro edited this page Jan 19, 2013
·
6 revisions
This step by step guide is for installing on the Raspberry Pi using the Raspian "wheesy" distro.
The kernel used for this guide:
uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
This guide assumes everything is done as root
sudo su -
Long running commands are timed with the ''time'' command.
''make zinstall'' won't work out of the box. One piece is missing. This is a simple solution with the caveat that ''make install'' will do ''zinstall''
Create directory
mkdir -p /etc/kernel/postinst.d/
Create file ''/etc/kernel/postinst.d/kernel_img''
#!/bin/sh
ver="$1"
img="$2"
exec </dev/null >&2
# backup current kernel
mv /boot/kernel.img /boot/kernel_last.img
# fat doesn't support symlinks
mv $img /boot/kernel.img
Make the file execuable
chmod +x /etc/kernel/postinst.d/kernel_img
Note: This is an example of how this script will be invoked by the kernel build system
/sbin/installkernel 3.2.27+ arch/arm/boot/zImage System.map "/boot"
apt-get update
apt-get -y install git libncurses5-dev
We don't download the complete git history (--depth 1) to speed things up.
cd /usr/src
time git clone --depth 1 git://github.com/raspberrypi/linux.git
9 minutes