Coconutat / Huawei-GSI-And-Modify-Or-Support-KernelSU-Tutorial

Flash Huawei Devices and Repair It Tutorial.The tutorial is written in simplified Chinese.
GNU General Public License v2.0
42 stars 5 forks source link

P30Pro kernel build error #3

Closed xiao-k233 closed 4 months ago

xiao-k233 commented 4 months ago

按照wiki里的教程,改了.config,以及针对kernelsu的patch kernel版本:

VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 116
EXTRAVERSION =

执行命令:make ARCH=arm64 O=out CC="ccache clang" -j$(nproc --all) 输出:

killerz@gfs-matebook:~/p30_e10/Code_Opensource/kernel$ make ARCH=arm64 O=out CC="ccache clang" -j$(nproc --all)
make[1]: Entering directory '/home/killerz/p30_e10/Code_Opensource/kernel/out'
  GEN     /home/killerz/p30_e10/Code_Opensource/kernel/out/Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
drivers/hisi/ivp/Kconfig:30:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:34:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:38:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:42:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:46:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:50:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:54:warning: choice value used outside its choice group
drivers/hisi/ivp/Kconfig:58:warning: choice value used outside its choice group
*
* Restart config...
*
*
* KernelSU
*
KernelSU function support (KSU) [Y/n/m/?] (NEW)
  KernelSU debug mode (KSU_DEBUG) [N/y/?] (NEW)
#
# configuration written to .config
#
arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable
  CHK     include/config/kernel.release
  GEN     /home/killerz/p30_e10/Code_Opensource/kernel/out/Makefile
  WRAP    arch/arm64/include/generated/uapi/asm/errno.h
  WRAP    arch/arm64/include/generated/uapi/asm/ioctl.h
  WRAP    arch/arm64/include/generated/uapi/asm/ioctls.h
  WRAP    arch/arm64/include/generated/uapi/asm/ipcbuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/kvm_para.h
  WRAP    arch/arm64/include/generated/uapi/asm/mman.h
  WRAP    arch/arm64/include/generated/uapi/asm/msgbuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/poll.h
  WRAP    arch/arm64/include/generated/uapi/asm/resource.h
  WRAP    arch/arm64/include/generated/uapi/asm/sembuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/shmbuf.h
  WRAP    arch/arm64/include/generated/uapi/asm/socket.h
  WRAP    arch/arm64/include/generated/uapi/asm/sockios.h
  WRAP    arch/arm64/include/generated/uapi/asm/swab.h
  WRAP    arch/arm64/include/generated/uapi/asm/termbits.h
  WRAP    arch/arm64/include/generated/uapi/asm/termios.h
  WRAP    arch/arm64/include/generated/uapi/asm/types.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  HOSTCC  scripts/basic/fixdep
  UPD     include/config/kernel.release
  HOSTCC  scripts/basic/bin2c
