0

I followed these directions to configure the Raspberry Pi for the Adafruit I2S microphone. I skipped the step that installed git bc libncurses5-dev bison flex libssl-dev and got this error when compiling the kernel:

$ rpi-source --skip-gcc
...
 *** make modules_prepare
Makefile:588: include/config/auto.conf: No such file or directory
Makefile:619: include/config/auto.conf.cmd: No such file or directory
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
/bin/sh: 1: bison: not found
scripts/Makefile.lib:196: recipe for target 'scripts/kconfig/zconf.tab.c' failed
make[2]: *** [scripts/kconfig/zconf.tab.c] Error 127
Makefile:532: recipe for target 'syncconfig' failed
make[1]: *** [syncconfig] Error 2
Makefile:631: recipe for target 'include/config/auto.conf.cmd' failed
make: *** [include/config/auto.conf.cmd] Error 2
Traceback (most recent call last):
  File "/usr/bin/rpi-source", line 359, in <module>
    sh("cd %s && make modules_prepare %s" % (linux_symlink, (" > /dev/null" if args.quiet else "")))
  File "/usr/bin/rpi-source", line 84, in sh
    subprocess.check_call(cmd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cd /home/pi/linux && make modules_prepare ' returned non-zero exit status 2

I installed those packages and ran it again, but it exited immediately and said it's already installed:

$ rpi-source --skip-gcc

 *** rpi-update: https://github.com/Hexxeh/rpi-firmware

 *** Firmware revision: ce2a9f85a6fd88f8c42ef54b7bad99b42e76e403

 *** Linux source commit: 20565c94ca877a099a3c9c5fa39a0380f3d16491

 *** Kernel source already installed: /home/pi/linux-20565c94ca877a099a3c9c5fa39a0380f3d16491

Later on, one of the directions fails with an error related to the kernel:

$ make -C /lib/modules/$(uname -r )/build M=$(pwd) modules
make: Entering directory '/home/pi/linux-20565c94ca877a099a3c9c5fa39a0380f3d16491'
Makefile:588: include/config/auto.conf: No such file or directory

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

Makefile:639: recipe for target 'include/config/auto.conf' failed
make: *** [include/config/auto.conf] Error 1
make: Leaving directory '/home/pi/linux-20565c94ca877a099a3c9c5fa39a0380f3d16491'

I don't know where is the kernel src or whether running make oldconfig && make prepare would fix it.

How can I re-run the command rpi-source --skip-gcc to compile the kernel now that I have the bison and other packages?

  • Did you create a kernel configuration? It seems that kernel configuration was not created successfully. – RalfFriedl Jul 31 at 16:51
  • "I don't know where is the kernel src..." -> Kernel source already installed: /home/pi/linux-20565c94ca877a099a3c9... <- Is a directory path. – goldilocks Jul 31 at 17:19
  • @RalfFriedl No, I didn't create a kernel configuration, I only ran the bash commands on that website except one. – miguelmorin Aug 1 at 21:41
  • @goldilocks That fixed it! I cd'd into that directory, ran those commands, and the kernel recompiled. The rest of the commands in those instructions still fail, but that's another matter. Do you want to write an answer? – miguelmorin Aug 1 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.