LineageOS内核编译错误

时间:2017-12-16 12:14:35

标签: android build compilation kernel

我正在尝试为我的设备Galaxy S4(jfltexx)编译LineageOS内核源代码。

内核: https://github.com/LineageOS/android_device_samsung_jflte

工具链: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/

系统 Xubuntu 17.10 (64 bit) gcc 7.2.0GNU Make 4.1

为了为我的目标编译内核,我正在使用内核存储库中的构建脚本:

python build-all.py jf_eur

编译通常在一个点停止,日志包含以下内容:

GEN     /home/computer/Desktop/output/all-kernels/jf_eur/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/usb/otg/Kconfig:187:warning: leading whitespace ignored
drivers/media/video/msm-jf/Kconfig:114:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:108:warning: choice value used outside its choice group
drivers/media/video/msm-jf/Kconfig:119:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:113:warning: choice value used outside its choice group
  Using /home/computer/Desktop/Android/test as source for kernel
  GEN     /home/computer/Desktop/output/all-kernels/jf_eur/Makefile
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[2]: 'include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/arm/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    /home/computer/Desktop/Android/test/scripts/checksyscalls.sh
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.lex.c
  SHIPPED scripts/genksyms/keywords.hash.c
  SHIPPED scripts/genksyms/parse.tab.h
  HOSTCC  scripts/genksyms/lex.lex.o
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTLD  scripts/genksyms/genksyms
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/bin2c
  CC      init/main.o
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  LD      init/mounts.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  CC      arch/arm/vfp/vfpmodule.o
  AS      arch/arm/vfp/entry.o
  AS      arch/arm/vfp/vfphw.o
  CC      arch/arm/vfp/vfpsingle.o
  CC      arch/arm/vfp/vfpdouble.o
  LD      arch/arm/vfp/vfp.o
  LD      arch/arm/vfp/built-in.o
  CC      arch/arm/kernel/elf.o
  AS      arch/arm/kernel/entry-armv.o
  AS      arch/arm/kernel/entry-common.o
  CC      arch/arm/kernel/irq.o
  CC      arch/arm/kernel/opcodes.o
  CC      arch/arm/kernel/process.o
  CC      arch/arm/kernel/ptrace.o
  CC      arch/arm/kernel/return_address.o
  CC      arch/arm/kernel/sched_clock.o
  CC      arch/arm/kernel/setup.o
  CC      arch/arm/kernel/signal.o
  CC      arch/arm/kernel/stacktrace.o
  CC      arch/arm/kernel/sys_arm.o
  CC      arch/arm/kernel/time.o
  CC      arch/arm/kernel/traps.o
  CC      arch/arm/kernel/cpuidle.o
  CC      arch/arm/kernel/armksyms.o
  CC      arch/arm/kernel/module.o
  AS      arch/arm/kernel/sleep.o
  CC      arch/arm/kernel/suspend.o
  CC      arch/arm/kernel/smp.o
  CC      arch/arm/kernel/smp_tlb.o
  CC      arch/arm/kernel/smp_scu.o
  CC      arch/arm/kernel/unwind.o
  CC      arch/arm/kernel/swp_emulate.o
  CC      arch/arm/kernel/hw_breakpoint.o
  CC      arch/arm/kernel/update_vsyscall_arm.o
  CC      arch/arm/kernel/pmu.o
  CC      arch/arm/kernel/perf_event.o
  CC      arch/arm/kernel/topology.o
  CC      arch/arm/kernel/user_accessible_timer.o
  CC      arch/arm/kernel/io.o
  LD      arch/arm/kernel/built-in.o
  AS      arch/arm/kernel/head.o
  CC      arch/arm/kernel/init_task.o
  LDS     arch/arm/kernel/vmlinux.lds
  CC      arch/arm/mm/dma-mapping.o
  CC      arch/arm/mm/extable.o
  CC      arch/arm/mm/fault.o
  CC      arch/arm/mm/init.o
  CC      arch/arm/mm/iomap.o
  CC      arch/arm/mm/fault-armv.o
  CC      arch/arm/mm/flush.o
  CC      arch/arm/mm/idmap.o
  CC      arch/arm/mm/ioremap.o
  CC      arch/arm/mm/mmap.o
  CC      arch/arm/mm/pgd.o
  CC      arch/arm/mm/mmu.o
  CC      arch/arm/mm/vmregion.o
  CC      arch/arm/mm/proc-syms.o
  CC      arch/arm/mm/alignment.o
  CC      arch/arm/mm/highmem.o
  AS      arch/arm/mm/abort-ev7.o
  AS      arch/arm/mm/pabort-v7.o
  AS      arch/arm/mm/cache-v7.o
  CC      arch/arm/mm/copypage-v6.o
  CC      arch/arm/mm/context.o
  AS      arch/arm/mm/tlb-v7.o
  AS      arch/arm/mm/proc-v7.o
  LD      arch/arm/mm/built-in.o
  CC      arch/arm/common/gic.o
  CC      arch/arm/common/cpaccess.o
  LD      arch/arm/common/built-in.o
  LD      arch/arm/net/built-in.o
  LD      arch/arm/crypto/built-in.o
  CC      arch/arm/mach-msm/io.o
  CC      arch/arm/mach-msm/dma.o
  CC      arch/arm/mach-msm/memory.o
  CC      arch/arm/mach-msm/timer.o
  CC      arch/arm/mach-msm/clock.o
  CC      arch/arm/mach-msm/clock-voter.o
  CC      arch/arm/mach-msm/clock-dummy.o
  CC      arch/arm/mach-msm/modem_notifier.o
  CC      arch/arm/mach-msm/subsystem_map.o
  CC      arch/arm/mach-msm/acpuclock.o
  CC      arch/arm/mach-msm/perf_trace_counters.o
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c: In function 'tracectr_cpu_hotplug_notifier':
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c:32:18: error: 'CPU_TASKS_FROZEN' undeclared (first use in this function)
  if ((action & (~CPU_TASKS_FROZEN)) == CPU_STARTING)
                  ^
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c:32:18: note: each undeclared identifier is reported only once for each function it appears in
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c:32:40: error: 'CPU_STARTING' undeclared (first use in this function)
  if ((action & (~CPU_TASKS_FROZEN)) == CPU_STARTING)
                                        ^
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c: In function 'init_tracecounters':
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c:173:2: error: implicit declaration of function 'register_cpu_notifier' [-Werror=implicit-function-declaration]
  register_cpu_notifier(&tracectr_cpu_hotplug_notifier_block);
  ^
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c: In function 'exit_tracecounters':
/home/computer/Desktop/Android/test/arch/arm/mach-msm/perf_trace_counters.c:181:2: error: implicit declaration of function 'unregister_cpu_notifier' [-Werror=implicit-function-declaration]
  unregister_cpu_notifier(&tracectr_cpu_hotplug_notifier_block);
  ^
cc1: some warnings being treated as errors
/home/computer/Desktop/Android/test/scripts/Makefile.build:307: recipe for target 'arch/arm/mach-msm/perf_trace_counters.o' failed
make[2]: *** [arch/arm/mach-msm/perf_trace_counters.o] Error 1
/home/computer/Desktop/Android/test/Makefile:973: recipe for target 'arch/arm/mach-msm' failed
make[1]: *** [arch/arm/mach-msm] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

我一直在网上搜索,但只找到一个用户提到“跟踪”导致他们出错的话题:

https://forum.xda-developers.com/showpost.php?p=53850620&postcount=32456

  

我解决了我的问题,还原了一个禁用跟踪的旧补丁,一切都在我的git中

由于我正在使用最新的内核源代码,并且该设备仍然受到完整LineageOS构建的支持,我认为内核应该编译得很好。我还观看了一些Youtube视频,人们按照我想要的方式编译内核。

我使用的是错误的工具链还是其他程序?

我很高兴有任何帮助,谢谢!

0 个答案:

没有答案