fidaforever
Posts: 14
Joined: Tue Mar 21, 2017 8:33 am

RPi Kernel Compilation: Make Error

Mon Jul 31, 2017 12:23 am

While compiling the 'kernel' I am getting make command error!
My system configuration is RPi-2 with Jessie Lite.
Any suggestion will be highly appreciated.

I clone the kernel from the link below, and previously I tested it okay in RPi3.
https://github.com/raspberrypi/linux

Code: Select all

[email protected]:~/rpi_kernel/linux $ make -j4 zImage modules dtbs
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      init/do_mounts.o
  CC      init/do_mounts_initrd.o
  CC      init/initramfs.o
  CC      arch/arm/kernel/sys_oabi-compat.o
  CC      arch/arm/probes/decode.o
  CC      arch/arm/kernel/swp_emulate.o
  CC      arch/arm/probes/kprobes/core.o
  CC      arch/arm/kernel/hw_breakpoint.o
  CC      init/calibrate.o
  CC      arch/arm/probes/kprobes/actions-common.o
  CC      arch/arm/kernel/perf_regs.o
  CC      init/init_task.o
  CC      arch/arm/kernel/perf_callchain.o
  CC      arch/arm/probes/kprobes/checkers-common.o
  CC      init/version.o
  CC      arch/arm/probes/kprobes/actions-arm.o
  CC      arch/arm/kernel/perf_event_xscale.o
  CC      arch/arm/kernel/perf_event_v6.o
  CC      arch/arm/kernel/perf_event_v7.o
  CC      arch/arm/kernel/topology.o
  LD      init/mounts.o
  LD      init/built-in.o
  CC      arch/arm/kernel/vdso.o
  CC      arch/arm/probes/kprobes/checkers-arm.o
  CC      arch/arm/probes/kprobes/opt-arm.o
  CC      arch/arm/probes/decode-arm.o
  CC      arch/arm/kernel/io.o
  LD      arch/arm/probes/kprobes/built-in.o
  AS      arch/arm/kernel/hyp-stub.o
  AS      arch/arm/kernel/head.o
  LD      arch/arm/net/built-in.o
  LDS     arch/arm/kernel/vmlinux.lds
  LD      arch/arm/kernel/built-in.o
  LD      arch/arm/crypto/built-in.o
  AS [M]  arch/arm/crypto/aes-armv4.o
  LD      arch/arm/firmware/built-in.o
  CC [M]  arch/arm/crypto/aes_glue.o
  CC      arch/arm/mach-bcm2709/bcm2709.o
  CC      kernel/fork.o
  LD      arch/arm/probes/built-in.o
  SHIPPED arch/arm/crypto/aesbs-core.S
  LD      certs/built-in.o
  CC [M]  arch/arm/crypto/aesbs-glue.o
  CC      mm/filemap.o
  LD      arch/arm/mach-bcm2709/built-in.o
  AS [M]  arch/arm/crypto/sha1-armv4-large.o
  CC      mm/mempool.o
  CC [M]  arch/arm/crypto/sha1_glue.o
  CC      kernel/exec_domain.o
  AS [M]  arch/arm/crypto/sha1-armv7-neon.o
  CC [M]  arch/arm/crypto/sha1_neon_glue.o
  CC      mm/oom_kill.o
  LD [M]  arch/arm/crypto/aes-arm.o
  AS [M]  arch/arm/crypto/aesbs-core.o
  LD [M]  arch/arm/crypto/sha1-arm.o
  LD [M]  arch/arm/crypto/sha1-arm-neon.o
  LD [M]  arch/arm/crypto/aes-arm-bs.o
  CC      mm/maccess.o
  CC      kernel/panic.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      mm/page_alloc.o
  CC      kernel/softirq.o
  CC      mm/page-writeback.o
  CC      mm/readahead.o
  CC      kernel/resource.o
  CC      kernel/sysctl.o
  CC      fs/open.o
  CC      ipc/util.o
  CC      mm/swap.o
  CC      ipc/msgutil.o
  CC      ipc/msg.o
  CC      fs/read_write.o
  CC      kernel/sysctl_binary.o
  CC      mm/truncate.o
  CC      kernel/capability.o
  CC      ipc/sem.o
  CC      fs/file_table.o
  CC      kernel/ptrace.o
  CC      mm/vmscan.o
  CC      ipc/shm.o
  CC      fs/super.o
  CC      kernel/user.o
  CC      kernel/signal.o
  CC      ipc/syscall.o
  CC      fs/char_dev.o
  CC      ipc/ipc_sysctl.o
  CC      ipc/mqueue.o
  CC      fs/stat.o
  CC      mm/shmem.o
  CC      ipc/namespace.o
  CC      fs/exec.o
  CC      ipc/mq_sysctl.o
  CC      kernel/sys.o
  LD      ipc/built-in.o
  CC      kernel/kmod.o
  CC      mm/util.o
  CC      fs/pipe.o
  CC      kernel/workqueue.o
  CC      mm/mmzone.o
  CC      kernel/pid.o
  CC      mm/vmstat.o
  CC      fs/namei.o
  CC      mm/backing-dev.o
  CC      security/keys/gc.o
  CC      security/keys/key.o
  CC      kernel/task_work.o
  CC      mm/mm_init.o
  CC      kernel/extable.o
  CC      security/keys/keyring.o
  CC      kernel/params.o
  CC      mm/mmu_context.o
  CC      fs/fcntl.o
  CC      mm/percpu.o
  CC      security/keys/keyctl.o
  CC      kernel/kthread.o
  CC      fs/ioctl.o
  CC      security/keys/permission.o