../drivers/connectivity/hi11xx/hi1102a/platform/hi1102a_comm_defconfig:49: hisi built-in no
../drivers/connectivity/hi11xx/hi1103/platform/hi1103_comm_defconfig:42: hisi built-in no
../drivers/connectivity/hi11xx/hi1102a/platform/Makefile:33: defconfig: ../drivers/connectivity/hi11xx/hi1102a/platform/plat_1102a_default_defconfig
../drivers/connectivity/hi11xx/hi1103/platform/Makefile:23: defconfig: ../drivers/connectivity/hi11xx/hi1103/platform/plat_1103_default_defconfig
../drivers/connectivity/hi11xx/hi1102a/platform/Makefile:197: HI110X_VER_COMMIT_ID:
../drivers/connectivity/hi11xx/hi1102a/platform/Makefile:198: HI110X_VER_COMMIT_TIME:
../drivers/connectivity/hi11xx/hi1102a/platform/Makefile:199: HI110X_VERSION:
../drivers/connectivity/hi11xx/hi1103/platform/Makefile:186: HI110X_VER_COMMIT_ID:
../drivers/connectivity/hi11xx/hi1103/platform/Makefile:187: HI110X_VER_COMMIT_TIME:
../drivers/connectivity/hi11xx/hi1103/platform/Makefile:188: HI110X_VERSION:
../drivers/connectivity/hi11xx/hi1102a/wifi/Makefile:2: HI1102_DRIVER_BUILTIN_PATH drivers/connectivity/hi11xx
../drivers/connectivity/hi11xx/hi1102a/platform/hi1102a_comm_defconfig:49: hisi built-in no
../drivers/connectivity/hi11xx/hi1102a/wifi/Makefile:43: defconfig: ../drivers/connectivity/hi11xx/hi1102a/wifi/wifi_1102a_default_defconfig
../drivers/connectivity/hi11xx/hi1103/wifi/1103/Makefile:2: HI110X_DRIVER_BUILTIN_PATH drivers/connectivity/hi11xx
../drivers/connectivity/hi11xx/hi1103/platform/hi1103_comm_defconfig:42: hisi built-in no
../drivers/connectivity/hi11xx/hi1103/wifi/1103/Makefile:24: defconfig: ../drivers/connectivity/hi11xx/hi1103/wifi/1103/wifi_1103_default_defconfig
  Using .. as source for kernel
  WRAP    arch/arm64/include/generated/asm/bugs.h
  WRAP    arch/arm64/include/generated/asm/clkdev.h
  WRAP    arch/arm64/include/generated/asm/delay.h
  WRAP    arch/arm64/include/generated/asm/div64.h
  WRAP    arch/arm64/include/generated/asm/dma.h
  WRAP    arch/arm64/include/generated/asm/dma-contiguous.h
  WRAP    arch/arm64/include/generated/asm/early_ioremap.h
  WRAP    arch/arm64/include/generated/asm/emergency-restart.h
  WRAP    arch/arm64/include/generated/asm/hw_irq.h
  WRAP    arch/arm64/include/generated/asm/irq_regs.h
  WRAP    arch/arm64/include/generated/asm/kdebug.h
  WRAP    arch/arm64/include/generated/asm/kmap_types.h
  WRAP    arch/arm64/include/generated/asm/local.h
  WRAP    arch/arm64/include/generated/asm/local64.h
-- KernelSU version: 11682
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/mm-arch-hooks.h
-- KernelSU Manager signature size: 0x033b
-- KernelSU Manager signature hash: c371061b19d8c7d7d6133c6a9bafe198fa944e50c1b31c9d8daa8d7f1fc2d2d6
  CHK     include/generated/utsrelease.h
  WRAP    arch/arm64/include/generated/asm/msi.h
  WRAP    arch/arm64/include/generated/asm/rwsem.h
  WRAP    arch/arm64/include/generated/asm/preempt.h
  WRAP    arch/arm64/include/generated/asm/segment.h
  WRAP    arch/arm64/include/generated/asm/serial.h
  WRAP    arch/arm64/include/generated/asm/set_memory.h
  WRAP    arch/arm64/include/generated/asm/sizes.h
  WRAP    arch/arm64/include/generated/asm/switch_to.h
  WRAP    arch/arm64/include/generated/asm/trace_clock.h
  WRAP    arch/arm64/include/generated/asm/unaligned.h
  WRAP    arch/arm64/include/generated/asm/user.h
  UPD     include/generated/utsrelease.h
  WRAP    arch/arm64/include/generated/asm/vga.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/kallsyms
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/conmakehash
  SHIPPED scripts/genksyms/lex.lex.c
  SHIPPED scripts/genksyms/parse.tab.h
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/sortextable
  CC      scripts/mod/empty.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
In file included from ../scripts/selinux/genheaders/genheaders.c:19:
../security/selinux/include/classmap.h:247:2: error: New address family defined, please update secclass_map.
#error New address family defined, please update secclass_map.
 ^
In file included from ../scripts/selinux/mdp/mdp.c:49:
../security/selinux/include/classmap.h:247:2: error: New address family defined, please update secclass_map.
#error New address family defined, please update secclass_map.
 ^
1 error generated.
1 error generated.
make[4]: *** [scripts/Makefile.host:102: scripts/selinux/genheaders/genheaders] Error 1
make[3]: *** [../scripts/Makefile.build:708: scripts/selinux/genheaders] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC      scripts/mod/devicetable-offsets.s
make[4]: *** [scripts/Makefile.host:102: scripts/selinux/mdp/mdp] Error 1
make[3]: *** [../scripts/Makefile.build:708: scripts/selinux/mdp] Error 2
make[2]: *** [../scripts/Makefile.build:708: scripts/selinux] Error 2
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/util.o
  SHIPPED scripts/dtc/dtc-lexer.lex.c
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  CHK     scripts/mod/devicetable-offsets.h
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
  UPD     include/generated/timeconst.h
  HOSTLD  scripts/genksyms/genksyms
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTLD  scripts/dtc/dtc
  HOSTLD  scripts/mod/modpost
