XperiaBrickers / kernel_sony_sm8250

Other
3 stars 6 forks source link

How do i build this kernel? #1

Closed th1nhhdk closed 1 year ago

th1nhhdk commented 1 year ago

Should i just download a cross compiler then build

or download LineageOS source then replace it's kernel source with yours?

hellobbn commented 1 year ago

Both ways are ok.

th1nhhdk commented 1 year ago

Well, the kernel doesn't build, can anyone give me detailed instruction on how to replicate your build environment? (i mean what toolchain, what commands, ...)

hellobbn commented 1 year ago

You need to provide more detailed information like build logs. Here is an example build script: https://github.com/hellobbn/scripts/blob/main/android/kernel/build_kernel.sh

th1nhhdk commented 1 year ago

After reading LineageOS default.xml i saw that i need platform/prebuilts/clang/host/linux-x86/ version android-13.0.0_r52 to match the current version running on my phone.

I download & added it to PATH

Then when running make mrproper i faced a error.

Debian 12 only have python3, no more python2 so ./scripts/gcc-wrapper.py is broken, using Tips and tricks -> Remove GCC wrapper from this guide the error is no more.

make ARCH=arm64 LLVM=1 -j10 mrproper
make ARCH=arm64 LLVM=1 -j10 clean
make ARCH=arm64 LLVM=1 -j10 pdx203_defconfig

th1nhhdk@T480:~/kernel_sony_sm8250$ make ARCH=arm64 LLVM=1 -j10
arch/arm64/Makefile:40: LSE atomics not supported by binutils
arch/arm64/Makefile:48: Detected assembler with broken .inst; disassembly will be unreliable
  UPD     include/config/kernel.release
  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
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  WRAP    arch/arm64/include/generated/asm/bugs.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
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm64/include/generated/asm/msi.h
  WRAP    arch/arm64/include/generated/asm/preempt.h
  WRAP    arch/arm64/include/generated/asm/qrwlock.h
  WRAP    arch/arm64/include/generated/asm/qspinlock.h
  WRAP    arch/arm64/include/generated/asm/rwsem.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
  WRAP    arch/arm64/include/generated/asm/vga.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/genksyms/genksyms.o
  CC      scripts/mod/empty.o
  YACC    scripts/genksyms/parse.tab.c
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  CC      scripts/mod/devicetable-offsets.s
  LEX     scripts/genksyms/lex.lex.c
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/dtc/data.o
  YACC    scripts/genksyms/parse.tab.h
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/srcpos.o
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.h
  YACC    scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  CC      kernel/bounds.s
  UPD     include/generated/timeconst.h
  HOSTLD  scripts/genksyms/genksyms
  HOSTCC  scripts/sign-file
  UPD     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTLD  scripts/dtc/dtc
  HOSTLD  scripts/mod/modpost
In file included from arch/arm64/kernel/asm-offsets.c:21:
In file included from ./include/linux/arm_sdei.h:14:
In file included from ./arch/arm64/include/asm/sdei.h:15:
In file included from ./include/linux/preempt.h:81:
In file included from ./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:39:
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");
                                                  ^
  HOSTCC  scripts/extract-cert
In file included from arch/arm64/kernel/asm-offsets.c:27:
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:184:
In file included from ./include/linux/bio.h:21:
In file included from ./include/linux/highmem.h:12:
In file included from ./arch/arm64/include/asm/cacheflush.h:22:
In file included from ./include/linux/kgdb.h:20:
./arch/arm64/include/asm/kgdb.h:32:25: error: value '1025' out of range for constraint 'I'
        asm ("brk %0" : : "I" (KGDB_COMPILED_DBG_BRK_IMM));
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/brk-imm.h:23:35: note: expanded from macro 'KGDB_COMPILED_DBG_BRK_IMM'
#define KGDB_COMPILED_DBG_BRK_IMM       0x401
                                        ^~~~~
In file included from arch/arm64/kernel/asm-offsets.c:28:
In file included from ./include/vdso/datapage.h:114:
./arch/arm64/include/asm/vdso/gettimeofday.h:22:35: error: unknown register name 'x1' in asm
        register struct timezone *tz asm("x1") = _tz;
                                         ^
./arch/arm64/include/asm/vdso/gettimeofday.h:23:47: error: unknown register name 'x0' in asm
        register struct __kernel_old_timeval *tv asm("x0") = _tv;
                                                     ^
./arch/arm64/include/asm/vdso/gettimeofday.h:24:25: error: unknown register name 'x0' in asm
        register long ret asm ("x0");
                               ^
./arch/arm64/include/asm/vdso/gettimeofday.h:25:23: error: unknown register name 'x8' in asm
        register long nr asm("x8") = __NR_gettimeofday;
                             ^
./arch/arm64/include/asm/vdso/gettimeofday.h:39:44: error: unknown register name 'x1' in asm
        register struct __kernel_timespec *ts asm("x1") = _ts;
                                                  ^
./arch/arm64/include/asm/vdso/gettimeofday.h:40:31: error: unknown register name 'x0' in asm
        register clockid_t clkid asm("x0") = _clkid;
                                     ^
./arch/arm64/include/asm/vdso/gettimeofday.h:41:25: error: unknown register name 'x0' in asm
        register long ret asm ("x0");
                               ^
./arch/arm64/include/asm/vdso/gettimeofday.h:42:23: error: unknown register name 'x8' in asm
        register long nr asm("x8") = __NR_clock_gettime;
                             ^
./arch/arm64/include/asm/vdso/gettimeofday.h:56:44: error: unknown register name 'x1' in asm
        register struct __kernel_timespec *ts asm("x1") = _ts;
                                                  ^
./arch/arm64/include/asm/vdso/gettimeofday.h:57:31: error: unknown register name 'x0' in asm
        register clockid_t clkid asm("x0") = _clkid;
                                     ^
./arch/arm64/include/asm/vdso/gettimeofday.h:58:25: error: unknown register name 'x0' in asm
        register long ret asm ("x0");
                               ^
./arch/arm64/include/asm/vdso/gettimeofday.h:59:23: error: unknown register name 'x8' in asm
        register long nr asm("x8") = __NR_clock_getres;
                             ^
14 errors generated.
make[1]: *** [Kbuild:56: arch/arm64/kernel/asm-offsets.s] Error 1
make: *** [Makefile:1258: prepare0] Error 2
make: *** Waiting for unfinished jobs....

It doesn't build, what toolchain am i supposed to use?

hellobbn commented 1 year ago

You may need to set other envs, instead of just LLVM=1. Please check these two lines: https://github.com/hellobbn/scripts/blob/main/android/kernel/build_kernel.sh#L130

th1nhhdk commented 1 year ago

So you mean i have to use clang as the compiler and gnu for the rest of the toolchain?

hellobbn commented 1 year ago

Yes, it seems to be the case for 4.19

th1nhhdk commented 1 year ago

After adding clang to PATH, also if i set LLVM_IAS=0 assembler errors happen.

