OpenWrt Forum Archive

Topic: Basic input w.r.t ".config" files generated during make

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

Hi All ,

This is my first project with openwrt & also kernel compilation .
I am using Ubuntu 14.04 and Openwrt15.05.

1)  After doing the "git" download , there is no ".config" file under openwrt folder.
     ".config" is created when i do make menuconfig and select TARGET as x86 with SUBTARGET as x86_64
     From where is this default ".config" & ".config.old" file generated ?
     Why is .config.old created , is it required during compilation  ?

   
2) If i do an make defconfig or make oldconfig , i can get an ".config"
    So which one should be preferred "menuconfig" or "defconfig"  or "make oldconfig" ?


3)  What is the difference and usage of below mentioned .config files under 
     build_dir/target-x86_64_uClibc-0.9.33.2/linux-x86_64/linux-3.18.36/.config ?
     .config           
     .config.old       
     .config.override 
     .config.target   
     .configured       


It would be extremely helpful if members can help me for the above mentioned basic or i would be thankful for any links which can help me to understand these details.

Thanks
Ashish.

(Last edited by ashish.kmishra on 4 Oct 2016, 10:44)

make defconfig is usefull for setup fast a working Target config with defaults and delete invalid items example
a .config with  just

CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_64=y # Subtarget

After this you can go with the all other openwrt make options

For the Linux Kernel .config

The .config* etc. in openwrt /lede a seperated in two configs a arch(opt. subarch)  & Linux Generic config for all system. And selected kmod packages (kernel module) can change the finial kernel config to.
How the system work look under root/include/ files & root/scripts and kernel modules are under root/packages/kernel/*/*.mk
The final generated .config is generated and than kernel built start witch generate the final for the built the .config .config.old  is now the file openwrt build system created.

make kernel_menuconfig (for the target) can override settings setup under packages/kernel/*.mk (for selectet module) files
make kernel_oldconfig save the kernel config for the target arch root/target/linux/x86/64/config-(version)

The generic kernel config need manual edit if needed under target/linux/generic/config-(version)

I'm also interested in an answer to the original question. It would be great if somebody could answer it is a systematic and intelligible way for all of the newbies out there. Punctuation greatly appreciated.

thanks,
Aaron

Trismo ,
Thanks for your inputs. Was not able to understand the finer details fully but was able to proceed ahead with your inputs.

Doaaron,
Not sure if is helpful to you now but i am sharing my limited info :-

a) The .config files are used to configure the KERNEL & OPENWRT setup as per our requirement.
b) By default there is no config file .
c) Do an make menuconfig in the openwrt folder
    This would help the setup to be created for the required PROCESSOR ARCHITECTURE
     Target System  -> CORE (Example :- x86)
      Subtarget         -> (32bit/64bit x86_64)
      Base system    ->  For BusyBox
  This will create an default .config for the required processor

d) make kernel_menuconfig
With this you configure KERNEL functionality like drivers / stack etc.

d) make
This will create an final image for the above selected configuration under BIN folder.

Thanks
Ashish Kumar Mishra

The .config file is generally not intended to be edited directly.  That is why it is a hidden file.  Use the defconfig,  menuconfig etc routines to create or change it.

The discussion might have continued from here.