Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "This script installs a patched sdk from the subversion repository ..."
- echo ""
- DEVBOARD=devboard-R2_20.tar.gz
- DEBOARD_DISTFILES=devboard-R2_20-distfiles.tar.gz
- export PATH=$PATH:/usr/local/cris/bin/
- if [ -f $DEVBOARD ]
- then
- echo "Devboard exists"
- else
- echo "Getting devboard package"
- wget http://www.acmesystems.it/download/devboard-R2_01.tar.gz
- fi
- if [ -n "$1" ]
- then
- echo "distfiles exist here $1"
- else
- if [ -f $DEBOARD_DISTFILES ]
- then
- echo "Distfiles exist"
- else
- echo "Getting distfiles"
- wget http://www.acmesystems.it/download/devboard-R2_01-distfiles.tar.gz
- fi
- fi
- echo "Unpacking devboard ..."
- tar xfz $DEVBOARD
- echo "Installing distfiles ..."
- if [ -n "$1" ]
- then
- echo "create distfile symlink to already existing dir ..."
- cd devboard-R2_20
- rm distfiles
- ln -s $1 distfiles
- else
- echo "extracting distfiles ..."
- tar xfz devboard-R2_20-distfiles.tar.gz
- echo "create distfile symlink ..."
- cd devboard-R2_20
- ln -s ../distfiles distfiles
- fi
- echo "Checking for os-linux-2.6"
- if [ -f distfiles/os-linux-2.6-tag--devboard-R2_01-1.tar.gz ]
- then
- echo "2.6 is present"
- else
- cd distfiles
- wget http://developer.axis.com/download/distribution/os-linux-2.6-tag--devboard-R2_01-1.tar.gz
- # wget http://www.acmesystems.it/download/os-linux-2.6-tag--devboard-R2_01-1.tar.gz
- cd ..
- fi
- # echo "Install sdk ..."
- # ./install fox >> install.log
- # echo "Running configure ..."
- # ./configure >> install.log
- echo "unpacking 2.6"
- tar xfz distfiles/os-linux-2.6-tag--devboard-R2_01-1.tar.gz
- cd os
- ln -s linux-2.6-tag--devboard-R2_01-1 linux-2.6
- cd ..
- echo "Go back to base folder ..."
- cd ..
- # echo "Checking sdk_patch out of subversion ..."
- # svn co svn://dev.acmesystems.it/trunk/phrozen_patch/code/ devboard_svn > svn.log
- #
- # echo "copying checked out files to main folder ..."
- # cp -r devboard_svn/* devboard-R2_01/
- # cp -r devboard_svn/.svn/ devboard-R2_01/
- # cp devboard_svn/.config.orig devboard-R2_01/.config
- # cp devboard-R2_01/kernelconfig.orig devboard-R2_01/kernelconfig
- # cp devboard-R2_01/kernelconfig-2.6.orig devboard-R2_01/kernelconfig-2.6
- # cp devboard-R2_01/axis_config.h.orig devboard-R2_01/axis_config.h
- # cp devboard-R2_01/os/linux-2.6-tag--devboard-R2_01-1/.config.orig devboard-R2_01/os/linux-2.6-tag--devboard-R2_01-1/.config
- # yes | rm -r devboard_svn
- echo "Running final configure ..."
- cd devboard-R2_20
- cat tools/build/Makefile | sed "s/read _ANSWER/_ANSWER=n/g" > a
- mv a tools/build/Makefile
- ./configure >> install.log
- A=`yes n | \`make oldconfig 2&> install.log\``
- ./configure >> install.log
- echo "etrax100boot must be run by root.";
- echo "To make this easier (but less secure) you can make etrax100boot setuid root."
- echo -n "Do you want to make etrax100boot setuid root now [yn]? (default n): "
- read _ANSWER
- if [ "${_ANSWER}" = y ]; then
- echo "Please type root's password to make"
- echo "etrax100boot setuid root or Ctrl-D to cancel."
- su -c "chown root.root tools/build/bin/etrax100boot ; chmod +s tools/build/bin/etrax100boot"
- fi
- echo "Ready to roll :-)"
Advertisement
Add Comment
Please, Sign In to add comment