install.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. # Blatantly stolen from in arch/i386/boot/install.sh by Dave Hansen
  10. #
  11. # "make install" script for ppc64 architecture
  12. #
  13. # Arguments:
  14. # $1 - kernel version
  15. # $2 - kernel image file
  16. # $3 - kernel map file
  17. # $4 - default install path (blank if root directory)
  18. # $5 - kernel boot file, the zImage
  19. #
  20. # User may have a custom install script
  21. if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
  22. if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
  23. # Default install
  24. # this should work for both the pSeries zImage and the iSeries vmlinux.sm
  25. image_name=`basename $2`
  26. if [ -f $4/$image_name ]; then
  27. mv $4/$image_name $4/$image_name.old
  28. fi
  29. if [ -f $4/System.map ]; then
  30. mv $4/System.map $4/System.old
  31. fi
  32. cat $2 > $4/$image_name
  33. cp $3 $4/System.map