Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (21 sloc) 930 Bytes
REV=`zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep '* firmware as of' | head -n 1 | sed -e 's/ \ \*\ firmware as of \(.*\)$/\1/'`
rm -rf rasp-tmp
mkdir -p rasp-tmp
mkdir -p rasp-tmp/linux
wget$REV/extra/git_hash -O rasp-tmp/git_hash
wget$REV/extra/Module.symvers -O rasp-tmp/Module.symvers
SOURCEHASH=`cat rasp-tmp/git_hash`
wget$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 ~