make[1]: *** [/home/killerz/p30_e10/Code_Opensource/kernel/Makefile:622: scripts] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from ../arch/arm64/kernel/asm-offsets.c:21:
In file included from ../include/linux/sched.h:14:
In file included from ../include/linux/pid.h:5:
In file included from ../include/linux/rculist.h:11:
In file included from ../include/linux/rcupdate.h:40:
In file included from ../include/linux/preempt.h:81:
In file included from /home/killerz/p30_e10/Code_Opensource/kernel/out/arch/arm64/include/generated/asm/preempt.h:1:
In file included from ../include/asm-generic/preempt.h:5:
In file included from ../include/linux/thread_info.h:38:
In file included from ../arch/arm64/include/asm/thread_info.h:31:
../arch/arm64/include/asm/stack_pointer.h:8:51: error: register 'sp' unsuitable for global register variables on this target
register unsigned long current_stack_pointer asm ("sp");
                                                  ^
In file included from ../arch/arm64/kernel/asm-offsets.c:21:
In file included from ../include/linux/sched.h:15:
In file included from ../include/linux/sem.h:9:
In file included from ../include/uapi/linux/sem.h:5:
In file included from ../include/linux/ipc.h:5:
In file included from ../include/linux/spinlock.h:88:
../arch/arm64/include/asm/spinlock.h:67:28: error: value '65536' out of range for constraint 'I'
        : "Q" (lock->owner), "I" (1 << TICKET_SHIFT)
                                  ^~~~~~~~~~~~~~~~~
