title: how to solve Kernel configuration is invalid issues
body: <p>I'm trying to build module.</p>
  
  <p>But here's some issues.</p>
  
  <blockquote>
    <p>ERROR: Kernel configuration is invalid.
             include/generated/autoconf.h or include/config/auto.conf are missing.
             Run 'make oldconfig &amp;&amp; make prepare' on kernel src to fix it.</p>
    
    <p>WARNING: Symbol version dump ./Module.symvers
               is missing; modules will have no dependencies and modversions.`</p>
  </blockquote>
  
  <p>And here's my makefile</p>
  
  <pre><code>ifeq ($(KERNELRELEASE),)
  
  
  KERNELDIR ?= /lib/modules/$(shell uname -r)/build
  PWD := $(shell pwd)
  
  modules:
      $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
  
  modules_install:
      $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
  
  clean:
      rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
  
  .PHONY: modules modules_install clean
  
  else
      # called from kernel build system: just declare what our modules are
      obj-m := hello.o hellop.o seq.o jit.o jiq.o sleepy.o complete.o \
               silly.o faulty.o kdatasize.o kdataalign.o
  endif
  </code></pre>
  
  <p>I tried building like this:</p>
  
  <pre><code>export KERNELDIR=/path/to/extern/linux/source
  make
  </code></pre>
  
  <p>How can I solve this problem?</p>