Guest User

Untitled

a guest
Jan 28th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "This script installs a patched sdk from the subversion repository ..."
  4. echo ""
  5.  
  6. DEVBOARD=devboard-R2_20.tar.gz
  7. DEBOARD_DISTFILES=devboard-R2_20-distfiles.tar.gz
  8.  
  9.  
  10. export PATH=$PATH:/usr/local/cris/bin/
  11.  
  12.  
  13. if [ -f $DEVBOARD ]
  14. then
  15. echo "Devboard exists"
  16. else
  17. echo "Getting devboard package"
  18. wget http://www.acmesystems.it/download/devboard-R2_01.tar.gz
  19. fi
  20.  
  21. if [ -n "$1" ]
  22. then
  23. echo "distfiles exist here $1"
  24. else
  25. if [ -f $DEBOARD_DISTFILES ]
  26. then
  27. echo "Distfiles exist"
  28. else
  29. echo "Getting distfiles"
  30. wget http://www.acmesystems.it/download/devboard-R2_01-distfiles.tar.gz
  31. fi
  32. fi
  33.  
  34. echo "Unpacking devboard ..."
  35. tar xfz $DEVBOARD
  36.  
  37. echo "Installing distfiles ..."
  38. if [ -n "$1" ]
  39. then
  40. echo "create distfile symlink to already existing dir ..."
  41. cd devboard-R2_20
  42. rm distfiles
  43. ln -s $1 distfiles
  44. else
  45. echo "extracting distfiles ..."
  46. tar xfz devboard-R2_20-distfiles.tar.gz
  47. echo "create distfile symlink ..."
  48. cd devboard-R2_20
  49. ln -s ../distfiles distfiles
  50. fi
  51.  
  52. echo "Checking for os-linux-2.6"
  53. if [ -f distfiles/os-linux-2.6-tag--devboard-R2_01-1.tar.gz ]
  54. then
  55. echo "2.6 is present"
  56. else
  57. cd distfiles
  58. wget http://developer.axis.com/download/distribution/os-linux-2.6-tag--devboard-R2_01-1.tar.gz
  59. # wget http://www.acmesystems.it/download/os-linux-2.6-tag--devboard-R2_01-1.tar.gz
  60. cd ..
  61. fi
  62.  
  63. # echo "Install sdk ..."
  64. # ./install fox >> install.log
  65.  
  66. # echo "Running configure ..."
  67. # ./configure >> install.log
  68.  
  69. echo "unpacking 2.6"
  70. tar xfz distfiles/os-linux-2.6-tag--devboard-R2_01-1.tar.gz
  71. cd os
  72. ln -s linux-2.6-tag--devboard-R2_01-1 linux-2.6
  73. cd ..
  74.  
  75. echo "Go back to base folder ..."
  76. cd ..
  77.  
  78. # echo "Checking sdk_patch out of subversion ..."
  79. # svn co svn://dev.acmesystems.it/trunk/phrozen_patch/code/ devboard_svn > svn.log
  80. #
  81. # echo "copying checked out files to main folder ..."
  82. # cp -r devboard_svn/* devboard-R2_01/
  83. # cp -r devboard_svn/.svn/ devboard-R2_01/
  84. # cp devboard_svn/.config.orig devboard-R2_01/.config
  85. # cp devboard-R2_01/kernelconfig.orig devboard-R2_01/kernelconfig
  86. # cp devboard-R2_01/kernelconfig-2.6.orig devboard-R2_01/kernelconfig-2.6
  87. # cp devboard-R2_01/axis_config.h.orig devboard-R2_01/axis_config.h
  88. # 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
  89. # yes | rm -r devboard_svn
  90.  
  91. echo "Running final configure ..."
  92. cd devboard-R2_20
  93. cat tools/build/Makefile | sed "s/read _ANSWER/_ANSWER=n/g" > a
  94. mv a tools/build/Makefile
  95. ./configure >> install.log
  96. A=`yes n | \`make oldconfig 2&> install.log\``
  97. ./configure >> install.log
  98.  
  99. echo "etrax100boot must be run by root.";
  100. echo "To make this easier (but less secure) you can make etrax100boot setuid root."
  101. echo -n "Do you want to make etrax100boot setuid root now [yn]? (default n): "
  102. read _ANSWER
  103. if [ "${_ANSWER}" = y ]; then
  104. echo "Please type root's password to make"
  105. echo "etrax100boot setuid root or Ctrl-D to cancel."
  106. su -c "chown root.root tools/build/bin/etrax100boot ; chmod +s tools/build/bin/etrax100boot"
  107. fi
  108.  
  109. echo "Ready to roll :-)"
Advertisement
Add Comment
Please, Sign In to add comment