#!/bin/bash # This is intended to allow a from scratch start of a known good # set of configs based on the last full release. # This is the src to get the known good configs from VEROLD="linux-2.6.35.7" # This is the src file to be used VERSRC="linux-2.6.36" NEWVERNUM="2.6.36" VNAME="linux-"$NEWVERNUM echo $VNAME # These are the patchfile(s) to be used VERP1="patch-"$NEWVERNUM echo $VERP1 sleep 3 #VERP3="" #VERP3="" #VERP4="" #VERP5="" #VERP6="" #VERP7="" #VERP8="" #VERP9="" #echo $VERP1 #echo $VERP2 #echo $VERP3 #echo $VERP3 #echo $VERP4 #echo $VERP5 #echo $VERP6 #echo $VERP7 #echo $VERP8 #echo $VERP9 # and this is what to name it echo "if above isn't correct hit ctl-c" sleep 5 # get to it echo pwd echo $VEROLD sleep 1 cd $VEROLD pwd sleep 1 echo copying older configs to safe place cp -f .config /var/.config26 cp -f .config.old /var/.config.old26 cp -f makeit /var/makeit26 # back out cd .. echo the next line should be usr src pwd echo sleep 1 echo mv unpatched kernel tree out of the way echo moveing $VERSRC to $VERSRC.keep echo this will remove an existing one! sleep 5 #time to hit ctl-c echo timeout - doing it touch $VERSRC #in case it doesn't exist mv $VERSRC $VERSRC.keep echo ls -l $VERSRC.keep #see what it was? sleep 1 echo unpacking a fresh copy of the base version from scratch echo #tar xjf $VERSRC.tar.bz2 rm -fR $VNAME #blow it away if it exists tar xzf $VERSRC.tar.gz echo #echo "unpacking the patch(es)" #gunzip $VERP1.gz #gunzip $VERP2.gz #gunzip $VERP3.gz # add more as required echo echo done. mv $VERSRC $VNAME echo ls -l $VNAME sleep 1 echo restoreing original srcs mv $VERSRC.keep $VERSRC echo cd $VNAME pwd #sleep 1 COPY the firmware/radeon stuff over mkdir firmware/radeon ## did it make it? echo firmware contents ls firmware echo echo 'firmware/radeon contents' ls firmware/radeon echo echo make sure the old one is there ls ../$VEROLD/firmware/radeon echo now copy it cp -f ../$VEROLD/firmware/radeon/* ./firmware/radeon/ echo echo was the copy good ls firmware/radeon # apply the patches echo #echo Applying patch $VERP1 #echo #sleep 1 #patch -p1 <"../"$VERP1 #echo #echo patch $VERP1 done #echo now applying $VERP2 #sleep 1 #echo #patch -p1 <"../"$VERP2 #sleep 1 #echo #echo patch $VERP2 done #echo #echo - now applying $VERP3 #sleep 2 #patch -p1 <"../"$VERP3 #sleep 2 #echo #echo done - now applying $VERP4 #sleep 2 #echo #patch -p1 <$VERP4 #sleep 2 #echo #echo done - now applying $VERP5 #sleep 2 #echo #patch -p1 <$VERP5 #sleep 2 #echo #echo done - now applying $VERP6. #sleep 2 #echo #patch -p1 <$VERP6 #sleep 2 #echo done - now applying $VERP7 #sleep 2 #patch -p1 <$VERP7 #echo done - now applying $VERP8 #sleep 2 #patch -p1 <$VERP8 #echo done - now applyng patch $VERP9 #sleep 2 #patch -p1 <$VERP9 echo done # suggested by Marcelo cp /var/.config26 .config cp /var/.config.old26 .config.old cp /var/makeit26 makeit make oldconfig make mrproper make xconfig #make menuconfig