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) # arch/sh/boot/install.sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) # This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) # License.  See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) # for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) # Copyright (C) 1995 by Linus Torvalds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) # Adapted from code in arch/i386/boot/install.sh by Russell King
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) # Adapted from code in arch/arm/boot/install.sh by Stuart Menefy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) # "make install" script for sh architecture
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) # Arguments:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #   $1 - kernel version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #   $2 - kernel image file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #   $3 - kernel map file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #   $4 - default install path (blank if root directory)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #
^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 /sbin/${INSTALLKERNEL} ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)   exec /sbin/${INSTALLKERNEL} "$@"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) if [ "$2" = "zImage" ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) # Compressed install
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)   echo "Installing compressed kernel"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)   if [ -f $4/vmlinuz-$1 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)     mv $4/vmlinuz-$1 $4/vmlinuz.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)   fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)   if [ -f $4/System.map-$1 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)     mv $4/System.map-$1 $4/System.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)   fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)   cat $2 > $4/vmlinuz-$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)   cp $3 $4/System.map-$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) # Normal install
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)   echo "Installing normal kernel"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)   if [ -f $4/vmlinux-$1 ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)     mv $4/vmlinux-$1 $4/vmlinux.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)   fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)   if [ -f $4/System.map ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)     mv $4/System.map $4/System.old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)   fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)   cat $2 > $4/vmlinux-$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)   cp $3 $4/System.map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) fi