install.sh 1.0 KB

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