Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error while running make install - include/generated/autoconf.h or include/config/auto.conf are missing

when i try to run make install on my custom built kernel, I get following error-

root@localhost [ /home/avi/dd/labs/lab1_compile_and_load ]$ make install V=1

make -C /lib/modules/3.12.17/build SUBDIRS=/home/avi/dd/labs/lab1_compile_and_load modules_install

make[1]: Entering directory `/home/avi/kernel/linux-3.12.17'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
/bin/false)
mkdir -p /lib/modules/3.12.17/extra
make -f /home/avi/kernel/linux-3.12.17/scripts/Makefile.modinst
  /bin/sh /home/avi/kernel/linux-3.12.17/scripts/depmod.sh /sbin/depmod 3.12.17 ""
make[1]: Leaving directory `/home/avi/kernel/linux-3.12.17'

Content of my Makefile is as below:

obj-m := lab1_char_driver.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

all:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)  modules
install:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)  modules_install

clean:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)  clean

I tried 'make oldconfig && make preapare' as suggested in the error message but to no avail. I have tried this on fedora20 and ubuntu12.04 both. If a do Make then it works just fine but make install fails. Please help. Any relevant answer would be greatly appreciated.

like image 890
avee137 Avatar asked Apr 20 '14 15:04

avee137


1 Answers

You are including the V=1 which causes Make to show the commands as they're being run (see this question). From the looks of it, you're not actually seeing the error itself, but you're seeing the test that it's running to check if those files exist:

test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ ... echo error messages here ... \ )

That test is being run, and if it fails, it would echo those messages to standard error, which it's not. If your module isn't building it's probably due to some other issue.

like image 102
Chris Mendez Avatar answered Sep 30 '22 15:09

Chris Mendez