OpenWrt Forum Archive

Topic: Trunk building error: loadable module support disabled

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

I'm facing some problems trying to build OpenWrt trunk.
First of all, even if I'm quite sure that I've followed the right procedure, to be 100% sure, I will write down here what I've done to set up the buildroot:

$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk git git-core ccache gcc-multilib flex gettext libssl-dev xsltproc quilt libxml-parser-perl python3.4-dev qemu-utils
$ svn co svn://svn.openwrt.org/openwrt/trunk
$ cd trunk 
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make menuconfig
$ make defconfig
$ make kernel_menuconfig
$ make kernel_oldconfig
$ make prereq 

then running

$ make -j 7

I get:

mirko@PC-Mirko:~$ cd /home/mirko/Desktop/trunk/
mirko@PC-Mirko:~/Desktop/trunk$ make -j 7
Checking 'rsync'... ok.
 make[1] world
 make[2] tools/install
 make[2] package/cleanup
 make[3] -C tools/patch-image compile
 make[3] -C tools/make-ext4fs compile
 make[3] -C tools/patch compile
 make[3] -C tools/sstrip compile
 make[3] -C tools/flock compile
 make[3] -C tools/firmware-utils compile
 make[3] -C tools/patch install
 make[3] -C tools/sed compile
 make[3] -C tools/m4 compile
 make[3] -C tools/xz compile
 make[3] -C tools/yaffs2 compile
 make[3] -C tools/cmake compile
 make[3] -C tools/scons compile
 make[3] -C tools/lzma compile
 make[3] -C tools/sed install
 make[3] -C tools/m4 install
 make[3] -C tools/xz install
 make[3] -C tools/pkg-config compile
 make[3] -C tools/sstrip install
 make[3] -C tools/mkimage compile
 make[3] -C tools/patch-image install
 make[3] -C tools/yaffs2 install
 make[3] -C tools/flock install
 make[3] -C tools/squashfs4 compile
 make[3] -C tools/autoconf compile
 make[3] -C tools/pkg-config install
 make[3] -C tools/make-ext4fs install
 make[3] -C tools/autoconf install
 make[3] -C tools/automake compile
 make[3] -C tools/missing-macros compile
 make[3] -C tools/automake install
 make[3] -C tools/missing-macros install
 make[3] -C tools/libtool compile
 make[3] -C tools/libtool install
 make[3] -C tools/gmp compile
 make[3] -C tools/libelf compile
 make[3] -C tools/flex compile
 make[3] -C tools/mklibs compile
 make[3] -C tools/e2fsprogs compile
 make[3] -C tools/firmware-utils install
 make[3] -C tools/mm-macros compile
 make[3] -C tools/scons install
 make[3] -C tools/gengetopt compile
 make[3] -C tools/patchelf compile
 make[3] -C tools/lzma install
 make[3] -C tools/squashfs4 install
 make[3] -C tools/libelf install
 make[3] -C tools/flex install
 make[3] -C tools/mklibs install
 make[3] -C tools/mkimage install
 make[3] -C tools/mm-macros install
 make[3] -C tools/bison compile
 make[3] -C tools/bison install
 make[3] -C tools/findutils compile
 make[3] -C tools/bc compile
 make[3] -C tools/patchelf install
 make[3] -C tools/findutils install
 make[3] -C tools/quilt compile
 make[3] -C tools/padjffs2 compile
 make[3] -C tools/quilt install
 make[3] -C tools/padjffs2 install
 make[3] -C tools/bc install
 make[3] -C tools/e2fsprogs install
 make[3] -C tools/mtd-utils compile
 make[3] -C tools/qemu compile
 make[3] -C tools/gengetopt install
 make[3] -C tools/gmp install
 make[3] -C tools/mpfr compile
 make[3] -C tools/mtd-utils install
 make[3] -C tools/qemu install
 make[3] -C tools/mpfr install
 make[3] -C tools/mpc compile
 make[3] -C tools/mpc install
 make[3] -C tools/cmake install
 make[2] toolchain/install
 make[3] -C toolchain/gdb prepare
 make[3] -C toolchain/gcc/minimal prepare
 make[3] -C toolchain/binutils prepare
 make[3] -C toolchain/kernel-headers prepare
 make[3] -C toolchain/uClibc/headers prepare
 make[3] -C toolchain/kernel-headers compile
 make[3] -C toolchain/uClibc prepare
 make[3] -C toolchain/uClibc/utils prepare
 make[3] -C toolchain/binutils compile
 make[3] -C toolchain/gdb compile
 make[3] -C toolchain/binutils install
 make[3] -C toolchain/gcc/minimal compile
 make[3] -C toolchain/gcc/initial prepare
 make[3] -C toolchain/gcc/final prepare
 make[3] -C toolchain/gdb install
 make[3] -C toolchain/gcc/minimal install
 make[3] -C toolchain/kernel-headers install
 make[3] -C toolchain/uClibc/headers compile
 make[3] -C toolchain/uClibc/headers install
 make[3] -C toolchain/gcc/initial compile
 make[3] -C toolchain/gcc/initial install
 make[3] -C toolchain/uClibc compile
 make[3] -C toolchain/uClibc install
 make[3] -C toolchain/gcc/final compile
 make[3] -C toolchain/gcc/final install
 make[3] -C toolchain/uClibc/utils compile
 make[3] -C toolchain/uClibc/utils install
 make[2] target/compile
 make[3] -C target/linux compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/mirko/Desktop/trunk/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 1
