Build not working without make dirclean

Hi all,

I noticed some strange behavior when (re)building images.

I started creating my desired image by turning components on and off. As soon as I had the desired image, I created a diffconfig to store the configuration and stored the feeds.conf.

I removed the whole buildsystem and I wanted to recreate it with the diffconfig and feeds.conf I stored earlier.

This are the commands for rebuilding with the created diffconfig:

cd buildsystemdir
ln -sfr ../feeds.conf ./feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install intel_mips
cp ../diffconfig .config; make defconfig
make -j

I always get the following error:

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

make[7]: *** [scripts/kconfig/Makefile:39: silentoldconfig] Error 1
make[6]: *** [Makefile:562: 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.

What seems to fix the problem is running the following:

ln -sfr ../feeds.conf ./feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install intel_mips
cp ../diffconfig .config; make defconfig
make dirclean
cp ../diffconfig .config; make defconfig
make -j

The problem cannot be in the .config, as in the two cases exact the same .config is used.

Does anyone has a clue what's going on here? Why can the make dirclean fix this error?

Buildsystem used: v19.07.5
Linux distro: docker container running debian buster

Thanks in advance!

Matthias

PS: long version of the error:

make -f ./Makefile silentoldconfig
make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.build obj=scripts/kconfig silentoldconfig
mkdir -p include/config include/generated
test -e include/generated/autoksyms.h || \
    touch   include/generated/autoksyms.h
scripts/kconfig/conf  --silentoldconfig Kconfig
*
* Restart config...
*
*
* USB support
*
USB support (USB_SUPPORT) [Y/n/?] y
  Support for Host-side USB (USB) [M/n/y/?] m
    USB announce new devices (USB_ANNOUNCE_NEW_DEVICES) [N/y/?] n
    *
    * Miscellaneous USB options
    *
    Enable USB persist by default (USB_DEFAULT_PERSIST) [Y/n/?] y
    Dynamic USB minor allocation (USB_DYNAMIC_MINORS) [N/y/?] n
    Rely on OTG and EH Targeted Peripherals List (USB_OTG_WHITELIST) [N/y/?] n
    Disable external hubs (USB_OTG_BLACKLIST_HUB) [N/y/?] n
    USB port LED trigger (USB_LEDS_TRIGGER_USBPORT) [N/m/?] n
    USB Monitor (USB_MON) [N/m/?] n
    Support WUSB Cable Based Association (CBA) (USB_WUSB_CBAF) [N/m/?] n
    *
    * USB Host Controller Drivers
    *
    Cypress C67x00 HCD support (USB_C67X00_HCD) [N/m/?] n
    xHCI HCD (USB 3.0) support (USB_XHCI_HCD) [N/m/?] n
    EHCI HCD (USB 2.0) support (USB_EHCI_HCD) [N/m/?] n
    OXU210HP HCD support (USB_OXU210HP_HCD) [N/m/?] n
    ISP116X HCD support (USB_ISP116X_HCD) [N/m/?] n
    ISP1362 HCD support (USB_ISP1362_HCD) [N/m/?] n
    FOTG210 HCD support (USB_FOTG210_HCD) [N/m/?] n
    MAX3421 HCD (USB-over-SPI) support (USB_MAX3421_HCD) [N/m/?] n
    OHCI HCD (USB 1.1) support (USB_OHCI_HCD) [N/m/?] n
    UHCI HCD (most Intel and VIA) support (USB_UHCI_HCD) [N/m/?] n
    SL811HS HCD support (USB_SL811_HCD) [N/m/?] n
    R8A66597 HCD support (USB_R8A66597_HCD) [N/m/?] n
    HCD test mode support (USB_HCD_TEST_MODE) [N/y/?] n
    *
    * USB Device Class drivers
    *
    USB Modem (CDC ACM) support (USB_ACM) [N/m/?] n
    USB Printer support (USB_PRINTER) [N/m/?] n
    USB Wireless Device Management support (USB_WDM) [N/m/?] n
    USB Test and Measurement Class support (USB_TMC) [N/m/?] n
    *
    * NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
    *
    *
    * also be needed; see USB_STORAGE Help for more info
    *
    *
    * USB Imaging devices
    *
    USB Mustek MDC800 Digital Camera support (USB_MDC800) [N/m/?] n
    USB/IP support (USBIP_CORE) [N/m/?] n
  Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...) (USB_MUSB_HDRC) [N/m/?] n
  DesignWare USB3 DRD Core Support (USB_DWC3) [M/n/?] m
    DWC3 Mode Selection
    > 1. Host only mode (USB_DWC3_HOST)
    choice[1]: 1
    *
    * Platform Glue Driver Support
    *
    PCIe-based Platforms (USB_DWC3_PCI) [N/m/?] n
    Generic OF Simple Glue Layer (USB_DWC3_OF_SIMPLE) [N/m/?] n
    Lantiq GRX500 Platforms (USB_DWC3_GRX500) [M/n/?] (NEW) aborted!

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

make[7]: *** [scripts/kconfig/Makefile:39: silentoldconfig] Error 1
make[6]: *** [Makefile:562: 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.

Your feeds are likely not in sync with the main OpenWrt. Might be that some package definition has changed in

Usually the default feeds definition in feeds.conf.default is just fine, so the feeds.conf might be causing problems. Possibly you are pinning the feeds to a certain ancient commit (like the 19.07.5 tag), instead of compiling from the HEAD of the 19.07 openwrt branch and the corresponding up-to-date 19.07 feeds.

(You mention 19.07.5, which makes me suspicious, as you are not even using the newer 19.07.6 or the the current HEAD of 19.07)

Which OpenWrt version you think you are building? Ancient 19.07.5 tag? current 19.07 branch? current master?

  • Are your feeds in sync with that?
    .

This also looks suspicious, as "-a" =all should already install all feeds.

Hi,

Thank you for this quick response.

I'm indeed using an old version of the openwrt packages feed. This feed has also some kernel packages, so I guess this is out of sync with the kernel defined in the .config?

How does the make dirclean fixes this issue? The only thing I can see is that updating the feeds is writing to the /tmp folder and that this changes are deleted after make dirclean.

The ./scripts/feed install -a does not create the symbolic link to feeds/feed_intel/intel_mips for some undefined reason.

Matthias

PS: How can I contribute code to the project? I did make some very small changes, which may be useful in general. Can I somewhere suggest these changes?

The dirclean aspect is strange. Sounds almost like something goes mixed in meanwhile, and requires cleanup of the toolchain.

I suspect that somehow you have mixed main OpenWrt source, packages feeds, and your extra private feed.

You avoided answering the questions about the versions you are trying to use, so it is really hard to give you any precise guesses...

If for the main OpenWrt (and not the packages or LuCI feed), you could start here:
https://github.com/openwrt/openwrt/pulls

Note that all new stuff needs to get into the development master first, so if you have something for 17.01, 18.06 or 19.07, please make sure that it works with the current master.

I used an older version of the packages feed. This was because of an error with xtables. However, I changed this version back to the original version. I tried to start a clean build with the original openwrt feeds, my personal feeds and my diffconfig.

I got exact the same error.