th1nhhdk@T480:~/kernel_sony_sm8250$ make -j10 ARCH=arm64 LLVM=1 LLVM_IAS=1 CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=/home/th1nhhdk/aarch64-linux-android-4.9/bin/aarch64-linux-android-
  UPD     include/config/kernel.release
  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
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  WRAP    arch/arm64/include/generated/asm/bugs.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
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm64/include/generated/asm/msi.h
  WRAP    arch/arm64/include/generated/asm/preempt.h
  WRAP    arch/arm64/include/generated/asm/qrwlock.h
  WRAP    arch/arm64/include/generated/asm/qspinlock.h
  WRAP    arch/arm64/include/generated/asm/rwsem.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
  WRAP    arch/arm64/include/generated/asm/vga.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  HOSTCC  scripts/dtc/dtc.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/genksyms/genksyms.o
  YACC    scripts/genksyms/parse.tab.c
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  LEX     scripts/genksyms/lex.lex.c
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  YACC    scripts/genksyms/parse.tab.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/pnmtologo
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/sortextable
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTLD  scripts/genksyms/genksyms
  LEX     scripts/dtc/dtc-lexer.lex.c
  HOSTCC  scripts/sign-file
  YACC    scripts/dtc/dtc-parser.tab.h
  YACC    scripts/dtc/dtc-parser.tab.c
  HOSTLD  scripts/mod/modpost
  CC      kernel/bounds.s
  UPD     include/generated/timeconst.h
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  UPD     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTCC  scripts/extract-cert
  HOSTLD  scripts/dtc/dtc
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  LDS     arch/arm64/kernel/vdso/vdso.lds
  CC      arch/arm64/kernel/vdso/vgettimeofday.o
  AS      arch/arm64/kernel/vdso/note.o
  AS      arch/arm64/kernel/vdso/sigreturn.o
  LD      arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  CHK     include/generated/compile.h
  CC      init/main.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  CC      init/do_mounts_dm.o
  CC      init/noinitramfs.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  UPD     include/generated/compile.h
  HOSTCC  usr/gen_init_cpio
  CC      arch/arm64/kernel/probes/uprobes.o
  GEN     usr/initramfs_data.cpio
  CC      arch/arm64/mm/dma-mapping.o
  AS      usr/initramfs_data.o
  CC      init/init_task.o
  AR      usr/built-in.a
  OBJCOPY arch/arm64/kernel/vdso/vdso.so
  CC      init/version.o
  AS      arch/arm64/kernel/vdso/vdso.o
  CC      arch/arm64/kernel/debug-monitors.o
  AR      arch/arm64/kernel/vdso/built-in.a
  AS      arch/arm64/kernel/entry.o
  CC      arch/arm64/net/bpf_jit_comp.o
  CC      arch/arm64/kernel/probes/decode-insn.o
  CC      arch/arm64/kernel/probes/simulate-insn.o
  CC      arch/arm64/kernel/irq.o
  CC      arch/arm64/kernel/fpsimd.o
  AS      arch/arm64/kernel/entry-fpsimd.o
  CC      arch/arm64/kernel/process.o
  CC      arch/arm64/kernel/ptrace.o
  CC      arch/arm64/kernel/setup.o
  AR      arch/arm64/kernel/probes/built-in.a
  CC      arch/arm64/kernel/signal.o
  CC      arch/arm64/kernel/sys.o
  AR      init/built-in.a
  CC      arch/arm64/kernel/stacktrace.o
  CC      arch/arm64/crypto/sha1-ce-glue.o
  CC      arch/arm64/mm/extable.o
  AR      arch/arm64/net/built-in.a
  AS      arch/arm64/crypto/sha1-ce-core.o
  CC      arch/arm64/crypto/sha2-ce-glue.o
  CC      arch/arm64/mm/fault.o
  AS      arch/arm64/crypto/sha2-ce-core.o
  CC      arch/arm64/kernel/time.o
  CC      arch/arm64/kernel/traps.o
  CC      arch/arm64/kernel/io.o
  CC      arch/arm64/crypto/ghash-ce-glue.o
  AS      arch/arm64/crypto/ghash-ce-core.o
  AS      arch/arm64/crypto/aes-ce-core.o
  CC      arch/arm64/kernel/vdso.o
  CC      arch/arm64/crypto/aes-ce-glue.o
  CC      arch/arm64/crypto/aes-ce-ccm-glue.o
  CC      arch/arm64/mm/init.o
  CC      kernel/bpf/core.o
  AS      arch/arm64/crypto/aes-ce-ccm-core.o
  AS      arch/arm64/kernel/hyp-stub.o
  CC      arch/arm64/kernel/psci.o
  CC      arch/arm64/crypto/aes-glue-ce.o
  AS      arch/arm64/crypto/aes-ce.o
  CC      arch/arm64/kernel/cpu_ops.o
  CC      kernel/bpf/syscall.o
  CC      kernel/bpf/verifier.o
  CC      kernel/bpf/inode.o
  CC      kernel/bpf/helpers.o
  CC      arch/arm64/crypto/aes-glue-neon.o
  CC      arch/arm64/kernel/insn.o
  AS      arch/arm64/mm/cache.o
  CC      arch/arm64/kernel/return_address.o
  AS      arch/arm64/crypto/aes-neon.o
  CC      arch/arm64/mm/copypage.o
  CC      arch/arm64/mm/flush.o
  CC      arch/arm64/mm/ioremap.o
  CC      arch/arm64/kernel/cpuinfo.o
  CC      arch/arm64/kernel/cpu_errata.o
  CC      kernel/bpf/tnum.o
  CC      kernel/bpf/hashtab.o
  CC      arch/arm64/mm/mmap.o
  CC      arch/arm64/crypto/sha256-glue.o
  CC      arch/arm64/mm/pgd.o
  SHIPPED arch/arm64/crypto/sha256-core.S
  CC      kernel/bpf/arraymap.o
  CC      arch/arm64/mm/mmu.o
  CC      arch/arm64/kernel/cpufeature.o
  CC      arch/arm64/mm/context.o
  CC      arch/arm64/kernel/alternative.o
  CC      kernel/bpf/percpu_freelist.o
  AS      arch/arm64/mm/proc.o
  CC      arch/arm64/mm/pageattr.o
  CC      kernel/bpf/bpf_lru_list.o
  CC      arch/arm64/kernel/cacheinfo.o
  CC      kernel/bpf/lpm_trie.o
  CC      kernel/bpf/map_in_map.o
  AS      arch/arm64/crypto/chacha-neon-core.o
  CC      kernel/bpf/local_storage.o
  CC      arch/arm64/crypto/chacha-neon-glue.o
  CC      arch/arm64/kernel/smp.o
  CC      kernel/bpf/disasm.o
  CC      kernel/bpf/btf.o
  CC      kernel/bpf/devmap.o
  CC      kernel/bpf/cpumap.o
  CC      kernel/bpf/offload.o
  CC      arch/arm64/kernel/smp_spin_table.o
  AR      arch/arm64/mm/built-in.a
  CC      kernel/bpf/stackmap.o
Generating X.509 key generation config
  CC      certs/system_keyring.o
  CC      kernel/bpf/cgroup.o
  CC      arch/arm64/kernel/topology.o
  SHIPPED arch/arm64/crypto/poly1305-core.S
  CC      arch/arm64/crypto/poly1305-glue.o
  AS      arch/arm64/crypto/aes-cipher-core.o
  EXTRACT_CERTS
###
### Now generating an X.509 key pair to be used for signing modules.
###
### If this takes a long time, you might wish to run rngd in the
### background to keep the supply of entropy topped up.  It
### needs to be run as root, and uses a hardware random
### number generator if one is available.
###
...+.......+..+....+...........+.+...+..+.........+.........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+......+.......+...+...........+.+.....+....+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+...+.+  CC      kernel/bpf/reuseport_array.o
......+.....+................+........+....+  CC      arch/arm64/crypto/aes-cipher-glue.o
............+.....+......+.......+........+  AS      arch/arm64/kernel/smccc-call.o
  CC      arch/arm64/kernel/syscall.o
.........+.+..................+.........+........+...+.+........+..........+.......  CC      arch/arm64/kernel/sys32.o
....  CC      arch/arm64/kernel/signal32.o
+.+...........  CC      arch/arm64/kernel/sys_compat.o
....+......+..+.......+..............+....+.....+...+....+...+...........+.......+..............+.+...+.....+......+...+......+......+......+....+.....+.+............+...+...+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.+......+..+.+......+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+.......+..+......+...+....+......+..............+.......+........+..........+............+......+..+.......+...+...+........+......+....+..+...+....+...+...+...........+....+..+............+...+....+.....+.........+.+........+......+.+...+...+..+...+++++++++++++++++  AS      arch/arm64/kernel/sigreturn32.o
++++++++++++++++++++++++++++++++++++++++++++++++*......+.......+..................+..+....+..+...+....+..+..........+.....+.............+......+.........+.  AS      arch/arm64/kernel/kuser32.o
.+  AS      arch/arm64/crypto/sha256-core.o
..........+............  CC      arch/arm64/kernel/arm64ksyms.o
.......  CC      arch/arm64/kernel/module.o
.+.+..+  CC      arch/arm64/kernel/module-plts.o
......+  CC      arch/arm64/kernel/perf_regs.o
....+...+...+..........  CC      arch/arm64/kernel/perf_callchain.o
.+..........+........+.+..............+.............  CC      arch/arm64/kernel/perf_event.o
...............+..+.+  AS      arch/arm64/crypto/poly1305-core.o
...........+..  AR      kernel/bpf/built-in.a
....+...+  CC      kernel/cgroup/cgroup.o
....+...+...+.....+....+........+.............+..+....+...+.....+......+....+......+.......................................+..+......+.......+..  AR      arch/arm64/crypto/built-in.a
......+...............+  CC      kernel/cgroup/rstat.o
...+...............+.......+..................+..+...+....+........+....+...+..+.+.....++++++++++  CC      arch/arm64/kernel/perf_trace_counters.o
+++  CC      kernel/cgroup/namespace.o
+++++++++++++++  CC      arch/arm64/kernel/perf_trace_user.o
+++++++++++++++++++++++++++++++++++++
-----
  CC      arch/arm64/kernel/hw_breakpoint.o