mirko@PC-Mirko:~/Desktop/trunk$ 

I've uploaded here the log folder (and also diffconfig, buildroot .config, kernel buildroot .config), in which under

/logs/target/linux

into compile.txt I can see that the log reports a problem with LKMs:

...
virtio-scsi support (SCSI_VIRTIO) [N/m/?] (NEW) aborted!

Console input/output is redirected. Run 'make oldconfig' to update configuration.

scripts/kconfig/Makefile:36: recipe for target 'silentoldconfig' failed
make[7]: *** [silentoldconfig] Error 1
Makefile:543: recipe for target 'silentoldconfig' failed
make[6]: *** [silentoldconfig] Error 2

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

Makefile:1161: recipe for target 'modules' failed
make[5]: *** [modules] Error 1
Makefile:22: recipe for target '/home/mirko/Desktop/trunk/build_dir/target-x86_64_uClibc-0.9.33.2/linux-x86_64/linux-4.0.4/.modules' failed
make[4]: *** [/home/mirko/Desktop/trunk/build_dir/target-x86_64_uClibc-0.9.33.2/linux-x86_64/linux-4.0.4/.modules] Error 2
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2

Now I've tried to understand where I've done something wrong but I didn't solve anything, running:

make kernel_menuconfig

I see loadable module support enabled!!!
So as you can see I'm stuck... if someone would be so kind to give me an hand, any help will be really appreciated.
Thanks to everyone in advance.

(Last edited by mirko_47 on 13 Jun 2015, 17:01)

bump... anyone??? pleeeeaaseeee

Clean your buildroot (make distclean : this removes even config)

Simply run make menuconfig
and after that "make -j 7"

You dont need the kernel stuff because you do not change the settings AND you dont need defconfig after you have selected the x86-64 target since you just created a config with menuconfig.

the prereq target will be built with the normal make too - thus its not needed

Thank you very much for your answer.

