#!/bin/sh

echo
echo !!!!!!!!!
echo this script is outdated
echo it was intended for patching the debian6-19-04-2012.img distribution
echo in the latest distribution no patching is required anymore
echo see http://www.frank-buss.de/raspberrypi/index.html
echo for more details how to install w1 and I2C now
echo !!!!!!!!!
echo if you really want to patch an old image, just uncomment the
echo exit command in this script and run it again
echo
exit

cd /boot
rm -f kernel-rpi-w1.tgz
wget http://www.frank-buss.de/raspberrypi/kernel-rpi-w1.tgz
tar -xzf kernel-rpi-w1.tgz
rm -f kernel-rpi-w1.tgz
rm -f arm192_start.elf
wget http://www.frank-buss.de/raspberrypi/boot-rpi-w1/arm192_start.elf
mv arm192_start.elf start.elf
rm -f bootcode.bin
wget http://www.frank-buss.de/raspberrypi/boot-rpi-w1/bootcode.bin
rm -f loader.bin
wget http://www.frank-buss.de/raspberrypi/boot-rpi-w1/loader.bin
cd /lib/modules
rm -f modules-rpi-w1.tgz
wget http://www.frank-buss.de/raspberrypi/modules-rpi-w1.tgz
tar -xzf modules-rpi-w1.tgz
rm -f modules-rpi-w1.tgz
sync
reboot