In file included from include/linux/list.h:8:0,
                 from include/linux/signal.h:4,
                 from include/linux/syscalls.h:73,
                 from fs/ioctl.c:7:
include/linux/kernel.h:411:45: error: unknown type name 'cher'
 int scnprintf(char *buf, size_t size, const char *fmt, ...);
                                             ^
include/linux/kernel.h:411:1: error: format string argument is not a string type
 int scnprintf(char *buf, size_t size, const char *fmt, ...);
 ^
  CC      kernel/sys_ni.o
  CC      kernel/nsproxy.o
scripts/Makefile.build:258: recipe for target 'fs/ioctl.o' failed
make[1]: *** [fs/ioctl.o] Error 1
Makefile:961: recipe for target 'fs' failed
make: *** [fs] Error 2
make: *** Waiting for unfinished jobs....
  CC      mm/slab_common.o
  CC      security/keys/process_keys.o
  CC      security/commoncap.o
  CC      kernel/notifier.o
  CC      security/keys/request_key.o
  CC      security/keys/request_key_auth.o
  CC      kernel/ksysfs.o
  CC      security/min_addr.o
  CC      security/keys/user_defined.o
  CC      kernel/cred.o
  CC      mm/compaction.o
  CC      security/keys/proc.o
  CC      security/device_cgroup.o
  CC      security/keys/sysctl.o
  LD      security/keys/built-in.o
  CC      kernel/reboot.o
  CC      mm/vmacache.o
  LD      security/built-in.o
  CC      kernel/async.o
  CC      kernel/range.o
  CC      mm/interval_tree.o
  CC      kernel/smpboot.o
  CC      kernel/groups.o
  CC      mm/list_lru.o
  CC      kernel/bpf/core.o
  CC      mm/workingset.o
  CC      mm/debug.o
  CC      kernel/debug/debug_core.o
  CC      kernel/debug/gdbstub.o
  CC      mm/gup.o
  LD      kernel/bpf/built-in.o
  CC      kernel/debug/kdb/kdb_io.o
  CC      kernel/events/core.o
  CC      kernel/debug/kdb/kdb_main.o
  CC      mm/highmem.o
  CC      kernel/events/ring_buffer.o
  CC      mm/memory.o
  CC      kernel/debug/kdb/kdb_support.o
  CC      kernel/debug/kdb/kdb_bt.o
  GENKDB  kernel/debug/kdb/gen-kdb_cmds.c
  CC      kernel/debug/kdb/kdb_bp.o
  CC      kernel/debug/kdb/kdb_debugger.o
  CC      kernel/debug/kdb/kdb_keyboard.o
  CC      kernel/debug/kdb/gen-kdb_cmds.o
  CC      mm/mincore.o
  CC      mm/mlock.o
  LD      kernel/debug/kdb/built-in.o
  LD      kernel/debug/built-in.o
  CC      kernel/irq/irqdesc.o
  CC      mm/mmap.o
  CC      kernel/irq/handle.o
  LD      kernel/livepatch/built-in.o
  CC      mm/mprotect.o
In file included from include/linux/list_lru.h:11:0,
                 from include/linux/fs.h:12,
                 from kernel/events/core.c:12:
