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) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) FILES='
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) include/uapi/linux/const.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) include/uapi/drm/drm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) include/uapi/drm/i915_drm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) include/uapi/linux/fadvise.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) include/uapi/linux/fcntl.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) include/uapi/linux/fs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) include/uapi/linux/fscrypt.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) include/uapi/linux/kcmp.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) include/uapi/linux/kvm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) include/uapi/linux/in.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) include/uapi/linux/mount.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) include/uapi/linux/openat2.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) include/uapi/linux/perf_event.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) include/uapi/linux/prctl.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) include/uapi/linux/sched.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) include/uapi/linux/stat.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) include/uapi/linux/usbdevice_fs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) include/uapi/linux/vhost.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) include/uapi/sound/asound.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) include/linux/bits.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) include/vdso/bits.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) include/linux/const.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) include/vdso/const.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) include/linux/hash.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) include/uapi/linux/hw_breakpoint.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) arch/x86/include/asm/disabled-features.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) arch/x86/include/asm/required-features.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) arch/x86/include/asm/cpufeatures.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) arch/x86/include/asm/inat_types.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) arch/x86/include/asm/emulate_prefix.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) arch/x86/include/asm/irq_vectors.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) arch/x86/include/asm/msr-index.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) arch/x86/include/uapi/asm/prctl.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) arch/x86/lib/x86-opcode-map.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) arch/x86/tools/gen-insn-attr-x86.awk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) arch/arm/include/uapi/asm/perf_regs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) arch/arm64/include/uapi/asm/perf_regs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) arch/powerpc/include/uapi/asm/perf_regs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) arch/s390/include/uapi/asm/perf_regs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) arch/x86/include/uapi/asm/perf_regs.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) arch/x86/include/uapi/asm/kvm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) arch/x86/include/uapi/asm/kvm_perf.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) arch/x86/include/uapi/asm/svm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) arch/x86/include/uapi/asm/unistd.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) arch/x86/include/uapi/asm/vmx.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) arch/powerpc/include/uapi/asm/kvm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) arch/s390/include/uapi/asm/kvm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) arch/s390/include/uapi/asm/kvm_perf.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) arch/s390/include/uapi/asm/ptrace.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) arch/s390/include/uapi/asm/sie.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) arch/arm/include/uapi/asm/kvm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) arch/arm64/include/uapi/asm/kvm.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) arch/arm64/include/uapi/asm/unistd.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) arch/alpha/include/uapi/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) arch/mips/include/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) arch/mips/include/uapi/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) arch/parisc/include/uapi/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) arch/powerpc/include/uapi/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) arch/sparc/include/uapi/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) arch/x86/include/uapi/asm/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) include/asm-generic/bitops/arch_hweight.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) include/asm-generic/bitops/const_hweight.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) include/asm-generic/bitops/__fls.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) include/asm-generic/bitops/fls.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) include/asm-generic/bitops/fls64.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) include/linux/coresight-pmu.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) include/uapi/asm-generic/errno.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) include/uapi/asm-generic/errno-base.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) include/uapi/asm-generic/ioctls.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) include/uapi/asm-generic/mman-common.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) include/uapi/asm-generic/unistd.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) '
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) # These copies are under tools/perf/trace/beauty/ as they are not used to in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) # building object files only by scripts in tools/perf/trace/beauty/ to generate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) # tables that then gets included in .c files for things like id->string syscall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) # tables (and the reverse lookup as well: string -> id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) BEAUTY_FILES='
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) include/linux/socket.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) '
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) check_2 () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)   file1=$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)   file2=$2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)   shift
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)   shift
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)   cmd="diff $* $file1 $file2 > /dev/null"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)   test -f $file2 && {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)     eval $cmd || {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)       echo "Warning: Kernel ABI header at '$file1' differs from latest version at '$file2'" >&2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)       echo diff -u $file1 $file2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)     }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)   }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) check () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)   file=$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)   shift
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)   check_2 tools/$file $file $*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) beauty_check () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)   file=$1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)   shift
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)   check_2 tools/perf/trace/beauty/$file $file $*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) # Check if we have the kernel headers (tools/perf/../../include), else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) # we're probably on a detached tarball, so no point in trying to check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) # differences.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) test -d ../../include || exit 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) cd ../..
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) # simple diff check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) for i in $FILES; do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)   check $i -B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) # diff with extra ignore lines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) check arch/x86/lib/memcpy_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memcpy_\(erms\|orig\))"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) check arch/x86/lib/memset_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" -I"^SYM_FUNC_START\(_LOCAL\)*(memset_\(erms\|orig\))"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common\(-tools\)*.h>"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) check include/uapi/linux/mman.h       '-I "^#include <\(uapi/\)*asm/mman.h>"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) check include/linux/build_bug.h       '-I "^#\(ifndef\|endif\)\( \/\/\)* static_assert$"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) check include/linux/ctype.h	      '-I "isdigit("'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) check lib/ctype.c		      '-I "^EXPORT_SYMBOL" -I "^#include <linux/export.h>" -B'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) check arch/x86/include/asm/inat.h     '-I "^#include [\"<]\(asm/\)*inat_types.h[\">]"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) check arch/x86/include/asm/insn.h     '-I "^#include [\"<]\(asm/\)*inat.h[\">]"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) check arch/x86/lib/inat.c	      '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) check arch/x86/lib/insn.c             '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) # diff non-symmetric files
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) check_2 tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) for i in $BEAUTY_FILES; do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)   beauty_check $i -B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) # check duplicated library files
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) cd tools/perf