freak07 / FLORAL

Kirisakura Kernel for the Pixel 4/XL
Other
27 stars 22 forks source link

Hi Developer, I have some compilation problems #7

Closed R917C closed 1 month ago

R917C commented 1 month ago

I am trying to compile the kernel, but I failed.

(test) gitpod /workspace/FLORAL (master_T_floral_caf_27) $ make ARCH=arm64 O=out -j8
make[1]: Entering directory '/workspace/FLORAL/out'
WARNING: Disabling clang-specific options with gcc
  GEN     ./Makefile
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  Using .. as source for kernel
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/dtc/dtc.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/genksyms/lex.lex.o
  MKELF   scripts/mod/elfconfig.h
  CHK     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/asn1_compiler
  HOSTLD  scripts/genksyms/genksyms
  HOSTCC  scripts/extract-cert
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/dtc/dtc
  HOSTLD  scripts/mod/modpost
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
  CHK     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  CALL    ../scripts/checksyscalls.sh
  LDS     arch/arm64/kernel/vdso/vdso.lds
  VDSOC   arch/arm64/kernel/vdso/vgettimeofday.o
  VDSOA   arch/arm64/kernel/vdso/note.o
  VDSOA   arch/arm64/kernel/vdso/sigreturn.o
  LD      arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  LDS     arch/arm64/kernel/vdso32/vdso.lds
  VDSOC32   arch/arm64/kernel/vdso32/vgettimeofday.o
  VDSOA32   arch/arm64/kernel/vdso32/sigreturn.o
  HOSTCC  arch/arm64/kernel/vdso32/../../../arm/vdso/vdsomunge
  VDSOL32   arch/arm64/kernel/vdso32/vdso.so.raw
  MUNGE   arch/arm64/kernel/vdso32/vdso.so.dbg
  VDSOSYM include/generated/vdso32-offsets.h
  CC      init/main.o
  CHK     include/generated/compile.h
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  CC      init/do_mounts_dm.o
  HOSTCC  usr/gen_init_cpio
  UPD     include/generated/compile.h
  CC      init/do_mounts_verity.o
  CC      arch/arm64/kernel/debug-monitors.o
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  AR      usr/built-in.o
  CC      arch/arm64/mm/dma-mapping.o
  CC      init/noinitramfs.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  CC      arch/arm64/net/bpf_jit_comp.o
  AS      arch/arm64/kernel/entry.o
  CC      arch/arm64/kernel/irq.o
  CC      arch/arm64/kernel/fpsimd.o
  CC      init/init_task.o
  CC      arch/arm64/mm/extable.o
  AS      arch/arm64/kernel/entry-fpsimd.o
  CC      arch/arm64/kernel/process.o
  CC      init/version.o
  AR      init/mounts.o
  CC      arch/arm64/mm/fault.o
  CC      arch/arm64/mm/init.o
  CC      arch/arm64/kernel/ptrace.o
  CC      arch/arm64/kernel/setup.o
  AR      init/built-in.o
  CC      arch/arm64/crypto/sha1-ce-glue.o
../arch/arm64/kernel/process.c: In function ‘show_data’:
../arch/arm64/kernel/process.c:202:24: error: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘long unsigned int’ [-Werror=format=]
  202 |         printk("\n%s: %pS:\n", name, addr);
      |                       ~^             ~~~~
      |                        |             |
      |                        void *        long unsigned int
      |                       %ld
