On Tue, Sep 15, 2020 at 2:57 AM Frank Wunderlich <fran...@public-files.de> wrote: > > Hi, > > i try to use modules_install target after building kernel with KBUILD_OUTPUT > set > > KBUILD_OUTPUT: /media/data_nvme/git/kernel/build #kernel source is in > /media/data_nvme/git/kernel/BPI-R2-4.14 > > kernel is build successfully, but i fail on running the make modules_install > target > > 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:648: include/config/auto.conf: No such file or directory > make: *** [Makefile:719: include/config/auto.conf] Error 1 > > it looks it is ignoring the KBUILD_OUTPUT variable, as both files are present
KBUILD_OUTPUT is an environment variable. Did you set (export) it before doing 'make modules_install'? > $ ls /media/data_nvme/git/kernel/build/include/config/auto.conf > /media/data_nvme/git/kernel/build/include/config/auto.conf > $ ls /media/data_nvme/git/kernel/build/include/generated/autoconf.h > /media/data_nvme/git/kernel/build/include/generated/autoconf.h > > i also tried adding KERNEL_DIR var, but also without success > > sudo make ARCH=$ARCH KERNEL_DIR=$KBUILD_OUTPUT > INSTALL_MOD_PATH=/media/$USER/BPI-ROOT/ modules_install This is no variable like KERNEL_DIR. "git grep KERNEL_DIR" obviously has no hit in the kernel directory. > $KBUILD_OUTPUT is definitely set to right directory (checked on beginning of > my function) > > this message seems to be triggered by Makefile in root (here i tried to add > the KBUILD_OUTPUT in the test before include without success) > > 718 include/config/auto.conf: > 719 $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \ > 720 echo >&2; \ > 721 echo >&2 " ERROR: Kernel configuration is invalid."; \ > 722 echo >&2 " include/generated/autoconf.h or $@ are missing.";\ > > any idea? > > regards Frank > -- Best Regards Masahiro Yamada