###
### Key pair generated.
###
  EXTRACT_CERTS   certs/signing_key.pem
  AS      certs/system_certificates.o
  AS      arch/arm64/kernel/sleep.o
  AR      certs/built-in.a
  CC      arch/arm64/kernel/suspend.o
  CC      arch/arm64/kernel/cpuidle.o
  CC      arch/arm64/kernel/pci.o
  CC      mm/filemap.o
  CC      kernel/cgroup/cgroup-v1.o
  CC      arch/arm64/kernel/armv8_deprecated.o
  CC      kernel/cgroup/freezer.o
  CC      arch/arm64/kernel/kaslr.o
  CC      arch/arm64/kernel/ssbd.o
  AS      arch/arm64/kernel/head.o
  LDS     arch/arm64/kernel/vmlinux.lds
  CC      kernel/cgroup/legacy_freezer.o
  CC      kernel/cgroup/cpuset.o
  CC      mm/mempool.o
  CC      mm/oom_kill.o
  CC      mm/fadvise.o
  CC      mm/maccess.o
  AR      arch/arm64/kernel/built-in.a
  CC      fs/configfs/inode.o
  CC      fs/crypto/crypto.o
  CC      fs/debugfs/inode.o
  CC      mm/page_alloc.o
  CC      mm/page-writeback.o
  CC      mm/readahead.o
  CC      fs/configfs/file.o
  CC      fs/configfs/dir.o
  CC      fs/crypto/fname.o
  CC      mm/swap.o
  CC      fs/debugfs/file.o
  CC      fs/configfs/symlink.o
  CC      mm/truncate.o
  AR      kernel/cgroup/built-in.a
  CC      kernel/dma/mapping.o
  CC      mm/vmscan.o
  CC      kernel/dma/contiguous.o
  CC      fs/crypto/hkdf.o
  CC      fs/configfs/mount.o
  CC      kernel/dma/coherent.o
  AR      fs/debugfs/built-in.a
  CC      fs/devpts/inode.o
  CC      fs/configfs/item.o
  CC      fs/crypto/hooks.o
  CC      kernel/dma/removed.o
  CC      mm/shmem.o
  CC      kernel/events/core.o
  CC      mm/util.o
  AR      fs/devpts/built-in.a
  AR      fs/configfs/built-in.a
  CC      kernel/irq/irqdesc.o
  CC      fs/ecryptfs/dentry.o
  CC      fs/ecryptfs/file.o
  CC      fs/crypto/keyring.o
  CC      kernel/dma/direct.o
  CC      fs/ecryptfs/inode.o
  CC      mm/mmzone.o
  CC      fs/ecryptfs/main.o
  CC      mm/vmstat.o
  CC      kernel/irq/handle.o
  CC      fs/crypto/keysetup.o
  CC      kernel/dma/swiotlb.o
  CC      mm/backing-dev.o
  CC      fs/ecryptfs/super.o
  CC      fs/ecryptfs/mmap.o
  CC      fs/ecryptfs/read_write.o
  CC      fs/ecryptfs/crypto.o
  CC      kernel/irq/manage.o
  CC      fs/ecryptfs/keystore.o
  CC      fs/ecryptfs/kthread.o
  CC      fs/crypto/keysetup_v1.o
  CC      fs/crypto/policy.o
  CC      mm/mm_init.o
  CC      fs/ecryptfs/debug.o
  AR      kernel/dma/built-in.a
  AR      kernel/livepatch/built-in.a
  CC      kernel/locking/mutex.o
  CC      kernel/locking/semaphore.o
  CC      fs/crypto/bio.o
  CC      mm/mmu_context.o
  CC      kernel/irq/spurious.o
  CC      fs/ecryptfs/messaging.o
  CC      fs/ecryptfs/miscdev.o
  CC      fs/crypto/inline_crypt.o
  CC      kernel/irq/resend.o
  CC      mm/percpu.o
  CC      kernel/locking/rwsem.o
  CC      mm/slab_common.o
  CC      kernel/locking/percpu-rwsem.o
  CC      kernel/locking/spinlock.o
  CC      kernel/locking/osq_lock.o
  CC      kernel/irq/chip.o
  AR      fs/ecryptfs/built-in.a
  CC      fs/erofs/super.o
  CC      kernel/events/ring_buffer.o
  CC      kernel/locking/qspinlock.o
  CC      kernel/locking/rtmutex.o
  AR      fs/crypto/built-in.a
  CC      fs/exfat/inode.o
  CC      fs/exfat/namei.o
  CC      fs/exfat/dir.o
  CC      fs/exfat/super.o
  CC      fs/erofs/inode.o
  CC      kernel/irq/dummychip.o
  CC      fs/exfat/fatent.o
  CC      kernel/locking/rwsem-xadd.o
  CC      fs/exfat/cache.o
  CC      fs/exfat/nls.o
  CC      fs/exfat/misc.o
  CC      fs/exfat/file.o
  CC      kernel/events/callchain.o
  CC      fs/erofs/data.o
  CC      kernel/irq/devres.o
  CC      mm/compaction.o
  CC      fs/exfat/balloc.o
  CC      mm/vmacache.o
  CC      mm/interval_tree.o
  CC      mm/list_lru.o
  CC      kernel/locking/qrwlock.o
  CC      mm/workingset.o
  CC      kernel/events/hw_breakpoint.o
  CC      mm/debug.o
  CC      fs/erofs/namei.o
  AR      fs/exfat/built-in.a
  AR      kernel/locking/built-in.a
  CC      kernel/power/qos.o
  AR      fs/exofs/built-in.a
  CC      kernel/irq/autoprobe.o
  CC      fs/exportfs/expfs.o
  CC      kernel/power/main.o
  CC      mm/gup.o
  CC      mm/highmem.o
  CC      fs/erofs/dir.o
  CC      kernel/events/uprobes.o
  CC      kernel/irq/irqdomain.o
  CC      mm/memory.o
  AR      fs/exportfs/built-in.a
  CC      fs/ext4/balloc.o
  CC      mm/mincore.o
  CC      fs/erofs/utils.o
  CC      fs/erofs/pcpubuf.o
  CC      kernel/power/process.o
  CC      fs/erofs/xattr.o
  CC      mm/mlock.o
  CC      mm/mmap.o
  CC      mm/mprotect.o
  CC      kernel/irq/proc.o
  AR      kernel/events/built-in.a
  CC      fs/erofs/decompressor.o
  CC      kernel/printk/printk.o
  CC      fs/ext4/bitmap.o
  CC      kernel/power/suspend.o
  CC      kernel/irq/cpuhotplug.o
  CC      fs/erofs/zmap.o
  CC      mm/mremap.o
  CC      fs/erofs/zdata.o
  CC      kernel/irq/pm.o
  CC      fs/ext4/block_validity.o
  CC      mm/msync.o
  CC      mm/page_vma_mapped.o
  CC      mm/pagewalk.o
  CC      mm/pgtable-generic.o
  CC      fs/ext4/dir.o
  CC      kernel/power/wakelock.o
  CC      mm/rmap.o
  CC      mm/vmalloc.o
  CC      kernel/printk/printk_safe.o
  CC      mm/process_vm_access.o
  CC      mm/showmem.o
  CC      kernel/irq/msi.o
  AR      fs/erofs/built-in.a
  CC      fs/f2fs/dir.o
  AR      kernel/printk/built-in.a
  CC      fs/f2fs/file.o
  CC      mm/vmpressure.o
  CC      mm/init-mm.o
  CC      kernel/power/poweroff.o
  CC      fs/ext4/ext4_jbd2.o
  CC      mm/nobootmem.o
  CC      kernel/power/energy_model.o
  CC      mm/madvise.o
  CC      mm/memblock.o
  CC      kernel/irq/affinity.o
  CC      fs/f2fs/inode.o
  CC      mm/page_io.o
  CC      mm/swap_state.o
  AR      kernel/irq/built-in.a
  CC      kernel/power/wakeup_reason.o
  CC      kernel/rcu/update.o
  CC      fs/ext4/extents.o
  CC      kernel/rcu/sync.o
  CC      mm/swapfile.o
  CC      kernel/rcu/srcutree.o
  CC      mm/swap_slots.o
  CC      kernel/power/wakeup_irq_debug.o
  CC      mm/swap_ratio.o
  CC      fs/f2fs/namei.o
  CC      mm/dmapool.o
  CC      mm/sparse.o
  CC      mm/sparse-vmemmap.o
  CC      kernel/rcu/tree.o
  AR      kernel/power/built-in.a
  CC      kernel/sched/core.o
  CC      kernel/rcu/rcu_segcblist.o
  CC      fs/f2fs/hash.o
  CC      fs/f2fs/super.o
  CC      mm/slub.o
  CC      mm/migrate.o
  CC      mm/page_counter.o
  CC      fs/f2fs/inline.o
  CC      fs/f2fs/checkpoint.o
  CC      mm/memcontrol.o
  CC      mm/swap_cgroup.o
  CC      fs/ext4/extents_status.o
  CC      mm/page_owner.o
  CC      fs/f2fs/gc.o
  CC      mm/page_isolation.o
  CC      fs/f2fs/data.o
  CC      fs/ext4/file.o
  CC      fs/ext4/fsmap.o
  CC      fs/ext4/fsync.o
  CC      mm/zpool.o
  AR      kernel/rcu/built-in.a
  CC      kernel/time/time.o
  CC      kernel/time/timer.o
  CC      fs/f2fs/node.o
  CC      mm/zsmalloc.o
  CC      fs/ext4/hash.o
  CC      fs/ext4/ialloc.o
  CC      fs/f2fs/segment.o
  CC      kernel/time/hrtimer.o
  CC      mm/z3fold.o
  CC      fs/ext4/indirect.o
  CC      fs/f2fs/recovery.o
  CC      kernel/sched/loadavg.o
  CC      fs/ext4/inline.o
  CC      kernel/sched/clock.o
  CC      mm/early_ioremap.o
  CC      mm/cma.o
  CC      kernel/time/timekeeping.o
  CC      fs/f2fs/shrinker.o
  CC      fs/ext4/inode.o
  CC      mm/page_ext.o
  CC      fs/f2fs/extent_cache.o
  CC      kernel/sched/cputime.o
  CC      fs/f2fs/sysfs.o
  CC      fs/f2fs/debug.o
  CC      mm/cma_debug.o
  CC      fs/ext4/ioctl.o
  CC      kernel/sched/idle.o
  CC      mm/frame_vector.o
  CC      mm/usercopy.o
  CC      kernel/time/ntp.o
  CC      fs/f2fs/xattr.o
  CC      fs/f2fs/acl.o
  CC      fs/fat/cache.o
  CC      kernel/time/clocksource.o
  CC      fs/fat/dir.o
  CC      mm/memfd.o
  CC      fs/fat/fatent.o
  CC      fs/ext4/mballoc.o
  CC      kernel/sched/fair.o
  CC      fs/f2fs/verity.o
  CC      kernel/sched/rt.o
  CC      kernel/sched/deadline.o
  CC      kernel/time/jiffies.o
  CC      mm/process_reclaim.o
  CC      fs/ext4/migrate.o
  AR      fs/f2fs/built-in.a
  CC      fs/fuse/dev.o
  CC      fs/fat/file.o
  CC      kernel/time/timer_list.o
  AR      mm/built-in.a
  CC      fs/fat/inode.o
  AR      ipc/built-in.a
  CC      fs/ext4/mmp.o
  GEN     security/apparmor/capability_names.h
  CC      kernel/sched/wait.o
  GEN     security/apparmor/rlim_names.h
  GEN     security/apparmor/net_names.h
  GEN     security/apparmor/net_names.h
  CC      security/apparmor/apparmorfs.o
  CC      kernel/time/timeconv.o
  CC      fs/fat/misc.o
  CC      crypto/asymmetric_keys/asymmetric_type.o
  CC      crypto/asymmetric_keys/restrict.o
  CC      kernel/time/timecounter.o
  CC      fs/ext4/move_extent.o
  CC      crypto/asymmetric_keys/signature.o
  CC      kernel/time/alarmtimer.o
  CC      fs/fat/nfs.o
  CC      fs/fuse/dir.o
  CC      crypto/asymmetric_keys/public_key.o
  CC      kernel/sched/wait_bit.o
  CC      fs/fat/namei_vfat.o
  CC      fs/ext4/namei.o
  ASN.1   crypto/asymmetric_keys/x509.asn1.c
  ASN.1   crypto/asymmetric_keys/x509_akid.asn1.c
  CC      crypto/asymmetric_keys/x509_public_key.o
  CC      fs/fat/namei_msdos.o
  CC      security/apparmor/audit.o
  CC      kernel/time/posix-timers.o
  ASN.1   crypto/asymmetric_keys/pkcs7.asn1.c
  CC      crypto/asymmetric_keys/pkcs7_trust.o
  CC      crypto/asymmetric_keys/pkcs7_verify.o
  CC      crypto/asymmetric_keys/x509.asn1.o
  CC      fs/fuse/file.o
  CC      crypto/asymmetric_keys/x509_akid.asn1.o
  AR      fs/fat/built-in.a
  CC      fs/incfs/data_mgmt.o
  CC      fs/incfs/format.o
  CC      security/apparmor/capability.o
  CC      crypto/asymmetric_keys/x509_cert_parser.o
  CC      kernel/sched/swait.o
  CC      crypto/asymmetric_keys/pkcs7.asn1.o
  CC      crypto/asymmetric_keys/pkcs7_parser.o
  CC      kernel/time/posix-cpu-timers.o
  CC      kernel/time/posix-clock.o
  CC      fs/incfs/integrity.o
  CC      fs/incfs/main.o
  CC      fs/incfs/vfs.o
  CC      fs/ext4/page-io.o
  CC      security/apparmor/task.o
  CC      security/apparmor/ipc.o
  CC      security/apparmor/lib.o
  AR      crypto/asymmetric_keys/built-in.a
  CC      crypto/api.o
  CC      kernel/time/itimer.o