../arch/arm64/include/asm/spinlock.h:96:9: error: value '65536' out of range for constraint 'I'
        : "I" (1 << TICKET_SHIFT)
               ^~~~~~~~~~~~~~~~~
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:81:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return (set->sig[3] | set->sig[2] |
                        ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:81:25: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return (set->sig[3] | set->sig[2] |
                                      ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:82:4: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        set->sig[1] | set->sig[0]) == 0;
                        ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:84:11: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return (set->sig[1] | set->sig[0]) == 0;
                        ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[3] == set2->sig[3]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:97:27: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[3] == set2->sig[3]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:98:5: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[2] == set2->sig[2]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:98:21: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[2] == set2->sig[2]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:99:5: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[1] == set2->sig[1]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:99:21: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[1] == set2->sig[1]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:102:11: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[1] == set2->sig[1]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:102:27: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[1] == set2->sig[1]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:124:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:125:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:128:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:124:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:125:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:128:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:124:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:125:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:128:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:156:27: note: expanded from macro '_SIG_SET_OP'
        case 4: set->sig[3] = op(set->sig[3]);                          \
                                 ^        ~
../include/linux/signal.h:166:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:156:10: note: expanded from macro '_SIG_SET_OP'
        case 4: set->sig[3] = op(set->sig[3]);                          \
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:157:20: note: expanded from macro '_SIG_SET_OP'
                set->sig[2] = op(set->sig[2]);                          \
                                 ^        ~
../include/linux/signal.h:166:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:157:3: note: expanded from macro '_SIG_SET_OP'
                set->sig[2] = op(set->sig[2]);                          \
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:158:27: note: expanded from macro '_SIG_SET_OP'
        case 2: set->sig[1] = op(set->sig[1]);                          \
                                 ^        ~
../include/linux/signal.h:166:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:158:10: note: expanded from macro '_SIG_SET_OP'
        case 2: set->sig[1] = op(set->sig[1]);                          \
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:178:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = 0;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:190:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = -1;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:220:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = 0;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:232:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = -1;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:25:
In file included from ../include/linux/suspend.h:5:
In file included from ../include/linux/swap.h:9:
In file included from ../include/linux/memcontrol.h:31:
In file included from ../include/linux/writeback.h:212:
In file included from ../include/linux/bio.h:21:
In file included from ../include/linux/highmem.h:9:
In file included from ../include/linux/uaccess.h:14:
In file included from ../arch/arm64/include/asm/uaccess.h:37:
In file included from ../include/linux/hisi/hisi_hkip.h:29:
In file included from ../include/linux/hisi/hisi_hhee.h:26:
../include/linux/arm-smccc.h:135:34: error: unknown register name 'x0' in asm
        register unsigned long arg0 asm("x0") = a0;
                                        ^
../include/linux/arm-smccc.h:136:34: error: unknown register name 'x1' in asm
        register unsigned long arg1 asm("x1") = a1;
                                        ^
../include/linux/arm-smccc.h:137:34: error: unknown register name 'x2' in asm
        register unsigned long arg2 asm("x2") = a2;
                                        ^
../include/linux/arm-smccc.h:138:34: error: unknown register name 'x3' in asm
        register unsigned long arg3 asm("x3") = a3;
                                        ^
../include/linux/arm-smccc.h:139:34: error: unknown register name 'x4' in asm
        register unsigned long arg4 asm("x4") = a4;
                                        ^
../include/linux/arm-smccc.h:140:34: error: unknown register name 'x5' in asm
        register unsigned long arg5 asm("x5") = a5;
                                        ^
../include/linux/arm-smccc.h:141:34: error: unknown register name 'x6' in asm
        register unsigned long arg6 asm("x6") = a6;
                                        ^
../include/linux/arm-smccc.h:142:34: error: unknown register name 'x7' in asm
        register unsigned long arg7 asm("x7") = a7;
                                        ^
../include/linux/arm-smccc.h:181:34: error: unknown register name 'x0' in asm
        register unsigned long arg0 asm("x0") = a0;
                                        ^
../include/linux/arm-smccc.h:182:34: error: unknown register name 'x1' in asm
        register unsigned long arg1 asm("x1") = a1;
                                        ^
../include/linux/arm-smccc.h:183:34: error: unknown register name 'x2' in asm
        register unsigned long arg2 asm("x2") = a2;
                                        ^
../include/linux/arm-smccc.h:184:34: error: unknown register name 'x3' in asm
        register unsigned long arg3 asm("x3") = a3;
                                        ^
../include/linux/arm-smccc.h:185:34: error: unknown register name 'x4' in asm
        register unsigned long arg4 asm("x4") = a4;
                                        ^
../include/linux/arm-smccc.h:186:34: error: unknown register name 'x5' in asm
        register unsigned long arg5 asm("x5") = a5;
                                        ^
../include/linux/arm-smccc.h:187:34: error: unknown register name 'x6' in asm
        register unsigned long arg6 asm("x6") = a6;
                                        ^
../include/linux/arm-smccc.h:188:34: error: unknown register name 'x7' in asm
        register unsigned long arg7 asm("x7") = a7;
                                        ^
49 warnings and 19 errors generated.
make[2]: *** [.././Kbuild:58: arch/arm64/kernel/asm-offsets.s] Error 1
make[1]: *** [/home/killerz/p30_e10/Code_Opensource/kernel/Makefile:1233: prepare0] Error 2
make[1]: Leaving directory '/home/killerz/p30_e10/Code_Opensource/kernel/out'
make: *** [Makefile:153: sub-make] Error 2
killerz@gfs-matebook:~/p30_e10/Code_Opensource/kernel$

按照4.14适配教程来的,确认了两次都没问题,难道是我kernel下载下来有问题?官网下载的emui10的opensource 文件名:Vogue_10_EMUI10.0_opensource.tar

xiao-k233 commented 4 months ago

顺带一提,在此之前已经按照官方readme执行了make ARCH=arm64 O=../out merge_kirin980_defconfig(在我做出所有更改之前 难道我需要再来一遍?

Coconutat commented 4 months ago

不需要,需要参考这个patch:

---
 scripts/selinux/genheaders/genheaders.c | 1 -
 scripts/selinux/mdp/mdp.c               | 1 -
 security/selinux/include/classmap.h     | 1 +
 3 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c
index 1ceedea847dd..544ca126a8a8 100644
--- a/scripts/selinux/genheaders/genheaders.c
+++ b/scripts/selinux/genheaders/genheaders.c
@@ -9,7 +9,6 @@
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
-#include <sys/socket.h>

 struct security_class_mapping {
    const char *name;
diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c
index 073fe7537f6c..6d51b74bc679 100644
--- a/scripts/selinux/mdp/mdp.c
+++ b/scripts/selinux/mdp/mdp.c
@@ -32,7 +32,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <sys/socket.h>

 static void usage(char *name)
 {
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
index bd5fe0d3204a..201f7e588a29 100644
--- a/security/selinux/include/classmap.h
+++ b/security/selinux/include/classmap.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/capability.h>
+#include <linux/socket.h>

 #define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \
     "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append", "map"
-- 
2.20.1
xiao-k233 commented 4 months ago

发完issues我就注意到了,改了还是不行

---Original--- From: @.> Date: Fri, Jul 26, 2024 21:37 PM To: @.>; Cc: @.**@.>; Subject: Re: [Coconutat/Huawei-GSI-And-Modify-Or-Support-KernelSU-Tutorial]P30Pro kernel build error (Issue #3)

不需要,需要参考这个patch: --- scripts/selinux/genheaders/genheaders.c | 1 - scripts/selinux/mdp/mdp.c | 1 - security/selinux/include/classmap.h | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c index 1ceedea847dd..544ca126a8a8 100644 --- a/scripts/selinux/genheaders/genheaders.c +++ b/scripts/selinux/genheaders/genheaders.c @@ -9,7 +9,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <sys/socket.h> struct security_class_mapping { const char name; diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c index 073fe7537f6c..6d51b74bc679 100644 --- a/scripts/selinux/mdp/mdp.c +++ b/scripts/selinux/mdp/mdp.c @@ -32,7 +32,6 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/socket.h> static void usage(char name) { diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index bd5fe0d3204a..201f7e588a29 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h @@ -1,5 +1,6 @@ / SPDX-License-Identifier: GPL-2.0 / #include <linux/capability.h> +#include <linux/socket.h> #define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \ "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append", "map" -- 2.20.1
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Coconutat commented 4 months ago

发完issues我就注意到了,改了还是不行 ---Original--- From: @.> Date: Fri, Jul 26, 2024 21:37 PM To: @.>; Cc: @.**@.>; Subject: Re: [Coconutat/Huawei-GSI-And-Modify-Or-Support-KernelSU-Tutorial]P30Pro kernel build error (Issue #3) 不需要,需要参考这个patch: --- scripts/selinux/genheaders/genheaders.c | 1 - scripts/selinux/mdp/mdp.c | 1 - security/selinux/include/classmap.h | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c index 1ceedea847dd..544ca126a8a8 100644 --- a/scripts/selinux/genheaders/genheaders.c +++ b/scripts/selinux/genheaders/genheaders.c @@ -9,7 +9,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <sys/socket.h> struct security_class_mapping { const char name; diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c index 073fe7537f6c..6d51b74bc679 100644 --- a/scripts/selinux/mdp/mdp.c +++ b/scripts/selinux/mdp/mdp.c @@ -32,7 +32,6 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/socket.h> static void usage(char name) { diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index bd5fe0d3204a..201f7e588a29 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h @@ -1,5 +1,6 @@ / SPDX-License-Identifier: GPL-2.0 / #include <linux/capability.h> +#include <linux/socket.h> #define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \ "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append", "map" -- 2.20.1 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

改完以后看你的新错误。另外改defconfig还是参考EMUI 9的稍微好一点。最后注意开源的内核发布日期是否和你手机系统的安全日期对应。

xiao-k233 commented 4 months ago

后面的汇编相关报错也是因为这个吗?

Coconutat commented 4 months ago

后面的汇编相关报错也是因为这个吗?

你最新编译日志发给我看看。

xiao-k233 commented 4 months ago

我手机还没解锁,打算解锁先研究着 现在的报错:

killerz@gfs-matebook:~/p30_e10/Code_Opensource/kernel$ make ARCH=arm64 O=out CC="ccache clang" -j$(nproc --all)
make[1]: Entering directory '/home/killerz/p30_e10/Code_Opensource/kernel/out'
arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable
  CHK     include/config/kernel.release
  GEN     /home/killerz/p30_e10/Code_Opensource/kernel/out/Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  Using .. as source for kernel
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
In file included from ../arch/arm64/kernel/asm-offsets.c:21:
In file included from ../include/linux/sched.h:14:
In file included from ../include/linux/pid.h:5:
In file included from ../include/linux/rculist.h:11:
In file included from ../include/linux/rcupdate.h:40:
In file included from ../include/linux/preempt.h:81:
In file included from /home/killerz/p30_e10/Code_Opensource/kernel/out/arch/arm64/include/generated/asm/preempt.h:1:
In file included from ../include/asm-generic/preempt.h:5:
In file included from ../include/linux/thread_info.h:38:
In file included from ../arch/arm64/include/asm/thread_info.h:31:
../arch/arm64/include/asm/stack_pointer.h:8:51: error: register 'sp' unsuitable for global register variables on this target
register unsigned long current_stack_pointer asm ("sp");
                                                  ^
In file included from ../arch/arm64/kernel/asm-offsets.c:21:
In file included from ../include/linux/sched.h:15:
In file included from ../include/linux/sem.h:9:
In file included from ../include/uapi/linux/sem.h:5:
In file included from ../include/linux/ipc.h:5:
In file included from ../include/linux/spinlock.h:88:
../arch/arm64/include/asm/spinlock.h:67:28: error: value '65536' out of range for constraint 'I'
        : "Q" (lock->owner), "I" (1 << TICKET_SHIFT)
                                  ^~~~~~~~~~~~~~~~~
../arch/arm64/include/asm/spinlock.h:96:9: error: value '65536' out of range for constraint 'I'
        : "I" (1 << TICKET_SHIFT)
               ^~~~~~~~~~~~~~~~~
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:81:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return (set->sig[3] | set->sig[2] |
                        ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:81:25: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return (set->sig[3] | set->sig[2] |
                                      ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:82:4: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        set->sig[1] | set->sig[0]) == 0;
                        ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:84:11: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return (set->sig[1] | set->sig[0]) == 0;
                        ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[3] == set2->sig[3]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:97:27: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[3] == set2->sig[3]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:98:5: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[2] == set2->sig[2]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:98:21: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[2] == set2->sig[2]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:99:5: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[1] == set2->sig[1]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:99:21: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                        (set1->sig[1] == set2->sig[1]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:102:11: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[1] == set2->sig[1]) &&
                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:102:27: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
                return  (set1->sig[1] == set2->sig[1]) &&
                                         ^         ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:124:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:125:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:139:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigorsets, _sig_or)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:128:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:124:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:125:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:142:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandsets, _sig_and)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:128:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:8: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:122:24: note: expanded from macro '_SIG_SET_BINOP'
                a3 = a->sig[3]; a2 = a->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:8: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:123:24: note: expanded from macro '_SIG_SET_BINOP'
                b3 = b->sig[3]; b2 = b->sig[2];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:124:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[3] = op(a3, b3);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:125:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[2] = op(a2, b2);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:8: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:127:24: note: expanded from macro '_SIG_SET_BINOP'
                a1 = a->sig[1]; b1 = b->sig[1];                         \
                                     ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:145:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_BINOP(sigandnsets, _sig_andn)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:128:3: note: expanded from macro '_SIG_SET_BINOP'
                r->sig[1] = op(a1, b1);                                 \
                ^      ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:156:27: note: expanded from macro '_SIG_SET_OP'
        case 4: set->sig[3] = op(set->sig[3]);                          \
                                 ^        ~
../include/linux/signal.h:166:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:156:10: note: expanded from macro '_SIG_SET_OP'
        case 4: set->sig[3] = op(set->sig[3]);                          \
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:157:20: note: expanded from macro '_SIG_SET_OP'
                set->sig[2] = op(set->sig[2]);                          \
                                 ^        ~
../include/linux/signal.h:166:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:157:3: note: expanded from macro '_SIG_SET_OP'
                set->sig[2] = op(set->sig[2]);                          \
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:158:27: note: expanded from macro '_SIG_SET_OP'
        case 2: set->sig[1] = op(set->sig[1]);                          \
                                 ^        ~
../include/linux/signal.h:166:24: note: expanded from macro '_sig_not'
#define _sig_not(x)     (~(x))
                           ^
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:167:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
_SIG_SET_OP(signotset, _sig_not)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/signal.h:158:10: note: expanded from macro '_SIG_SET_OP'
        case 2: set->sig[1] = op(set->sig[1]);                          \
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:178:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = 0;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:190:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = -1;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:220:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = 0;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:24:
In file included from ../include/linux/kvm_host.h:14:
../include/linux/signal.h:232:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
        case 2: set->sig[1] = -1;
                ^        ~
../include/uapi/asm-generic/signal.h:91:2: note: array 'sig' declared here
        unsigned long sig[_NSIG_WORDS];
        ^
In file included from ../arch/arm64/kernel/asm-offsets.c:25:
In file included from ../include/linux/suspend.h:5:
In file included from ../include/linux/swap.h:9:
In file included from ../include/linux/memcontrol.h:31:
In file included from ../include/linux/writeback.h:212:
In file included from ../include/linux/bio.h:21:
In file included from ../include/linux/highmem.h:9:
In file included from ../include/linux/uaccess.h:14:
In file included from ../arch/arm64/include/asm/uaccess.h:37:
In file included from ../include/linux/hisi/hisi_hkip.h:29:
In file included from ../include/linux/hisi/hisi_hhee.h:26:
../include/linux/arm-smccc.h:135:34: error: unknown register name 'x0' in asm
        register unsigned long arg0 asm("x0") = a0;
                                        ^
../include/linux/arm-smccc.h:136:34: error: unknown register name 'x1' in asm
        register unsigned long arg1 asm("x1") = a1;
                                        ^
../include/linux/arm-smccc.h:137:34: error: unknown register name 'x2' in asm
        register unsigned long arg2 asm("x2") = a2;
                                        ^
../include/linux/arm-smccc.h:138:34: error: unknown register name 'x3' in asm
        register unsigned long arg3 asm("x3") = a3;
                                        ^
../include/linux/arm-smccc.h:139:34: error: unknown register name 'x4' in asm
        register unsigned long arg4 asm("x4") = a4;
                                        ^
../include/linux/arm-smccc.h:140:34: error: unknown register name 'x5' in asm
        register unsigned long arg5 asm("x5") = a5;
                                        ^
../include/linux/arm-smccc.h:141:34: error: unknown register name 'x6' in asm
        register unsigned long arg6 asm("x6") = a6;
                                        ^
../include/linux/arm-smccc.h:142:34: error: unknown register name 'x7' in asm
        register unsigned long arg7 asm("x7") = a7;
                                        ^
../include/linux/arm-smccc.h:181:34: error: unknown register name 'x0' in asm
        register unsigned long arg0 asm("x0") = a0;
                                        ^
../include/linux/arm-smccc.h:182:34: error: unknown register name 'x1' in asm
        register unsigned long arg1 asm("x1") = a1;
                                        ^
../include/linux/arm-smccc.h:183:34: error: unknown register name 'x2' in asm
        register unsigned long arg2 asm("x2") = a2;
                                        ^
../include/linux/arm-smccc.h:184:34: error: unknown register name 'x3' in asm
        register unsigned long arg3 asm("x3") = a3;
                                        ^
../include/linux/arm-smccc.h:185:34: error: unknown register name 'x4' in asm
        register unsigned long arg4 asm("x4") = a4;
                                        ^
../include/linux/arm-smccc.h:186:34: error: unknown register name 'x5' in asm
        register unsigned long arg5 asm("x5") = a5;
                                        ^
../include/linux/arm-smccc.h:187:34: error: unknown register name 'x6' in asm
        register unsigned long arg6 asm("x6") = a6;
                                        ^
../include/linux/arm-smccc.h:188:34: error: unknown register name 'x7' in asm
        register unsigned long arg7 asm("x7") = a7;
                                        ^
49 warnings and 19 errors generated.
make[2]: *** [.././Kbuild:58: arch/arm64/kernel/asm-offsets.s] Error 1
make[1]: *** [/home/killerz/p30_e10/Code_Opensource/kernel/Makefile:1233: prepare0] Error 2
make[1]: Leaving directory '/home/killerz/p30_e10/Code_Opensource/kernel/out'
make: *** [Makefile:153: sub-make] Error 2

没有了那个selinux报错

xiao-k233 commented 4 months ago

操了,之前手贱执行了defconfig,把我改了好久的.config干没了

Coconutat commented 4 months ago

操了,之前手贱执行了defconfig,把我改了好久的.config干没了

一般情况下这种报错都是交叉编译器没选对啥的。asm-offsets.s这个错误我编译P30内核的时候没遇到过。不过你说你P30没解锁...P30没法再EMUI10解锁。只能降级到9.1.0解锁。而且不能升级,EMUI10屏蔽了USER LOCK,只有FB LOCK能用。但是980没法解锁FB LOCK吧。

Coconutat commented 4 months ago

操了,之前手贱执行了defconfig,把我改了好久的.config干没了

除非你是工程机。

xiao-k233 commented 4 months ago

还是能刷个LOS20的安卓13的gsi 交叉编译器没选对。。。。嗯。。。大佬能说一下选什么吗 README里说的就是aarch64-linux-android-4.9

xiao-k233 commented 4 months ago

貌似解决了,export CROSS_COMPILE=aarch64-linux-android-我忘了设置

xiao-k233 commented 4 months ago

笑喜了,抱歉浪费您的时间

xiao-k233 commented 4 months ago

大佬,我还是有个问题

最后注意开源的内核发布日期是否和你手机系统的安全日期对应。

如果说我降级到emui9.1 ,那么官方开源出来这个内核我是用不了的? This kernel package is released for the phone software version 2019-10-30 那就是说这个内核需要搭配19年10月30日的更新使用?如果我刷了安卓13的GSI呐

Coconutat commented 4 months ago

大佬,我还是有个问题

最后注意开源的内核发布日期是否和你手机系统的安全日期对应。

如果说我降级到emui9.1 ,那么官方开源出来这个内核我是用不了的? This kernel package is released for the phone software version 2019-10-30 那就是说这个内核需要搭配19年10月30日的更新使用?如果我刷了安卓13的GSI呐

不管刷什么GSI,先看你原装固件的安全日期。因为华为发布的开源内核有个README_Version.txt,里面写了对应固件的安全日期。如果原生固件日期高于这个,就不能开机。你想刷GSI只能降级到EMUI9.1,你就是EMUI10能解开FB LOCK,也没法刷,因为华为动态分区的问题。而且还有镜像验证。你只能找P30开源的EMUI9.1的开源内核。

xiao-k233 commented 4 months ago

看明白了,华为还开源了hm3.0和4.0的,我去改那几个就好了十八,感谢大佬

---Original--- From: @.> Date: Fri, Jul 26, 2024 23:11 PM To: @.>; Cc: @.**@.>; Subject: Re: [Coconutat/Huawei-GSI-And-Modify-Or-Support-KernelSU-Tutorial]P30Pro kernel build error (Issue #3)

大佬,我还是有个问题

最后注意开源的内核发布日期是否和你手机系统的安全日期对应。

如果说我降级到emui9.1 ,那么官方开源出来这个内核我是用不了的? This kernel package is released for the phone software version 2019-10-30 那就是说这个内核需要搭配19年10月30日的更新使用?如果我刷了安卓13的GSI呐

不管刷什么GSI,先看你原装固件的安全日期。因为华为发布的开源内核有个README_Version.txt,里面写了对应固件的安全日期。如果原生固件日期高于这个,就不能开机。你想刷GSI只能降级到EMUI9.1,你就是EMUI10能解开FB LOCK,也没法刷,因为华为动态分区的问题。而且还有镜像验证。你只能找P30开源的EMUI9.1的开源内核。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Coconutat commented 4 months ago

看明白了,华为还开源了hm3.0和4.0的,我去改那几个就好了十八,感谢大佬 ---Original--- From: @.> Date: Fri, Jul 26, 2024 23:11 PM To: @.>; Cc: @.**@.>; Subject: Re: [Coconutat/Huawei-GSI-And-Modify-Or-Support-KernelSU-Tutorial]P30Pro kernel build error (Issue #3) 大佬,我还是有个问题 最后注意开源的内核发布日期是否和你手机系统的安全日期对应。 如果说我降级到emui9.1 ,那么官方开源出来这个内核我是用不了的? This kernel package is released for the phone software version 2019-10-30 那就是说这个内核需要搭配19年10月30日的更新使用?如果我刷了安卓13的GSI呐 不管刷什么GSI,先看你原装固件的安全日期。因为华为发布的开源内核有个README_Version.txt,里面写了对应固件的安全日期。如果原生固件日期高于这个,就不能开机。你想刷GSI只能降级到EMUI9.1,你就是EMUI10能解开FB LOCK,也没法刷,因为华为动态分区的问题。而且还有镜像验证。你只能找P30开源的EMUI9.1的开源内核。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

去改9.1的,不是鸿蒙的。你都降级到9.1了,当然是用9.1的源码。

xiao-k233 commented 4 months ago

大佬能不能加个好友uwu 华为并没有开源9.1的,最早能找到的是10,当然也有可能删了,但是下载链接不是直链,webarchive也无能为力(