Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) # This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) # License.  See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) # for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) # Copyright (C) 1995 by Linus Torvalds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) # Blatantly stolen from in arch/i386/boot/install.sh by Dave Hansen 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) # "make install" script for ppc64 architecture
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) # Arguments:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #   $1 - kernel version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #   $2 - kernel image file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #   $3 - kernel map file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #   $4 - default install path (blank if root directory)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #   $5 and more - kernel boot files; zImage*, uImage, cuImage.*, etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) # Bail with error code if anything goes wrong
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) set -e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) # User may have a custom install script
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) # Default install
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) # this should work for both the pSeries zImage and the iSeries vmlinux.sm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) image_name=`basename $2`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) if [ -f $4/$image_name ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	mv $4/$image_name $4/$image_name.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) if [ -f $4/System.map ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	mv $4/System.map $4/System.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) cat $2 > $4/$image_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) cp $3 $4/System.map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) # Copy all the bootable image files
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) path=$4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) shift 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) while [ $# -ne 0 ]; do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	image_name=`basename $1`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	if [ -f $path/$image_name ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 		mv $path/$image_name $path/$image_name.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 	fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 	cat $1 > $path/$image_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 	shift
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) done;