cc1: all warnings being treated as errors
make[2]: *** [../scripts/Makefile.build:364: arch/arm64/kernel/process.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  AS      arch/arm64/crypto/sha1-ce-core.o
  AR      arch/arm64/net/built-in.o
  CC      arch/arm64/crypto/sha2-ce-glue.o
  AS      arch/arm64/crypto/sha2-ce-core.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      kernel/fork.o
  CC      kernel/exec_domain.o
  AS      arch/arm64/mm/cache.o
  CC      arch/arm64/mm/copypage.o
  CC      arch/arm64/mm/flush.o
  CC      arch/arm64/mm/ioremap.o
  CC      arch/arm64/crypto/aes-ce-glue.o
  CC      arch/arm64/crypto/aes-ce-ccm-glue.o
make[1]: *** [/workspace/FLORAL/Makefile:1233: arch/arm64/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....
  AS      arch/arm64/crypto/aes-ce-ccm-core.o
  CC      kernel/panic.o
  CC      arch/arm64/crypto/aes-glue-ce.o
  CC      arch/arm64/mm/mmap.o
  AS      arch/arm64/crypto/aes-ce.o
  CC      arch/arm64/crypto/aes-glue-neon.o
  CC      arch/arm64/mm/pgd.o
  CC      arch/arm64/mm/mmu.o
  CC      arch/arm64/mm/context.o
  AS      arch/arm64/mm/proc.o
  CC      arch/arm64/mm/pageattr.o
  AS      arch/arm64/crypto/aes-neon.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      arch/arm64/crypto/sha256-glue.o
  CC      kernel/softirq.o
  AS      arch/arm64/crypto/sha256-core.o
  AS      arch/arm64/crypto/aes-cipher-core.o
  CC      arch/arm64/crypto/aes-cipher-glue.o
  CC      kernel/resource.o
  CC      kernel/sysctl.o
  CC      kernel/sysctl_binary.o
  AR      arch/arm64/mm/built-in.o
  CC      kernel/capability.o
  AR      arch/arm64/crypto/sha1-ce.o
  AR      arch/arm64/crypto/sha2-ce.o
  AR      arch/arm64/crypto/ghash-ce.o
  AR      arch/arm64/crypto/aes-ce-cipher.o
  AR      arch/arm64/crypto/aes-ce-ccm.o
  AR      arch/arm64/crypto/aes-ce-blk.o
  AR      arch/arm64/crypto/aes-neon-blk.o
  AR      arch/arm64/crypto/sha256-arm64.o
  AR      arch/arm64/crypto/aes-arm64.o
  AR      arch/arm64/crypto/built-in.o
  CC      kernel/ptrace.o
  CC      kernel/user.o
  CC      kernel/signal.o
  CC      kernel/sys.o
  CC      kernel/umh.o
  CC      kernel/workqueue.o
  CC      kernel/pid.o
  CC      kernel/task_work.o
  CC      kernel/extable.o
  CC      kernel/params.o
  CC      kernel/kthread.o
  CC      kernel/sys_ni.o
  CC      kernel/nsproxy.o
  CC      kernel/notifier.o
  CC      kernel/ksysfs.o
  CC      kernel/cred.o
  CC      kernel/reboot.o
  CC      kernel/async.o
  CC      kernel/range.o
  CC      kernel/smpboot.o
  CC      kernel/ucount.o
  CC      kernel/kmod.o
  CC      kernel/groups.o
  CC      kernel/cgroup/cgroup.o
  CC      kernel/debug/debug_core.o
  CC      kernel/bpf/core.o
  CC      kernel/events/core.o
  CC      kernel/events/ring_buffer.o
  CC      kernel/irq/irqdesc.o
  CC      kernel/irq/handle.o
  CC      kernel/irq/manage.o
  CC      kernel/debug/gdbstub.o
  AR      kernel/livepatch/built-in.o
  CC      kernel/irq/spurious.o
  CC      kernel/locking/mutex.o
  CC      kernel/locking/semaphore.o
  CC      kernel/debug/kdb/kdb_io.o
  CC      kernel/irq/resend.o
  CC      kernel/locking/rwsem.o
  CC      kernel/irq/chip.o
  CC      kernel/bpf/syscall.o
  CC      kernel/bpf/verifier.o
  CC      kernel/debug/kdb/kdb_main.o
  CC      kernel/locking/percpu-rwsem.o
  CC      kernel/bpf/inode.o
  CC      kernel/locking/spinlock.o
  CC      kernel/irq/dummychip.o
  CC      kernel/locking/osq_lock.o
  CC      kernel/locking/rtmutex.o
  CC      kernel/irq/devres.o
  CC      kernel/irq/autoprobe.o
  CC      kernel/irq/irqdomain.o
  CC      kernel/debug/kdb/kdb_support.o
  CC      kernel/events/callchain.o
  CC      kernel/cgroup/namespace.o
  CC      kernel/cgroup/cgroup-v1.o
  CC      kernel/locking/rwsem-xadd.o
  CC      kernel/locking/qrwlock.o
  CC      kernel/events/hw_breakpoint.o
  CC      kernel/debug/kdb/kdb_bt.o
  CC      kernel/irq/proc.o
  CC      kernel/events/uprobes.o
  AR      kernel/locking/built-in.o
  CC      kernel/debug/kdb/gen-kdb_cmds.o
  CC      kernel/bpf/helpers.o
  CC      kernel/bpf/tnum.o
  CC      kernel/debug/kdb/kdb_bp.o
  CC      kernel/power/qos.o
  CC      kernel/cgroup/freezer.o
  CC      kernel/irq/cpuhotplug.o
  CC      kernel/irq/pm.o
  CC      kernel/bpf/hashtab.o
  CC      kernel/bpf/arraymap.o
  CC      kernel/debug/kdb/kdb_debugger.o
  CC      kernel/cgroup/legacy_freezer.o
  CC      kernel/irq/msi.o
  CC      kernel/bpf/percpu_freelist.o
  AR      kernel/debug/kdb/built-in.o
  AR      kernel/debug/built-in.o
  CC      kernel/bpf/bpf_lru_list.o
  AR      kernel/events/built-in.o
  CC      kernel/cgroup/cpuset.o
  CC      kernel/irq/affinity.o
  CC      kernel/power/main.o
  CC      kernel/power/console.o
  CC      kernel/power/process.o
  CC      kernel/power/suspend.o
  CC      kernel/bpf/lpm_trie.o
  AR      kernel/irq/built-in.o
  CC      kernel/bpf/map_in_map.o
  CC      kernel/bpf/devmap.o
  CC      kernel/printk/printk.o
  CC      kernel/printk/printk_safe.o
  CC      kernel/power/wakelock.o
  CC      kernel/power/poweroff.o
  CC      kernel/power/wakeup_reason.o
  CC      kernel/bpf/stackmap.o
  CC      kernel/bpf/cgroup.o
  CC      kernel/rcu/update.o
  CC      kernel/rcu/sync.o
  CC      kernel/sched/core.o
  AR      kernel/power/built-in.o
  CC      kernel/time/time.o
  AR      kernel/cgroup/built-in.o
  CC      kernel/trace/trace_clock.o
  CC      kernel/trace/ring_buffer.o
  CC      kernel/freezer.o
  CC      kernel/time/timer.o
  CC      kernel/rcu/srcutree.o
  AR      kernel/bpf/built-in.o
  CC      kernel/time/hrtimer.o
  CC      kernel/time/timekeeping.o
  CC      kernel/time/ntp.o
  AR      kernel/printk/built-in.o
  CC      kernel/sched/loadavg.o
  CC      kernel/time/clocksource.o
  CC      kernel/rcu/tree.o
  CC      kernel/rcu/rcu_segcblist.o
  CC      kernel/time/jiffies.o
  CC      kernel/trace/trace.o
  CC      kernel/time/timer_list.o
  CC      kernel/time/timeconv.o
  CC      kernel/sched/clock.o
  CC      kernel/time/timecounter.o
  CC      kernel/sched/cputime.o
  CC      kernel/time/alarmtimer.o
  CC      kernel/sched/idle_task.o
  CC      kernel/profile.o
  CC      kernel/stacktrace.o
  CC      kernel/sched/fair.o
  CC      kernel/sched/rt.o
  CC      kernel/futex.o
  CC      kernel/smp.o
  CC      kernel/time/posix-timers.o
  CC      kernel/sched/deadline.o
  AR      kernel/rcu/built-in.o
  CC      kernel/time/posix-cpu-timers.o
  CC      kernel/time/posix-clock.o
  CC      kernel/sched/wait.o
  CC      kernel/time/itimer.o
  CC      kernel/uid16.o
  CC      kernel/module.o
  CC      kernel/trace/trace_output.o
  CC      kernel/sched/wait_bit.o
  CC      kernel/time/clockevents.o
  CC      kernel/kallsyms.o
  CC      kernel/kdebuginfo.o
  CC      kernel/time/tick-common.o
  CC      kernel/trace/trace_seq.o
  CC      kernel/trace/trace_stat.o
  CC      kernel/compat.o
  CC      kernel/utsname.o
  GZIP    kernel/config_data.gz
  CC      kernel/time/tick-broadcast.o
  CC      kernel/trace/trace_printk.o
  CC      kernel/stop_machine.o
  CC      kernel/trace/trace_sched_switch.o
  CC      kernel/time/tick-broadcast-hrtimer.o
  CC      kernel/audit.o
  CC      kernel/time/sched_clock.o
  CC      kernel/auditfilter.o
  CC      kernel/seccomp.o
  CC      kernel/sched/swait.o
  CC      kernel/trace/trace_nop.o
  CC      kernel/time/tick-oneshot.o
  CC      kernel/time/tick-sched.o
  CC      kernel/sched/completion.o
  CC      kernel/utsname_sysctl.o
  CC      kernel/trace/blktrace.o
  CC      kernel/time/timekeeping_debug.o
  CC      kernel/taskstats.o
  CC      kernel/sched/idle.o
  CC      kernel/sched/cpupri.o
  CC      kernel/tsacct.o
  CC      kernel/sched/cpudeadline.o
  CC      kernel/trace/trace_events.o
  AR      kernel/time/built-in.o
  CC      kernel/tracepoint.o
  CC      kernel/sched/topology.o
  CC      kernel/irq_work.o
  CC      kernel/trace/trace_export.o
  CC      kernel/cpu_pm.o
  CC      kernel/jump_label.o
  CC      kernel/memremap.o
  CC      kernel/trace/trace_event_perf.o
  CC      kernel/trace/trace_events_filter.o
  CC      kernel/trace/trace_events_trigger.o
  CC      kernel/trace/bpf_trace.o
  CC      kernel/sched/stop_task.o
  CC      kernel/trace/power-traces.o
  CC      kernel/sched/sched_avg.o
  CC      kernel/trace/rpm-traces.o
  CC      kernel/sched/energy.o
  CC      kernel/trace/trace_kdb.o
  CC      kernel/trace/trace_probe.o
  CC      kernel/sched/stats.o
  CC      kernel/sched/debug.o
  CC      kernel/trace/trace_uprobe.o
  CC      kernel/trace/ipc_logging.o
  CHK     kernel/config_data.h
  CC      kernel/sched/tune.o
  CC      kernel/sched/cpuacct.o
  CC      kernel/sched/cpufreq.o
  CC      kernel/trace/ipc_logging_debug.o
  CC      kernel/sched/cpufreq_schedutil.o
  CC      kernel/sched/membarrier.o
  CC      kernel/configs.o
  CC      kernel/sched/psi.o
  AR      kernel/trace/built-in.o
  AR      kernel/sched/built-in.o
  AR      kernel/built-in.o
make[1]: Leaving directory '/workspace/FLORAL/out'
make: *** [Makefile:153: sub-make] Error 2

It failed. Can you tell me your environment?(e.g. your tools, version, etc.)

I think you may want to ask, why I compilt it myself, because I want to add something in kernel, and first I should try to compilt it and make sure it works, but I failed.

R917C commented 1 month ago

P.S. I asked you to add KernelSU to the kernel but you didn't reply. So I am trying to add it myself. I found a nice online IDE(gitpod), so I can try now

freak07 commented 1 month ago

there´s a buildscript , you´ll see all toolchains, tools etc necessary in this script.

build_kirisakura.sh

R917C commented 1 month ago

there´s a buildscript , you´ll see all toolchains, tools etc necessary in this script.

build_kirisakura.sh

Thank you !

R917C commented 1 month ago

Sorry, I have to ask you again, because I don't know the version of "dtc-aosp" and how to install it. Could you tell me, please?

R917C commented 1 month ago

Never mind, I found it in XDA :)

R917C commented 1 month ago
  AR      drivers/built-in.o
make[1]: Leaving directory '/workspace/FLORAL/out'
make: *** [Makefile:153: sub-make] Error 2

I'm using the same tool you're using(Maybe they are in the wrong version, but it is from google, aarch64 and armeabi), and I got errors again. I am feeling bad :(

I am using your script to build it, but I can just guess the version of the tools :( Could you tell me the version of the tool you are using and where to download it? Thank you very much!

Sorry I keep reopening the issue.

@freak07

freak07 commented 1 month ago

That's not the actual error. It happens earlier. Check the build log :)

R917C commented 1 month ago

I found the errors. Log: https://pastebin.com/raw/HiJMsghc search this in browser: AR drivers/iio/dac/built-in.o

and you will see the error. But is this caused by wireguard feature?

@freak07

R917C commented 1 month ago

Sorry, I clicked on the wrong one.

freak07 commented 1 month ago

your first error is there: /bin/sh: 1: /workspace/dtc-aosp: Permission denied make[3]: [scripts/Makefile.lib:325: arch/arm64/boot/dts/google/qcom-base/sm8150-v2.dtb] Error 126 make[2]: [../scripts/Makefile.build:678: arch/arm64/boot/dts/google] Error 2 make[1]: [arch/arm64/Makefile:244: dtbs] Error 2 make[1]: Waiting for unfinished jobs....

you need to make the dtc-aosp file executable, by giving it the correct permissions.

to fix the wireguard error you need to search for this in net/wireguard/compat/compat.h:

if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)

define totalram_pages() totalram_pages

endif

and delete those lines. wireguard is an out of tree repo and under gitignore.

R917C commented 1 month ago

Thank you so much, I finally built a kernel with kernelSU. P.S.: But it cannot pass safetynet or play integrity check :( I will learn it. Thanks for your help

freak07 commented 1 month ago

That's unrelated to the kernel. I guess you need to find a valid fingerprint, like on every other device and use any of the known methods to fix play integrity