install.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. #
  3. # arch/arm64/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 the AArch64 Linux port
  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/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
  24. if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
  25. if [ "$(basename $2)" = "Image.gz" ]; 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