install.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. #
  3. # arch/arm/boot/install.sh
  4. #
  5. # This file is subject to the terms and conditions of the GNU General Public
  6. # License. See the file "COPYING" in the main directory of this archive
  7. # for more details.
  8. #
  9. # Copyright (C) 1995 by Linus Torvalds
  10. #
  11. # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
  12. # Adapted from code in arch/i386/boot/install.sh by Russell King
  13. #
  14. # "make install" script for arm architecture
  15. #
  16. # Arguments:
  17. # $1 - kernel version
  18. # $2 - kernel image file
  19. # $3 - kernel map file
  20. # $4 - default install path (blank if root directory)
  21. #
  22. # User may have a custom install script
  23. if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
  24. if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
  25. if [ "$(basename $2)" = "zImage" ]; then
  26. # Compressed install
  27. echo "Installing compressed kernel"
  28. base=vmlinuz
  29. else
  30. # Normal install
  31. echo "Installing normal kernel"
  32. base=vmlinux
  33. fi
  34. if [ -f $4/$base-$1 ]; then
  35. mv $4/$base-$1 $4/$base-$1.old
  36. fi
  37. cat $2 > $4/$base-$1
  38. # Install system map file
  39. if [ -f $4/System.map-$1 ]; then
  40. mv $4/System.map-$1 $4/System.map-$1.old
  41. fi
  42. cp $3 $4/System.map-$1
  43. if [ -x /sbin/loadmap ]; then
  44. /sbin/loadmap
  45. else
  46. echo "You have to install it yourself"
  47. fi