Skip to content

Commit

Permalink
documentation update & added get-kernel-source script to facilitate b…
Browse files Browse the repository at this point in the history
…uilding the modified usbtv driver.
  • Loading branch information
gkaindl committed Aug 12, 2013
1 parent 9cf38e4 commit 4f0be1b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Now connect the mini-USB power plug to the Raspberry Pi, then connect the extra
Raspberry Pi Header
---------------------------------
P1/19 (MOSI) LPD8806 DAT pin
P1/21 (SCLK) LPD8806 CLK pin
P1/23 (SCLK) LPD8806 CLK pin
P1/5 Push switch side A
P1/6 Push switch side B

Expand Down
36 changes: 36 additions & 0 deletions misc/get-kernel-source.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
#
# from https://gist.github.com/azbesthu/3893319

REV=`zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep '* firmware as of' | head -n 1 | sed -e 's/\ \*\ firmware as of \(.*\)$/\1/'`

echo "Installing kernel source for revision $REV..."

rm -rf rasp-tmp
mkdir -p rasp-tmp
mkdir -p rasp-tmp/linux

wget https://raw.github.com/raspberrypi/firmware/$REV/extra/git_hash -O rasp-tmp/git_hash
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/Module.symvers -O rasp-tmp/Module.symvers

SOURCEHASH=`cat rasp-tmp/git_hash`

wget https://github.com/raspberrypi/linux/tarball/$SOURCEHASH -O rasp-tmp/linux.tar.gz

cd rasp-tmp
tar -xzf linux.tar.gz

OSVERSION=`uname -r`

mv raspberrypi-linux* /usr/src/linux-source-$OSVERSION
ln -s /usr/src/linux-source-$OSVERSION /lib/modules/$OSVERSION/build

cp Module.symvers /usr/src/linux-source-$OSVERSION/

zcat /proc/config.gz > /usr/src/linux-source-$OSVERSION/.config

cd /usr/src/linux-source-$OSVERSION/
make oldconfig
make prepare
make scripts
cd ~

0 comments on commit 4f0be1b

Please sign in to comment.