fs/ext4/page-io.c:512:60: error: too few arguments to function call, expected 5, have 4
                ret = io_submit_add_bh(io, inode, bounce_page ?: page, bh);
                      ~~~~~~~~~~~~~~~~                                   ^
fs/ext4/page-io.c:382:12: note: 'io_submit_add_bh' declared here
static int io_submit_add_bh(struct ext4_io_submit *io,
           ^
1 error generated.
make[2]: *** [scripts/Makefile.build:338: fs/ext4/page-io.o] Error 1
make[1]: *** [scripts/Makefile.build:642: fs/ext4] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      kernel/time/clockevents.o
  CC      kernel/time/tick-common.o
  CC      kernel/sched/completion.o
  CC      fs/fuse/inode.o
  CC      security/apparmor/match.o
  CC      security/apparmor/path.o
  CC      kernel/time/tick-broadcast.o
  CC      security/apparmor/domain.o
  AR      fs/incfs/built-in.a
  CC      security/apparmor/policy.o
  CC      kernel/time/tick-broadcast-hrtimer.o
  CC      security/apparmor/policy_unpack.o
  CC      crypto/cipher.o
  CC      security/apparmor/procattr.o
  CC      kernel/time/sched_clock.o
  CC      kernel/time/tick-oneshot.o
  CC      kernel/time/tick-sched.o
  CC      kernel/sched/cpupri.o
  CC      fs/fuse/control.o
  CC      crypto/compress.o
  CC      kernel/time/vsyscall.o
  CC      kernel/time/timekeeping_debug.o
  CC      security/apparmor/lsm.o
  CC      security/apparmor/resource.o
  CC      fs/fuse/xattr.o
  CC      crypto/memneq.o
  CC      crypto/crypto_wq.o
  CC      security/apparmor/secid.o
  CC      kernel/sched/cpudeadline.o
  CC      kernel/sched/topology.o
  CC      security/apparmor/file.o
  CC      fs/fuse/acl.o
  AR      kernel/time/built-in.a
  CC      security/apparmor/policy_ns.o
  CC      security/apparmor/label.o
  CC      crypto/algapi.o
  CC      security/apparmor/mount.o
  CC      security/apparmor/net.o
  CC      crypto/scatterwalk.o
  AR      fs/fuse/built-in.a
make: *** [Makefile:1208: fs] Error 2
make: *** Waiting for unfinished jobs....
  CC      crypto/proc.o
  CC      kernel/sched/stop_task.o
  CC      security/apparmor/crypto.o
  CC      kernel/sched/pelt.o
  CC      crypto/aead.o
  CC      crypto/ablkcipher.o
  CC      crypto/blkcipher.o
  CC      kernel/sched/walt.o
  CC      kernel/sched/boost.o
  CC      crypto/skcipher.o
  CC      crypto/seqiv.o
  AR      security/apparmor/built-in.a
  CC      security/integrity/iint.o
  CC      security/integrity/integrity_audit.o
  CC      kernel/sched/sched_avg.o
  CC      crypto/echainiv.o
  CC      crypto/ahash.o
  CC      crypto/shash.o
  AR      security/integrity/built-in.a
  CC      security/keys/gc.o
  CC      crypto/akcipher.o
  CC      kernel/sched/autogroup.o
  CC      security/keys/key.o
  CC      crypto/kpp.o
  CC      security/keys/keyring.o
  ASN.1   crypto/rsapubkey.asn1.c
  ASN.1   crypto/rsaprivkey.asn1.c
  CC      crypto/rsa.o
  CC      crypto/rsa_helper.o
  CC      crypto/rsa-pkcs1pad.o
  CC      security/keys/keyctl.o
  CC      crypto/acompress.o
  CC      crypto/scompress.o
  CC      crypto/algboss.o
  CC      kernel/sched/stats.o
  CC      kernel/sched/debug.o
  CC      crypto/testmgr.o
  CC      security/keys/permission.o
  CC      crypto/cmac.o
  CC      security/keys/process_keys.o
  CC      security/keys/request_key.o
  CC      security/keys/request_key_auth.o
  CC      crypto/hmac.o
  CC      kernel/sched/tune.o
  CC      crypto/xcbc.o
  CC      security/keys/user_defined.o
  CC      crypto/crypto_null.o
  CC      crypto/md5.o
  CC      kernel/sched/cpuacct.o
  CC      security/keys/compat.o
  CC      security/keys/proc.o
  CC      crypto/sha1_generic.o
  CC      crypto/sha256_generic.o
  CC      security/keys/sysctl.o
  CC      crypto/sha512_generic.o
  CC      crypto/gf128mul.o
  CC      kernel/sched/cpufreq.o
  CC      kernel/sched/cpufreq_schedutil.o
  CC      kernel/sched/membarrier.o
  CC      crypto/ecb.o
  AR      security/keys/built-in.a
  GEN     security/selinux/flask.h security/selinux/av_permissions.h
  CC      security/selinux/avc.o
  CC      crypto/cbc.o
  CC      crypto/cts.o
  CC      crypto/xts.o
  CC      kernel/sched/isolation.o
  CC      crypto/ctr.o
  CC      crypto/gcm.o
  CC      kernel/sched/core_ctl.o
  CC      crypto/ccm.o
  CC      kernel/sched/psi.o
  CC      crypto/cryptd.o
  CC      crypto/des_generic.o
  CC      crypto/twofish_generic.o
  CC      security/selinux/hooks.o
  CC      crypto/twofish_common.o
  CC      crypto/aes_generic.o
  CC      crypto/arc4.o
  CC      crypto/deflate.o
  CC      crypto/crc32c_generic.o
  CC      crypto/crc32_generic.o
  CC      crypto/authenc.o
  CC      crypto/authencesn.o
  CC      crypto/lzo.o
  CC      security/selinux/selinuxfs.o
  CC      security/selinux/netlink.o
  CC      crypto/lz4.o
  CC      crypto/rng.o
  CC      crypto/ansi_cprng.o
  AR      kernel/sched/built-in.a
  CC      kernel/trace/trace_clock.o
  CC      crypto/drbg.o
  CC      kernel/trace/ring_buffer.o
  CC      security/selinux/nlmsgtab.o
  CC      crypto/jitterentropy.o
  CC      crypto/jitterentropy-kcapi.o
  CC      crypto/ghash-generic.o
  CC      kernel/trace/trace.o
  CC      crypto/ecc.o
  CC      crypto/ecdh.o
  CC      security/selinux/netif.o
  CC      crypto/ecdh_helper.o
  CC      security/selinux/netnode.o
  CC      security/selinux/netport.o
  CC      crypto/hash_info.o
  CC      crypto/simd.o
  CC      crypto/rsapubkey.asn1.o
  CC      crypto/rsaprivkey.asn1.o
  CC      security/selinux/exports.o
  CC      security/selinux/ss/ebitmap.o
  CC      security/selinux/ss/hashtab.o
  CC      security/selinux/ss/symtab.o
  CC      security/selinux/ss/sidtab.o
  CC      security/selinux/ss/avtab.o
  CC      security/selinux/ss/policydb.o
  CC      security/selinux/ss/services.o
  CC      security/selinux/ss/conditional.o
  CC      kernel/trace/trace_output.o
  CC      security/selinux/ss/mls.o
  CC      security/selinux/ss/status.o
  AR      crypto/built-in.a
  CC      security/selinux/netlabel.o
  CC      kernel/trace/trace_seq.o
  CC      kernel/trace/trace_stat.o
  CC      kernel/trace/trace_printk.o
  CC      kernel/trace/trace_sched_switch.o
  CC      kernel/trace/trace_nop.o
  CC      kernel/trace/blktrace.o
  CC      kernel/trace/trace_events.o
  CC      kernel/trace/trace_export.o
  CC      kernel/trace/trace_event_perf.o
  CC      kernel/trace/trace_events_filter.o
  AR      security/selinux/built-in.a
  CC      security/smack/smack_lsm.o
  CC      kernel/trace/trace_events_trigger.o
  CC      kernel/trace/bpf_trace.o
  CC      kernel/trace/power-traces.o
  CC      kernel/trace/rpm-traces.o
  CC      kernel/trace/trace_probe.o
  CC      kernel/trace/trace_uprobe.o
  CC      kernel/trace/msm_rtb.o
  CC      kernel/trace/ipc_logging.o
  CC      kernel/trace/ipc_logging_debug.o
  CC      security/smack/smack_access.o
  CC      security/smack/smackfs.o
  CC      security/commoncap.o
  CC      security/min_addr.o
  CC      security/security.o
  CC      security/inode.o
  CC      security/lsm_audit.o
  CHK     kernel/kheaders_data.tar.xz
  CC      kernel/fork.o
  AR      kernel/trace/built-in.a
  CC      kernel/exec_domain.o
  GEN     kernel/kheaders_data.tar.xz
  CC      kernel/panic.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      kernel/softirq.o
  AR      security/smack/built-in.a
  CC      kernel/resource.o
  CC      kernel/sysctl.o
  CC      kernel/sysctl_binary.o
kernel/cpu.c:2422:27: error: expected value in expression
#if CONFIG_LITTLE_CPU_MASK
                          ^
kernel/cpu.c:2430:24: error: expected value in expression
#if CONFIG_BIG_CPU_MASK
                       ^
kernel/cpu.c:2438:26: error: expected value in expression
#if CONFIG_PRIME_CPU_MASK
                         ^
3 errors generated.
make[1]: *** [scripts/Makefile.build:338: kernel/cpu.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  AR      security/built-in.a
make: *** [Makefile:1208: kernel] Error 2
hellobbn commented 1 year ago

seems like a problem in the source side

th1nhhdk commented 1 year ago

seems like a problem in the source side

oh wait, i realised that i accidentally used a newer version of the gcc toolchain, android-13.0.0_r0.81 instead of android-13.0.0_r0.52 (LineageOS used this), let me try again

th1nhhdk commented 1 year ago

Nope, same error with gcc toolchain and clang from android-13.0.0_r0.52

th1nhhdk@T480:~/kernel_sony_sm8250$ make -j10 ARCH=arm64 LLVM=1 LLVM_IAS=1 CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=/home/th1nhhdk/aarch64-linux-android-4.9/bin/aarch64-linux-android-
  UPD     include/config/kernel.release
  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
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  WRAP    arch/arm64/include/generated/asm/bugs.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/early_ioremap.h
  WRAP    arch/arm64/include/generated/asm/dma-contiguous.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
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm64/include/generated/asm/preempt.h
  WRAP    arch/arm64/include/generated/asm/qrwlock.h
  WRAP    arch/arm64/include/generated/asm/msi.h
  WRAP    arch/arm64/include/generated/asm/qspinlock.h
  WRAP    arch/arm64/include/generated/asm/rwsem.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/vga.h
  WRAP    arch/arm64/include/generated/asm/user.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/dtc/dtc.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/mod/mk_elfconfig
  YACC    scripts/genksyms/parse.tab.c
  LEX     scripts/genksyms/lex.lex.c
  YACC    scripts/genksyms/parse.tab.h
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/selinux/mdp/mdp
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/dtc/data.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/sign-file
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.h
  YACC    scripts/dtc/dtc-parser.tab.c
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  CC      kernel/bounds.s
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  UPD     include/generated/timeconst.h
  HOSTLD  scripts/genksyms/genksyms
  UPD     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTCC  scripts/extract-cert
  HOSTLD  scripts/dtc/dtc
  HOSTLD  scripts/mod/modpost
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  LDS     arch/arm64/kernel/vdso/vdso.lds
  CC      arch/arm64/kernel/vdso/vgettimeofday.o
  AS      arch/arm64/kernel/vdso/note.o
  AS      arch/arm64/kernel/vdso/sigreturn.o
  LD      arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  CHK     include/generated/compile.h
  CC      init/main.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  CC      init/do_mounts_dm.o
  CC      init/noinitramfs.o
  CC      init/calibrate.o
  CC      init/initramfs.o
  HOSTCC  usr/gen_init_cpio
  UPD     include/generated/compile.h
  CC      init/init_task.o
  CC      init/version.o
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  CC      arch/arm64/kernel/debug-monitors.o
  CC      arch/arm64/kernel/probes/uprobes.o
  OBJCOPY arch/arm64/kernel/vdso/vdso.so
  AS      arch/arm64/kernel/vdso/vdso.o
  AR      usr/built-in.a
  AS      arch/arm64/kernel/entry.o
  CC      arch/arm64/kernel/irq.o
  CC      arch/arm64/kernel/fpsimd.o
  CC      arch/arm64/mm/dma-mapping.o
  AR      arch/arm64/kernel/vdso/built-in.a
  AS      arch/arm64/kernel/entry-fpsimd.o
  CC      arch/arm64/kernel/process.o
  CC      arch/arm64/kernel/ptrace.o
  CC      arch/arm64/kernel/probes/decode-insn.o
  CC      arch/arm64/kernel/setup.o
  CC      arch/arm64/kernel/signal.o
  CC      arch/arm64/kernel/sys.o
  CC      arch/arm64/kernel/stacktrace.o
  AR      init/built-in.a
  CC      arch/arm64/kernel/probes/simulate-insn.o
  CC      arch/arm64/net/bpf_jit_comp.o
  CC      arch/arm64/kernel/time.o
  CC      arch/arm64/kernel/traps.o
  CC      arch/arm64/mm/extable.o
  AR      arch/arm64/kernel/probes/built-in.a
  CC      arch/arm64/kernel/io.o
  CC      arch/arm64/kernel/vdso.o
  AS      arch/arm64/kernel/hyp-stub.o
  CC      arch/arm64/kernel/psci.o
  CC      arch/arm64/kernel/cpu_ops.o
  CC      arch/arm64/kernel/insn.o
  CC      arch/arm64/mm/fault.o
  CC      arch/arm64/kernel/return_address.o
  CC      arch/arm64/kernel/cpuinfo.o
  CC      arch/arm64/kernel/cpu_errata.o
  CC      arch/arm64/kernel/cpufeature.o
  CC      arch/arm64/kernel/alternative.o
  CC      arch/arm64/kernel/cacheinfo.o
  AR      arch/arm64/net/built-in.a
  CC      arch/arm64/kernel/smp.o
  CC      arch/arm64/crypto/sha1-ce-glue.o
  CC      arch/arm64/mm/init.o
  AS      arch/arm64/crypto/sha1-ce-core.o
  CC      arch/arm64/kernel/smp_spin_table.o
  CC      arch/arm64/crypto/sha2-ce-glue.o
  CC      arch/arm64/kernel/topology.o
  AS      arch/arm64/kernel/smccc-call.o
  CC      arch/arm64/kernel/syscall.o
  CC      arch/arm64/kernel/sys32.o
  CC      arch/arm64/kernel/signal32.o
  AS      arch/arm64/crypto/sha2-ce-core.o
  CC      arch/arm64/kernel/sys_compat.o
  CC      arch/arm64/crypto/ghash-ce-glue.o
  AS      arch/arm64/kernel/sigreturn32.o
  AS      arch/arm64/kernel/kuser32.o
  AS      arch/arm64/crypto/ghash-ce-core.o
  AS      arch/arm64/crypto/aes-ce-core.o
  CC      arch/arm64/kernel/arm64ksyms.o
  AS      arch/arm64/mm/cache.o
  CC      arch/arm64/kernel/module.o
  CC      arch/arm64/kernel/module-plts.o
  CC      arch/arm64/crypto/aes-ce-glue.o
  CC      arch/arm64/crypto/aes-ce-ccm-glue.o
  CC      arch/arm64/kernel/perf_regs.o
  CC      arch/arm64/mm/copypage.o
  CC      arch/arm64/kernel/perf_callchain.o
  AS      arch/arm64/crypto/aes-ce-ccm-core.o
  CC      arch/arm64/kernel/perf_event.o
  CC      arch/arm64/kernel/perf_trace_counters.o
  CC      arch/arm64/kernel/perf_trace_user.o
  CC      arch/arm64/crypto/aes-glue-ce.o
  AS      arch/arm64/crypto/aes-ce.o
  CC      arch/arm64/crypto/aes-glue-neon.o
  CC      arch/arm64/kernel/hw_breakpoint.o
  AS      arch/arm64/crypto/aes-neon.o
  AS      arch/arm64/kernel/sleep.o
  CC      arch/arm64/mm/flush.o
  CC      arch/arm64/mm/ioremap.o
  CC      arch/arm64/kernel/suspend.o
  CC      arch/arm64/crypto/sha256-glue.o
  CC      arch/arm64/kernel/cpuidle.o
  CC      arch/arm64/kernel/pci.o
  SHIPPED arch/arm64/crypto/sha256-core.S
  AS      arch/arm64/crypto/chacha-neon-core.o
  CC      arch/arm64/kernel/armv8_deprecated.o
  CC      arch/arm64/kernel/kaslr.o
  CC      arch/arm64/kernel/ssbd.o
  CC      arch/arm64/crypto/chacha-neon-glue.o
  CC      arch/arm64/mm/mmap.o
  CC      arch/arm64/mm/pgd.o
  AS      arch/arm64/kernel/head.o
  LDS     arch/arm64/kernel/vmlinux.lds
  SHIPPED arch/arm64/crypto/poly1305-core.S
  CC      arch/arm64/crypto/poly1305-glue.o
  AS      arch/arm64/crypto/aes-cipher-core.o
  CC      arch/arm64/crypto/aes-cipher-glue.o
  CC      arch/arm64/mm/mmu.o
  CC      arch/arm64/mm/context.o
  AS      arch/arm64/mm/proc.o
  AS      arch/arm64/crypto/sha256-core.o
  AS      arch/arm64/crypto/poly1305-core.o
  AR      arch/arm64/kernel/built-in.a
  CC      arch/arm64/mm/pageattr.o
  CC      kernel/dma/mapping.o
  CC      kernel/cgroup/cgroup.o
  EXTRACT_CERTS   certs/signing_key.pem
  CC      certs/system_keyring.o
  CC      mm/filemap.o
  EXTRACT_CERTS
  AS      certs/system_certificates.o
  CC      fs/configfs/inode.o
  CC      fs/crypto/crypto.o
  CC      kernel/bpf/core.o
  AR      arch/arm64/crypto/built-in.a
  CC      fs/crypto/fname.o
  AR      ipc/built-in.a
  AR      certs/built-in.a
  CC      fs/crypto/hkdf.o
  GEN     security/apparmor/capability_names.h
  GEN     security/apparmor/rlim_names.h
  GEN     security/apparmor/net_names.h
  CC      fs/configfs/file.o
  GEN     security/apparmor/net_names.h
  CC      security/apparmor/apparmorfs.o
  AR      arch/arm64/mm/built-in.a
  CC      security/apparmor/audit.o
  CC      kernel/dma/contiguous.o
  CC      kernel/dma/coherent.o
  CC      fs/crypto/hooks.o
  CC      fs/configfs/dir.o
  CC      fs/crypto/keyring.o
  CC      kernel/dma/removed.o
  CC      security/apparmor/capability.o
  CC      kernel/bpf/syscall.o
  CC      fs/crypto/keysetup.o
  CC      kernel/dma/direct.o
  CC      fs/crypto/keysetup_v1.o
  CC      security/apparmor/task.o
  CC      mm/mempool.o
  CC      fs/configfs/symlink.o
  CC      kernel/dma/swiotlb.o
  CC      security/apparmor/ipc.o
  CC      security/apparmor/lib.o
  CC      fs/configfs/mount.o
  CC      fs/crypto/policy.o
  CC      fs/crypto/bio.o
  CC      security/apparmor/match.o
  CC      kernel/cgroup/rstat.o
  CC      security/apparmor/path.o
  CC      mm/oom_kill.o
  CC      fs/configfs/item.o
  CC      security/apparmor/domain.o
  AR      kernel/dma/built-in.a
  CC      kernel/events/core.o
  CC      security/apparmor/policy.o
  CC      fs/crypto/inline_crypt.o
  CC      security/apparmor/policy_unpack.o
  CC      kernel/bpf/verifier.o
  CC      kernel/cgroup/namespace.o
  AR      fs/configfs/built-in.a
  CC      fs/debugfs/inode.o
  CC      security/apparmor/procattr.o
  CC      kernel/cgroup/cgroup-v1.o
  CC      mm/fadvise.o
  AR      fs/crypto/built-in.a
  CC      kernel/cgroup/freezer.o
  CC      security/apparmor/lsm.o
  CC      security/apparmor/resource.o
  CC      fs/debugfs/file.o
  CC      security/apparmor/secid.o
  CC      security/apparmor/file.o
  CC      kernel/cgroup/legacy_freezer.o
  CC      mm/maccess.o
  CC      kernel/cgroup/cpuset.o
  CC      security/apparmor/policy_ns.o
  CC      security/apparmor/label.o
  CC      security/apparmor/mount.o
  AR      fs/debugfs/built-in.a
  CC      fs/devpts/inode.o
  CC      security/apparmor/net.o
  CC      security/apparmor/crypto.o
  AR      fs/devpts/built-in.a
  CC      mm/page_alloc.o
  CC      fs/ecryptfs/dentry.o
  CC      kernel/bpf/inode.o
  CC      kernel/bpf/helpers.o
  CC      kernel/bpf/tnum.o
  CC      kernel/bpf/hashtab.o
  CC      kernel/bpf/arraymap.o
  CC      fs/ecryptfs/file.o
  AR      security/apparmor/built-in.a
  CC      security/integrity/iint.o
  CC      kernel/bpf/percpu_freelist.o
  AR      kernel/cgroup/built-in.a
  CC      kernel/bpf/bpf_lru_list.o
  CC      kernel/bpf/lpm_trie.o
  CC      kernel/bpf/map_in_map.o
  CC      security/integrity/integrity_audit.o
  CC      kernel/bpf/local_storage.o
  CC      kernel/bpf/disasm.o
  CC      fs/ecryptfs/inode.o
  CC      kernel/bpf/btf.o
  CC      kernel/bpf/devmap.o
  CC      kernel/events/ring_buffer.o
  CC      kernel/bpf/cpumap.o
  CC      mm/page-writeback.o
  AR      security/integrity/built-in.a
  CC      security/keys/gc.o
  CC      kernel/bpf/offload.o
  CC      kernel/bpf/stackmap.o
  CC      fs/ecryptfs/main.o
  CC      kernel/bpf/cgroup.o
  CC      security/keys/key.o
  CC      kernel/bpf/reuseport_array.o
  CC      security/keys/keyring.o
  CC      kernel/events/callchain.o
  CC      fs/ecryptfs/super.o
  CC      kernel/events/hw_breakpoint.o
  CC      kernel/events/uprobes.o
  CC      fs/ecryptfs/mmap.o
  CC      fs/ecryptfs/read_write.o
  CC      fs/ecryptfs/crypto.o
  CC      security/keys/keyctl.o
  CC      mm/readahead.o
  CC      security/keys/permission.o
  CC      mm/swap.o
  AR      kernel/bpf/built-in.a
  CC      kernel/irq/irqdesc.o
  CC      kernel/irq/handle.o
  CC      fs/ecryptfs/keystore.o
  CC      fs/ecryptfs/kthread.o
  CC      fs/ecryptfs/debug.o
  CC      security/keys/process_keys.o
  CC      fs/ecryptfs/messaging.o
  CC      fs/ecryptfs/miscdev.o
  CC      mm/truncate.o
  AR      kernel/events/built-in.a
  CC      kernel/irq/manage.o
  AR      kernel/livepatch/built-in.a
  CC      kernel/locking/mutex.o
  CC      kernel/irq/spurious.o
  CC      kernel/irq/resend.o
  CC      kernel/locking/semaphore.o
  CC      kernel/irq/chip.o
  CC      kernel/irq/dummychip.o
  CC      kernel/irq/devres.o
  CC      security/keys/request_key.o
  CC      security/keys/request_key_auth.o
  AR      fs/ecryptfs/built-in.a
  CC      fs/erofs/super.o
  CC      fs/erofs/inode.o
  CC      kernel/irq/autoprobe.o
  CC      security/keys/user_defined.o
  CC      mm/vmscan.o
  CC      kernel/irq/irqdomain.o
  CC      kernel/irq/proc.o
  CC      kernel/locking/rwsem.o
  CC      security/keys/compat.o
  CC      fs/erofs/data.o
  CC      kernel/irq/cpuhotplug.o
  CC      fs/erofs/namei.o
  CC      kernel/irq/pm.o
  CC      fs/erofs/dir.o
  CC      security/keys/proc.o
  CC      kernel/locking/percpu-rwsem.o
  CC      kernel/irq/msi.o
  CC      security/keys/sysctl.o
  CC      fs/erofs/utils.o
  CC      fs/erofs/pcpubuf.o
  CC      fs/erofs/xattr.o
  CC      kernel/irq/affinity.o
  CC      fs/erofs/decompressor.o
  CC      kernel/locking/spinlock.o
  AR      security/keys/built-in.a
  GEN     security/selinux/flask.h security/selinux/av_permissions.h
  CC      security/selinux/avc.o
  CC      security/smack/smack_lsm.o
  CC      security/smack/smack_access.o
  CC      fs/erofs/zmap.o
  CC      fs/erofs/zdata.o
  AR      kernel/irq/built-in.a
  CC      kernel/power/qos.o
  CC      kernel/power/main.o
  CC      kernel/locking/osq_lock.o
  CC      kernel/locking/qspinlock.o
  CC      kernel/locking/rtmutex.o
  CC      kernel/locking/rwsem-xadd.o
  CC      security/smack/smackfs.o
  CC      kernel/locking/qrwlock.o
  CC      security/selinux/hooks.o
  AR      fs/erofs/built-in.a
  CC      mm/shmem.o
  CC      fs/exfat/inode.o
  CC      kernel/power/process.o
  CC      kernel/power/suspend.o
  CC      kernel/power/wakelock.o
  CC      security/selinux/selinuxfs.o
  CC      security/selinux/netlink.o
  AR      kernel/locking/built-in.a
  CC      kernel/printk/printk.o
  CC      fs/exfat/namei.o
  CC      kernel/power/poweroff.o
  CC      kernel/printk/printk_safe.o
  CC      kernel/power/energy_model.o
  AR      security/smack/built-in.a
  CC      security/commoncap.o
  CC      kernel/power/wakeup_reason.o
  CC      kernel/power/wakeup_irq_debug.o
  CC      security/min_addr.o
  CC      security/selinux/nlmsgtab.o
  CC      fs/exfat/dir.o
  CC      fs/exfat/super.o
  CC      fs/exfat/fatent.o
  AR      kernel/power/built-in.a
  CC      kernel/rcu/update.o
  CC      mm/util.o
  CC      security/security.o
  AR      kernel/printk/built-in.a
  CC      kernel/sched/core.o
  CC      security/selinux/netif.o
  CC      security/inode.o
  CC      security/selinux/netnode.o
  CC      fs/exfat/cache.o
  CC      fs/exfat/nls.o
  CC      fs/exfat/misc.o
  CC      fs/exfat/file.o
  CC      mm/mmzone.o
  CC      fs/exfat/balloc.o
  CC      security/lsm_audit.o
  CC      kernel/rcu/sync.o
  CC      kernel/rcu/srcutree.o
  CC      security/selinux/netport.o
  CC      security/selinux/exports.o
  CC      kernel/rcu/tree.o
  CC      kernel/time/time.o
  AR      fs/exfat/built-in.a
  AR      fs/exofs/built-in.a
  CC      fs/exportfs/expfs.o
  CC      mm/vmstat.o
  CC      security/selinux/ss/ebitmap.o
  CC      security/selinux/ss/hashtab.o
  CC      security/selinux/ss/symtab.o
  CC      kernel/rcu/rcu_segcblist.o
  CC      security/selinux/ss/sidtab.o
  CC      security/selinux/ss/avtab.o
  CC      security/selinux/ss/policydb.o
  CC      mm/backing-dev.o
  AR      fs/exportfs/built-in.a
  CC      fs/ext4/balloc.o
  CC      fs/ext4/bitmap.o
  CC      kernel/time/timer.o
  CC      security/selinux/ss/services.o
  CC      security/selinux/ss/conditional.o
  CC      fs/ext4/block_validity.o
  CC      mm/mm_init.o
  CC      fs/ext4/dir.o
  CC      fs/ext4/ext4_jbd2.o
  CC      security/selinux/ss/mls.o
  CC      mm/mmu_context.o
  CC      security/selinux/ss/status.o
  CC      mm/percpu.o
  CC      fs/ext4/extents.o
  AR      kernel/rcu/built-in.a
  CC      kernel/trace/trace_clock.o
  CC      kernel/trace/ring_buffer.o
  CC      mm/slab_common.o
  CC      security/selinux/netlabel.o
  CC      fs/ext4/extents_status.o
  CC      kernel/time/hrtimer.o
  CC      kernel/time/timekeeping.o
  CC      kernel/trace/trace.o
  CC      kernel/sched/loadavg.o
  AR      security/selinux/built-in.a
  CC      fs/ext4/file.o
  AR      security/built-in.a
  CC      mm/compaction.o
  CC      mm/vmacache.o
  CC      kernel/time/ntp.o
  CC      kernel/trace/trace_output.o
  CC      crypto/asymmetric_keys/asymmetric_type.o
  CC      kernel/sched/clock.o
  CC      fs/ext4/fsmap.o
  CC      mm/interval_tree.o
  CC      kernel/time/clocksource.o
  CC      mm/list_lru.o
  CC      fs/ext4/fsync.o
  CC      crypto/asymmetric_keys/restrict.o
  CC      mm/workingset.o
  CC      kernel/time/jiffies.o
  CC      fs/ext4/hash.o
  CC      crypto/asymmetric_keys/signature.o
  CC      kernel/trace/trace_seq.o
  CC      kernel/sched/cputime.o
  CC      kernel/trace/trace_stat.o
  CC      mm/debug.o
  CC      mm/gup.o
  CC      fs/ext4/ialloc.o
  CC      mm/highmem.o
  CC      kernel/time/timer_list.o
  CC      crypto/asymmetric_keys/public_key.o
  CC      kernel/trace/trace_printk.o
  CC      fs/ext4/indirect.o
  CC      kernel/trace/trace_sched_switch.o
  CC      mm/memory.o
  CC      kernel/time/timeconv.o
  CC      mm/mincore.o
  CC      kernel/sched/idle.o
  CC      kernel/trace/trace_nop.o
  ASN.1   crypto/asymmetric_keys/x509.asn1.c
  ASN.1   crypto/asymmetric_keys/x509_akid.asn1.c
  CC      crypto/asymmetric_keys/x509_public_key.o
  CC      fs/ext4/inline.o
  CC      mm/mlock.o
  CC      kernel/time/timecounter.o
  CC      fs/ext4/inode.o
  CC      fs/ext4/ioctl.o
  CC      mm/mmap.o
  CC      kernel/trace/blktrace.o
  ASN.1   crypto/asymmetric_keys/pkcs7.asn1.c
  CC      kernel/time/alarmtimer.o
  CC      crypto/asymmetric_keys/pkcs7_trust.o
  CC      crypto/asymmetric_keys/pkcs7_verify.o
  CC      fs/ext4/mballoc.o
  CC      kernel/sched/fair.o
  CC      mm/mprotect.o
  CC      kernel/time/posix-timers.o
  CC      fs/ext4/migrate.o
  CC      kernel/trace/trace_events.o
  CC      crypto/asymmetric_keys/x509.asn1.o
  CC      crypto/asymmetric_keys/x509_akid.asn1.o
  CC      mm/mremap.o
  CC      mm/msync.o
  CC      crypto/asymmetric_keys/x509_cert_parser.o
  CC      mm/page_vma_mapped.o
  CC      fs/ext4/mmp.o
  CC      kernel/time/posix-cpu-timers.o
  CC      mm/pagewalk.o
  CC      crypto/asymmetric_keys/pkcs7.asn1.o
  CC      mm/pgtable-generic.o
  CC      mm/rmap.o
  CC      crypto/asymmetric_keys/pkcs7_parser.o
  CC      fs/ext4/move_extent.o
  CC      fs/ext4/namei.o
  CC      mm/vmalloc.o
  CC      kernel/time/posix-clock.o
  CC      kernel/time/itimer.o
  CC      kernel/trace/trace_export.o
  AR      crypto/asymmetric_keys/built-in.a
  CC      crypto/api.o
  CC      fs/ext4/page-io.o
  CC      fs/ext4/readpage.o
  CC      kernel/trace/trace_event_perf.o
  CC      kernel/time/clockevents.o
  CC      mm/process_vm_access.o
  CC      kernel/time/tick-common.o
fs/ext4/page-io.c:512:60: error: too few arguments to function call, expected 5, have 4
                ret = io_submit_add_bh(io, inode, bounce_page ?: page, bh);
                      ~~~~~~~~~~~~~~~~                                   ^
fs/ext4/page-io.c:382:12: note: 'io_submit_add_bh' declared here
static int io_submit_add_bh(struct ext4_io_submit *io,
           ^
1 error generated.
make[2]: *** [scripts/Makefile.build:338: fs/ext4/page-io.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC      kernel/time/tick-broadcast.o
  CC      kernel/time/tick-broadcast-hrtimer.o
  CC      crypto/cipher.o
  CC      crypto/compress.o
  CC      kernel/time/sched_clock.o
make[1]: *** [scripts/Makefile.build:642: fs/ext4] Error 2
make: *** [Makefile:1208: fs] Error 2
make: *** Waiting for unfinished jobs....
  CC      kernel/time/tick-oneshot.o
  CC      kernel/time/tick-sched.o
  CC      kernel/trace/trace_events_filter.o
  CC      kernel/time/vsyscall.o
  CC      mm/showmem.o
  CC      crypto/memneq.o
  CC      kernel/time/timekeeping_debug.o
  CC      crypto/crypto_wq.o
  CC      crypto/algapi.o
  CC      crypto/scatterwalk.o
  CC      crypto/proc.o
  CC      mm/vmpressure.o
  CC      kernel/trace/trace_events_trigger.o
  CC      kernel/sched/rt.o
  CC      crypto/aead.o
  CC      crypto/ablkcipher.o
  AR      kernel/time/built-in.a
  CHK     kernel/kheaders_data.tar.xz
  CC      crypto/blkcipher.o
  CC      mm/init-mm.o
  GEN     kernel/kheaders_data.tar.xz
  CC      kernel/trace/bpf_trace.o
  CC      crypto/skcipher.o
  CC      mm/nobootmem.o
  CC      crypto/seqiv.o
  CC      kernel/trace/power-traces.o
  CC      crypto/echainiv.o
  CC      crypto/ahash.o
  CC      crypto/shash.o
  CC      kernel/sched/deadline.o
  CC      crypto/akcipher.o
  CC      mm/madvise.o
  CC      crypto/kpp.o
  ASN.1   crypto/rsapubkey.asn1.c
  ASN.1   crypto/rsaprivkey.asn1.c
  CC      crypto/rsa.o
  CC      kernel/trace/rpm-traces.o
  CC      crypto/rsa_helper.o
  CC      mm/memblock.o
  CC      crypto/rsa-pkcs1pad.o
  CC      crypto/acompress.o
  CC      crypto/scompress.o
  CC      crypto/algboss.o
  CC      kernel/sched/wait.o
  CC      crypto/testmgr.o
  CC      crypto/cmac.o
  CC      kernel/trace/trace_probe.o
  CC      crypto/hmac.o
  CC      crypto/xcbc.o
  CC      crypto/crypto_null.o
  CC      crypto/md5.o
  CC      crypto/sha1_generic.o
  CC      kernel/trace/trace_uprobe.o
  CC      mm/page_io.o
  CC      crypto/sha256_generic.o
  CC      crypto/sha512_generic.o
  CC      crypto/gf128mul.o
  CC      kernel/sched/wait_bit.o
  CC      mm/swap_state.o
  CC      crypto/ecb.o
  CC      crypto/cbc.o
  CC      crypto/cts.o
  CC      kernel/trace/msm_rtb.o
  CC      crypto/xts.o
  CC      crypto/ctr.o
  CC      crypto/gcm.o
  CC      crypto/ccm.o
  CC      crypto/cryptd.o
  CC      mm/swapfile.o
  CC      crypto/des_generic.o
  CC      kernel/sched/swait.o
  CC      kernel/sched/completion.o
  CC      crypto/twofish_generic.o
  CC      kernel/trace/ipc_logging.o
  CC      crypto/twofish_common.o
  CC      crypto/aes_generic.o
  CC      crypto/arc4.o
  CC      crypto/deflate.o
  CC      crypto/crc32c_generic.o
  CC      crypto/crc32_generic.o
  CC      kernel/trace/ipc_logging_debug.o
  CC      crypto/authenc.o
  CC      kernel/sched/cpupri.o
  CC      crypto/authencesn.o
  CC      crypto/lzo.o
  CC      kernel/sched/cpudeadline.o
  CC      crypto/lz4.o
  CC      crypto/rng.o
  CC      mm/swap_slots.o
  CC      crypto/ansi_cprng.o
  CC      crypto/drbg.o
  CC      kernel/sched/topology.o
  AR      kernel/trace/built-in.a
  CC      kernel/fork.o
  CC      crypto/jitterentropy.o
  CC      kernel/sched/stop_task.o
  CC      crypto/jitterentropy-kcapi.o
  CC      crypto/ghash-generic.o
  CC      crypto/ecc.o
  CC      mm/swap_ratio.o
  CC      crypto/ecdh.o
  CC      crypto/ecdh_helper.o
  CC      crypto/hash_info.o
  CC      crypto/simd.o
  CC      mm/dmapool.o
  CC      crypto/rsapubkey.asn1.o
  CC      kernel/sched/pelt.o
  CC      crypto/rsaprivkey.asn1.o
  CC      kernel/sched/walt.o
  CC      kernel/sched/boost.o
  CC      kernel/sched/sched_avg.o
  CC      kernel/sched/autogroup.o
  CC      kernel/sched/stats.o
  CC      mm/sparse.o
  AR      crypto/built-in.a
  CC      kernel/sched/debug.o
  CC      kernel/sched/tune.o
  CC      kernel/sched/cpuacct.o
  CC      kernel/sched/cpufreq.o
  CC      kernel/exec_domain.o
  CC      kernel/sched/cpufreq_schedutil.o
  CC      kernel/sched/membarrier.o
  CC      kernel/sched/isolation.o
  CC      mm/sparse-vmemmap.o
  CC      kernel/panic.o
  CC      kernel/sched/core_ctl.o
  CC      kernel/sched/psi.o
  CC      mm/slub.o
  CC      mm/migrate.o
  CC      mm/page_counter.o
  CC      mm/memcontrol.o
  CC      kernel/cpu.o
  CC      mm/swap_cgroup.o
  CC      mm/page_owner.o
  CC      mm/page_isolation.o
  CC      mm/zpool.o
  CC      mm/zsmalloc.o
kernel/cpu.c:2422:27: error: expected value in expression
#if CONFIG_LITTLE_CPU_MASK
                          ^
kernel/cpu.c:2430:24: error: expected value in expression
#if CONFIG_BIG_CPU_MASK
                       ^
kernel/cpu.c:2438:26: error: expected value in expression
#if CONFIG_PRIME_CPU_MASK
                         ^
  CC      mm/z3fold.o
3 errors generated.
make[1]: *** [scripts/Makefile.build:338: kernel/cpu.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  CC      mm/early_ioremap.o
  AR      kernel/sched/built-in.a
  CC      mm/cma.o
  CC      mm/page_ext.o
  CC      mm/cma_debug.o
  CC      mm/frame_vector.o
  CC      mm/usercopy.o
  CC      mm/memfd.o
  CC      mm/process_reclaim.o
  AR      mm/built-in.a
make: *** [Makefile:1208: kernel] Error 2
th1nhhdk commented 1 year ago

Debian 12 only have python3, no more python2 so ./scripts/gcc-wrapper.py is broken, using Tips and tricks -> Remove GCC wrapper from this guide the error is no more.

Upstream LineageOS 20 kernel doesn't have ./scripts/gcc-wrapper.py anymore, maybe the sources is outdated?

hellobbn commented 1 year ago

not my fault then, I don't work on this kernel

th1nhhdk commented 1 year ago

not my fault then, I don't work on this kernel

oops i didn't notice that, thanks anyway

th1nhhdk commented 1 year ago

I have a question, i compiled lineageos upstream, with and without kernelsu successfully, after that i unpacked lineageos's boot.img with android image kitchen, replaced split_img/boot.img-kernel with out/arch/arm64/boot/Image that i just build, repack and flashed it to my phone, but the phone is stuck at the oem logo and won't boot, i need help @hellobbn

heres my build commands

PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android- pdx203_defconfig
PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android- menuconfig
# then i set CONFIG_KPROBES=y and CONFIG_KPROBE_EVENTS=y (CONFIG_HAVE_KPROBES=y is set by default)
PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android-

also i used android-13.0.0_r0.52 for both clang and gcc toolchain, and upstream kernel is latest.

edit: my fork of this repo have the latest lineageos kernel source with kernelsu integrated

saku-bruh commented 1 year ago

@th1nhhdk Oh no he asked bbn

th1nhhdk commented 1 year ago

@th1nhhdk Oh no he asked bbn

whats wrong with that?

lolipuru commented 1 year ago
fs/ext4/page-io.c:512:60: error: too few arguments to function call, expected 5, have 4
                ret = io_submit_add_bh(io, inode, bounce_page ?: page, bh);
                      ~~~~~~~~~~~~~~~~                                   ^
fs/ext4/page-io.c:382:12: note: 'io_submit_add_bh' declared here
static int io_submit_add_bh(struct ext4_io_submit *io,
           ^
1 error generated.a
kernel/cpu.c:2422:27: error: expected value in expression
#if CONFIG_LITTLE_CPU_MASK
                          ^
kernel/cpu.c:2430:24: error: expected value in expression
#if CONFIG_BIG_CPU_MASK
                       ^
kernel/cpu.c:2438:26: error: expected value in expression
#if CONFIG_PRIME_CPU_MASK
                         ^
  CC      mm/z3fold.o
3 errors generated.

seem like kernel still didn't get fix i see.

th1nhhdk commented 1 year ago
fs/ext4/page-io.c:512:60: error: too few arguments to function call, expected 5, have 4
                ret = io_submit_add_bh(io, inode, bounce_page ?: page, bh);
                      ~~~~~~~~~~~~~~~~                                   ^
fs/ext4/page-io.c:382:12: note: 'io_submit_add_bh' declared here
static int io_submit_add_bh(struct ext4_io_submit *io,
           ^
1 error generated.a
kernel/cpu.c:2422:27: error: expected value in expression
#if CONFIG_LITTLE_CPU_MASK
                          ^
kernel/cpu.c:2430:24: error: expected value in expression
#if CONFIG_BIG_CPU_MASK
                       ^
kernel/cpu.c:2438:26: error: expected value in expression
#if CONFIG_PRIME_CPU_MASK
                         ^
  CC      mm/z3fold.o
3 errors generated.

seem like kernel still didn't get fix i see.

i have the same problem, fixed it in my fork of this repo, i got the latest upstream kernel source from lineageos github, added kernelsu to it , thats all

edit: i forgot to enable kprobe in the defconfig, you have to enable it yourself for now

th1nhhdk commented 1 year ago

I have a question, i compiled lineageos upstream, with and without kernelsu successfully, after that i unpacked lineageos's boot.img with android image kitchen, replaced split_img/boot.img-kernel with out/arch/arm64/boot/Image that i just build, repack and flashed it to my phone, but the phone is stuck at the oem logo and won't boot, i need help @hellobbn

heres my build commands

PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android- pdx203_defconfig
PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android- menuconfig
# then i set CONFIG_KPROBES=y and CONFIG_KPROBE_EVENTS=y (CONFIG_HAVE_KPROBES=y is set by default)
PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android-

also i used android-13.0.0_r0.52 for both clang and gcc toolchain, and upstream kernel is latest.

edit: my fork of this repo have the latest lineageos kernel source with kernelsu integrated

I forgot to say that, i'm using pdx203, SOG01 Japanese Au varient

th1nhhdk commented 1 year ago
fs/ext4/page-io.c:512:60: error: too few arguments to function call, expected 5, have 4
                ret = io_submit_add_bh(io, inode, bounce_page ?: page, bh);
                      ~~~~~~~~~~~~~~~~                                   ^
fs/ext4/page-io.c:382:12: note: 'io_submit_add_bh' declared here
static int io_submit_add_bh(struct ext4_io_submit *io,
           ^
1 error generated.a
kernel/cpu.c:2422:27: error: expected value in expression
#if CONFIG_LITTLE_CPU_MASK
                          ^
kernel/cpu.c:2430:24: error: expected value in expression
#if CONFIG_BIG_CPU_MASK
                       ^
kernel/cpu.c:2438:26: error: expected value in expression
#if CONFIG_PRIME_CPU_MASK
                         ^
  CC      mm/z3fold.o
3 errors generated.

seem like kernel still didn't get fix i see.

i have the same problem, fixed it in my fork of this repo, i got the latest upstream kernel source from lineageos github, added kernelsu to it , thats all

edit: i forgot to enable kprobe in the defconfig, you have to enable it yourself for now

I can open a pull request if you like?

lolipuru commented 1 year ago

i have the same problem, fixed it in my fork of this repo, i got the latest upstream kernel source from lineageos github, added kernelsu to it , thats all

edit: i forgot to enable kprobe in the defconfig, you have to enable it yourself for now

ofc, you should fork and fix it by yourself. due to head dev is no longer owning the device 💀

lolipuru commented 1 year ago

I have a question, i compiled lineageos upstream, with and without kernelsu successfully, after that i unpacked lineageos's boot.img with android image kitchen, replaced split_img/boot.img-kernel with out/arch/arm64/boot/Image that i just build, repack and flashed it to my phone, but the phone is stuck at the oem logo and won't boot, i need help @hellobbn heres my build commands

PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android- pdx203_defconfig
PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android- menuconfig
# then i set CONFIG_KPROBES=y and CONFIG_KPROBE_EVENTS=y (CONFIG_HAVE_KPROBES=y is set by default)
PATH="$PATH:/home/th1nhhdk/linux-x86/clang-r450784d/bin:/home/th1nhhdk/aarch64-linux-android-4.9/bin" make -j10 O=out ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-android-

also i used android-13.0.0_r0.52 for both clang and gcc toolchain, and upstream kernel is latest. edit: my fork of this repo have the latest lineageos kernel source with kernelsu integrated

I forgot to say that, i'm using pdx203, SOG01 Japanese Au varient

you should zip kernel with anykernel ( https://github.com/osm0sis/AnyKernel3 )

and then flash it with lineage recovery

th1nhhdk commented 1 year ago

you should zip kernel with anykernel ( https://github.com/osm0sis/AnyKernel3 )

and then flash it with lineage recovery

I'll try this later, it's like 2AM in my timezone now, and i do need to sleep

lolipuru commented 1 year ago

you should zip kernel with anykernel ( https://github.com/osm0sis/AnyKernel3 ) and then flash it with lineage recovery

I'll try this later, it's like 2AM in my timezone now, and i do need to sleep

1:57 am here also 💀

th1nhhdk commented 1 year ago

you should zip kernel with anykernel ( https://github.com/osm0sis/AnyKernel3 ) and then flash it with lineage recovery

I'll try this later, it's like 2AM in my timezone now, and i do need to sleep

1:57 am here also 💀

I live in the same timezone (GMT+7) as you, different country tho

th1nhhdk commented 1 year ago

you should zip kernel with anykernel ( https://github.com/osm0sis/AnyKernel3 )

and then flash it with lineage recovery

I'm using OrangeFox Recovery to flash it, yeah, both upstream lineageos kernel and upstream + kernelsu stucks at the sony logo and not booting

https://github.com/th1nhhdk/AnyKernel3/tree/pdx203

Edit: I tested AnyKernel3 with kernel from LineageOS's boot.img, it boots like normal, so there is something wrong with my kernel, and i don't know what

th1nhhdk commented 1 year ago

I'm using OrangeFox Recovery to flash it, yeah, both upstream lineageos kernel and upstream + kernelsu stucks at the sony logo and not booting

Maybe because i threw out like all the build flags??

After reading LineageOS source code (it's very f***ing long), i think i figured out the build command

export MAKEFLAGS="$(echo $(nproc --all) + 2 | bc) $MAKEFLAGS"

PATH="$HOME/aarch64-linux-android-4.9/bin:$HOME/linux-x86/clang-r450784d/bin:$PATH" LD_LIBRARY_PATH="$HOME/linux-x86/clang-r450784d/lib64:$LD_LIBRARY_PATH" PERL5LIB=$HOME/android_prebuilts_tools-lineage/common/perl-base $HOME/build-tools/linux-x86/bin/make DTC_EXT=$HOME/misc/linux-x86/dtc/dtc DTC_OVERLAY_TEST_EXT=$HOME/misc/linux-x86/libufdt/ufdt_apply_overlay LLVM=1 LLVM_IAS=1 O=out ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- CLANG_TRIPLE=aarch64-linux-gnu- CC="ccache clang --cuda-path=/dev/null"

Compared to the last build command this one is very long, let's hope that it boots

th1nhhdk commented 1 year ago

IT BOOTS

Screenshot_20230703-162144_KernelSU Screenshot_20230703-162030_Cài đặt

ghost commented 1 year ago

@th1nhhdk Congratulations

th1nhhdk commented 1 year ago

I have made a script which builds this automatically, basically it downloads clang, gcc toolchain and other dependencies, then it downloads latest lineageos kernel and apply kernelsu to it, then it builds that and package it into a anykernel3 zip

https://github.com/th1nhhdk/lineageos_kernel_buildscript

Heres the kernel zip: https://github.com/th1nhhdk/AnyKernel3/releases/download/pdx203-4.19.275-kernelsu-perf/pdx203-4.19.275-kernelsu-perf-AnyKernel3.zip