Already tried the method that you've proposed but it doesn't work...
(The buildroot that I've used was fresh installed).
In any case I need to run:

make kernel_menuconfig

Because I need CPU frequency scaling drivers, that by default aren't enabled with the 4.0.4 kernel that I've used, or using the 3.18.14 kernel (build process fails again, maybe when I return at home I will upload the log)I also need SMP, which is not enabled by default.

Thank you very much again.

EDIT:  maybe I've found something: https://forum.openwrt.org/viewtopic.php … 20#p155420

(Last edited by mirko_47 on 11 Jun 2015, 14:06)

no way, even adding manually

CONFIG_KERNEL_MODULES=y 

I get the same error...

...honestly I've still no idea of what I'm doing wrong; I mean looking to the "how to build" guide I'm doing it wright, but I always get same error, could be the trunk that is broken for that specific choice of kernel/target?

Did you by any chance ran "make kernel_menuconfig" without first doing a normal build? If yes then it might be due to the fact that the Linux kernel source tree was not even prepared yet, try "make target/linux/prepare" (or a normal "make" run) before jumping into kernel_menuconfig.

Thank you very much for your answer,

As you've suggested today I've tried again to build OpenWrt (both with 4.0.4 & 3.18 kernel) launching

$ make target/linux/prepare

before

$ make kernel_menuconfig

But I obtain exactly the same error reported in the previously uploaded log:
(/logs/target/linux/compile.txt log:)

net/sched/Kconfig:44: warning: menuconfig statement without prompt
.config:4440:warning: override: SPARSEMEM_MANUAL changes choice state
.config:4712:warning: override: TREE_RCU changes choice state
*
* Restart config...
*
*
* SCSI low-level drivers
*
SCSI low-level drivers (SCSI_LOWLEVEL) [Y/n] y
  iSCSI Initiator over TCP/IP (ISCSI_TCP) [N/m/?] n
  iSCSI Boot Sysfs Interface (ISCSI_BOOT_SYSFS) [N/m/?] n
  Chelsio T3 iSCSI support (SCSI_CXGB3_ISCSI) [N/m/?] n
  Chelsio T4 iSCSI support (SCSI_CXGB4_ISCSI) [N/m/?] n
  QLogic NetXtreme II iSCSI support (SCSI_BNX2_ISCSI) [N/m/?] n
  ServerEngines' 10Gbps iSCSI - BladeEngine 2 (BE2ISCSI) [N/m/?] n
  3ware 5/6/7/8xxx ATA-RAID support (BLK_DEV_3W_XXXX_RAID) [N/m/?] n
  HP Smart Array SCSI driver (SCSI_HPSA) [N/m/?] n
  3ware 9xxx SATA-RAID support (SCSI_3W_9XXX) [N/m/?] n
  3ware 97xx SAS/SATA-RAID support (SCSI_3W_SAS) [N/m/?] n
  ACARD SCSI support (SCSI_ACARD) [N/m/?] n
  Adaptec AACRAID support (SCSI_AACRAID) [N/m/?] n
  Adaptec AIC7xxx Fast -> U160 support (New Driver) (SCSI_AIC7XXX) [N/m/?] n
  Adaptec AIC79xx U320 support (SCSI_AIC79XX) [N/m/?] n
  Adaptec AIC94xx SAS/SATA support (SCSI_AIC94XX) [N/m/?] n
  Marvell 88SE64XX/88SE94XX SAS/SATA support (SCSI_MVSAS) [N/m/?] n
  Marvell UMI driver (SCSI_MVUMI) [N/m/?] n
  Adaptec I2O RAID support  (SCSI_DPT_I2O) [N/m/?] n
  AdvanSys SCSI support (SCSI_ADVANSYS) [N/m/?] n
  ARECA (ARC11xx/12xx/13xx/16xx) SATA/SAS RAID Host Adapter (SCSI_ARCMSR) [N/m/?] n
  ATTO Technology's ExpressSAS RAID adapter driver (SCSI_ESAS2R) [N/m/?] n
  LSI Logic New Generation RAID Device Drivers (MEGARAID_NEWGEN) [N/y/?] n
  LSI Logic Legacy MegaRAID Driver (MEGARAID_LEGACY) [N/m/?] n
  LSI Logic MegaRAID SAS RAID Module (MEGARAID_SAS) [N/m/?] n
  LSI MPT Fusion SAS 2.0 Device Driver (SCSI_MPT2SAS) [N/m/?] n
  LSI MPT Fusion SAS 3.0 Device Driver (SCSI_MPT3SAS) [N/m/?] n
  Universal Flash Storage Controller Driver Core (SCSI_UFSHCD) [N/m/?] n
  HighPoint RocketRAID 3xxx/4xxx Controller support (SCSI_HPTIOP) [N/m/?] n
  BusLogic SCSI support (SCSI_BUSLOGIC) [N/m/?] n
  VMware PVSCSI driver support (VMWARE_PVSCSI) [N/m/?] n
  DMX3191D SCSI support (SCSI_DMX3191D) [N/m/?] n
  EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support (SCSI_EATA) [N/m/?] n
  Future Domain 16xx SCSI/AHA-2920A support (SCSI_FUTURE_DOMAIN) [N/m/?] n
  Intel/ICP (former GDT SCSI Disk Array) RAID Controller support (SCSI_GDTH) [N/m/?] n
  Intel(R) C600 Series Chipset SAS Controller (SCSI_ISCI) [N/m/?] n
  IBM ServeRAID support (SCSI_IPS) [N/m/?] n
  Initio 9100U(W) support (SCSI_INITIO) [N/m/?] n
  Initio INI-A100U2W support (SCSI_INIA100) [N/m/?] n
  Promise SuperTrak EX Series support (SCSI_STEX) [N/m/?] n
  SYM53C8XX Version 2 SCSI support (SCSI_SYM53C8XX_2) [N/m/?] n
  IBM Power Linux RAID adapter support (SCSI_IPR) [N/m/?] n
  Qlogic QLA 1240/1x80/1x160 SCSI support (SCSI_QLOGIC_1280) [N/m/?] n
  QLogic ISP4XXX and ISP82XX host adapter family support (SCSI_QLA_ISCSI) [N/m/?] n
  Tekram DC395(U/UW/F) and DC315(U) SCSI support (SCSI_DC395x) [N/m/?] n
  Tekram DC390(T) and Am53/79C974 SCSI support (new driver) (SCSI_AM53C974) [N/m/?] n
  Western Digital WD7193/7197/7296 support (SCSI_WD719X) [N/m/?] n
  SCSI debugging host and device simulator (SCSI_DEBUG) [N/m/?] n
  PMC SIERRA Linux MaxRAID adapter support (SCSI_PMCRAID) [N/m/?] n
  PMC-Sierra SPC 8001 SAS/SATA Based Host Adapter driver (SCSI_PM8001) [N/m/?] n
  virtio-scsi support (SCSI_VIRTIO) [N/m/?] (NEW) aborted!

Console input/output is redirected. Run 'make oldconfig' to update configuration.

scripts/kconfig/Makefile:36: recipe for target 'silentoldconfig' failed
make[7]: *** [silentoldconfig] Error 1
Makefile:543: recipe for target 'silentoldconfig' failed
make[6]: *** [silentoldconfig] Error 2

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

Makefile:1161: recipe for target 'modules' failed
make[5]: *** [modules] Error 1
Makefile:22: recipe for target '/home/mirko/Desktop/openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/linux-x86_64/linux-4.0.4/.modules' failed
make[4]: *** [/home/mirko/Desktop/openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/linux-x86_64/linux-4.0.4/.modules] Error 2
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2

Saving the kernel config performing

$ make kernel_oldconfig

or using the "save" function of

$ make kernel_menuconfig

menu makes no difference...

This afternoon I'll retry using Fedora 22, or Debian 8, but if I've to be honest I doubt it will change anything...

You have to add a line about that "new/unknown" SCSI_VIRTIO to your kernel config file.
Most likely:
# CONFIG_SCSI_VIRTIO is not set

(Last edited by hnyman on 13 Jun 2015, 11:48)

unfortunately this is one of the first thing that I tried to do, but it didn't solved anything.
The real problem is that the kernel that I'm trying to build seems to have the "loadable module support" disabled, and even adding manually "CONFIG_KERNEL_MODULES=y" into kernel's .config helps...

just finished the last try, trying building it with Fedora, but as expected the situation remains the same.
Also trying to build it with different target and leaving untouched the kernel (4.0.4) .config I get the same error...

Now I'm at my wit's end...  could it be that I'm missing some dependencies?

Just finished to build a linux kernel-only without errors, so it isn't a problem of missing dependencies.

As zloop reported here it seems OpenWrt loads the default kernel's .config file from /target/linux/(target_arch)/config-(kernel_version).

In my case I can found "config-3.18" which I thought that it can cause problems using with the 4.0.4 kernel, but using also a newer .config that I already successfully used for 4.0.0 kern version the situation doesn't change.

So at this time I'm quite sure that the only way to fix this error is add for each "CONFIG_xxx" line present into kernel.config file a line "# CONFIG_xxx is not set" as suggested by hnyman, but since the number of the lines to add is not very small does anyone knows a method to do that fast?


Thank you very much in advance.

copy config-3.18 to config-4.0

After you run "make prepare" you should run
"make kernel_oldconfig"
This adds *most* of the symbols

If some symbols are not added to the arch specific section then add them to the generic one

I ran into this problem doing some test builds:
source: https://lists.openwrt.org/pipermail/ope … 33289.html

Be sure to check with "git diff" if there are any other *major* differences introduced by that

What arch/target are you wanting to test with 4.0.x ?
x86-64,x86,omap and malta should boot if you update the symbols in the way I described

Maybe, I've just find a way to fix the issue (and the solution seem to be easier than I expected):

-Run make kernel_menuconfig into the OpenWrt buildroot folder
-save the kern.config
-download from kernel.org the linux4.0.4 tarball, extract and then run make menuconfig into the extracted folder
-load the ker.config and save it, for example as kern_fixed.conmfig.
-load again into the OpenWrt buildroot the kern_fixed.conmfig.
This seems to fix all the missing symbols.

Thanks you very much to everyone again.
Regards.

The discussion might have continued from here.