include/linux/nodemask.h:94:0: internal compiler error: Segmentation fault

 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
  CC      kernel/events/callchain.o
  CC      kernel/irq/manage.o
  CC      kernel/locking/mutex.o
  CC      kernel/events/hw_breakpoint.o
  CC      kernel/locking/semaphore.o
  LD      kernel/events/built-in.o
  CC      kernel/locking/rwsem.o
  CC      mm/mremap.o
  CC      kernel/irq/spurious.o
  CC      kernel/power/qos.o
  CC      kernel/locking/percpu-rwsem.o
  CC      kernel/irq/resend.o
  CC      mm/msync.o
  CC      kernel/irq/chip.o
  CC      kernel/locking/spinlock.o
  CC      mm/rmap.o
  CC      kernel/locking/osq_lock.o
  CC      kernel/power/main.o
  CC      kernel/locking/lglock.o
  CC      kernel/irq/dummychip.o
  CC      kernel/locking/rtmutex.o
  CC      kernel/irq/devres.o
  CC      kernel/power/process.o
  CC      kernel/irq/autoprobe.o
  CC      mm/vmalloc.o
  CC      kernel/locking/rwsem-xadd.o
  CC      kernel/power/poweroff.o
  LD      kernel/power/built-in.o
  CC      kernel/irq/irqdomain.o
  CC      mm/pagewalk.o
  LD      kernel/locking/built-in.o
  CC      kernel/irq/proc.o
  CC      kernel/printk/printk.o
  CC      kernel/rcu/update.o
  LD      kernel/irq/built-in.o
In file included from include/linux/perf_event.h:48:0,
                 from include/linux/trace_events.h:9,
                 from include/trace/syscall.h:6,
                 from include/linux/syscalls.h:81,
                 from kernel/printk/printk.c:35:
include/linux/cpu.h:276:1: internal compiler error: in c_parser_postfix_expression, at c/c-parser.c:6987
 DECLARE_PER_CPU(bool, cpu_dead_idle);
 ^
  CC      kernel/sched/core.o
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
  CC      mm/pgtable-generic.o
  CC      kernel/rcu/sync.o
  CC      kernel/rcu/srcu.o
  CC      mm/process_vm_access.o
  CC      kernel/rcu/tree.o
  CC      mm/init-mm.o
The bug is not reproducible, so it is likely a hardware or OS problem.
scripts/Makefile.build:258: recipe for target 'kernel/printk/printk.o' failed
make[2]: *** [kernel/printk/printk.o] Error 1
scripts/Makefile.build:403: recipe for target 'kernel/printk' failed
make[1]: *** [kernel/printk] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      kernel/sched/loadavg.o
  CC      mm/nobootmem.o
kernel/rcu/tree.c: In function 'rcu_gp_cleanup':
kernel/rcu/tree.c:4597:0: internal compiler error: Segmentation fault
 #include "tree_plugin.h"
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
  CC      kernel/sched/clock.o
  CC      kernel/sched/cputime.o
  CC      mm/fadvise.o
  CC      mm/madvise.o
  CC      kernel/sched/idle_task.o
  CC      kernel/sched/fair.o
  CC      mm/memblock.o
The bug is not reproducible, so it is likely a hardware or OS problem.
scripts/Makefile.build:258: recipe for target 'kernel/rcu/tree.o' failed
make[2]: *** [kernel/rcu/tree.o] Error 1
scripts/Makefile.build:403: recipe for target 'kernel/rcu' failed
make[1]: *** [kernel/rcu] Error 2
  CC      mm/page_io.o
  CC      mm/swap_state.o
In file included from ./arch/arm/include/asm/pgtable.h:28:0,
                 from include/linux/mm.h:55,
                 from mm/swap_state.c:9:
./arch/arm/include/asm/tlbflush.h: In function 'local_flush_tlb_all':
./arch/arm/include/asm/tlbflush.h:343:2: internal compiler error: Segmentation fault
  if (tlb_flag(TLB_BARRIER)) {
  ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
  CC      mm/swapfile.o
  CC      kernel/sched/rt.o
The bug is not reproducible, so it is likely a hardware or OS problem.
scripts/Makefile.build:258: recipe for target 'mm/swap_state.o' failed
make[1]: *** [mm/swap_state.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  CC      kernel/sched/deadline.o
  CC      kernel/sched/stop_task.o
  CC      kernel/sched/wait.o
  CC      kernel/sched/completion.o
Makefile:961: recipe for target 'mm' failed
make: *** [mm] Error 2
  CC      kernel/sched/idle.o
  CC      kernel/sched/cpupri.o
  CC      kernel/sched/cpudeadline.o
  CC      kernel/sched/auto_group.o
  CC      kernel/sched/debug.o
  CC      kernel/sched/cpuacct.o
  LD      kernel/sched/built-in.o
Makefile:961: recipe for target 'kernel' failed
make: *** [kernel] Error 2



Return to “Troubleshooting”