title: Error "function 'nop'" when building android kernel
body: <p>I am making the android kernel for the first time and after few errors(which I have overcome) I am getting below error log:</p>
  
  <pre><code>casual@Casual-PC:/media/casual/USB/android_kernel_yotaphone2-DKernel$ 
  make O=../out -j4
    GEN     /media/casual/USB/out/Makefile
    CHK     include/linux/version.h
    Using /media/casual/USB/android_kernel_yotaphone2-DKernel as source     for kernel
    CHK     include/generated/utsrelease.h
  make[2]: «include/generated/mach-types.h» не требует обновления. (dont     need update)
    CC      arch/arm/kernel/asm-offsets.s
    GEN     include/generated/asm-offsets.h
    CALL    /media/casual/USB/android_kernel_yotaphone2-    DKernel/scripts/checksyscalls.sh
    CC      arch/arm/common/vic.o
    CC      arch/arm/mm/dma-mapping.o
    CC      init/main.o
    CC      arch/arm/common/timer-sp.o
    AS      arch/arm/kernel/entry-armv.o
    AS      arch/arm/kernel/entry-common.o
    LD      arch/arm/common/built-in.o
    CHK     include/generated/compile.h
    CC      arch/arm/kernel/process.o
    CC      arch/arm/mm/init.o
    LD      arch/arm/net/built-in.o
    CC      arch/arm/kernel/ptrace.o
    CC      init/do_mounts.o
    CC      init/do_mounts_rd.o
  /media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/mm/init.c: In function 'mem_init':
  /media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/mm/init.c:921:6: warning: format '%d' expects argument of         
  type 'int', but argument 7 has type 'long int' [-Wformat]
  error, forbidden warning: init.c:921
  /media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/mm/init.o' failed
  make[2]: *** [arch/arm/mm/init.o] Error 1
  /media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/mm' failed
  make[1]: *** [arch/arm/mm] Error 2
  make[1]: *** Ожидание завершения заданий…
    CC      arch/arm/kernel/sched_clock.o
    CC      init/do_mounts_initrd.o
    CC      init/do_mounts_md.o
    CC      arch/arm/kernel/signal.o
    CC      arch/arm/kernel/armksyms.o
    CC      arch/arm/kernel/bios32.o
    LD      init/mounts.o
    LD      init/built-in.o
    CC      arch/arm/kernel/isa.o
    AS      arch/arm/kernel/sleep.o
    CC      arch/arm/kernel/machine_kexec.o
    CC      arch/arm/kernel/io.o
    CC      arch/arm/kernel/crash_dump.o
  /media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c: In function '_memcpy_fromio':
  /media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
  cc1: some warnings being treated as errors
  /media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/kernel/io.o' failed
  make[2]: *** [arch/arm/kernel/io.o] Error 1
  make[2]: *** Ожидание завершения заданий…
  /media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/kernel' failed
  make[1]: *** [arch/arm/kernel] Error 2
  Makefile:130: recipe for target 'sub-make' failed
  make: *** [sub-make] Error 2
  </code></pre>
  
  <p>(sry for bad code blocks)
  So, I have found similar questions, but I didn't understand the answer:
  <a href="https://stackoverflow.com/questions/28952868/android-kernel-build-first-time">android kernel build (first time)</a></p>
  
  <p>when i make it throw   </p>
  
  <pre><code>`LC_ALL=C make O=../out`
  </code></pre>
  
  <p>it gives me(spoiler - LC_ALL=C don't work how i thought, so i translated it(as #) by myself):</p>
  
  <pre><code>casual@Casual-PC:/media/casual/USB/android_kernel_yotaphone2-DKernel$ LC_ALL=C make O=../out
    Using /media/casual/USB/android_kernel_yotaphone2-DKernel as source for kernel
    GEN     /media/casual/USB/out/Makefile
    CHK     include/linux/version.h
    CHK     include/generated/utsrelease.h
  make[2]: «include/generated/mach-types.h» не требует обновления. #dont need updates
    CALL    /media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/checksyscalls.sh
    CHK     include/generated/compile.h
    CC      arch/arm/kernel/io.o
  /media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c: In function '_memcpy_fromio':
  /media/casual/USB/android_kernel_yotaphone2-DKernel/arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
  cc1: some warnings being treated as errors
  /media/casual/USB/android_kernel_yotaphone2-DKernel/scripts/Makefile.build:307: recipe for target 'arch/arm/kernel/io.o' failed
  make[2]: *** [arch/arm/kernel/io.o] Error 1
  /media/casual/USB/android_kernel_yotaphone2-DKernel/Makefile:957: recipe for target 'arch/arm/kernel' failed
  make[1]: *** [arch/arm/kernel] Error 2
  Makefile:130: recipe for target 'sub-make' failed
  make: *** [sub-make] Error 2
  </code></pre>