You haven't said where you got the source you are using, but evidently there's an invalid .config
in it. This is used to set various options, such as the processor type. There are literally hundreds of these options with intricate dependencies upon one another (e.g., what processor you choose will affect what other choices you have).
The vanilla source has no .config
in it; you need to either provide or create one. make oldconfig
is used when the .config
is from a previous version, and must be updated. Sometimes this process cannot be completely automated and you end up basically running make config
, which uses a CLI interface; this might also be what happens if you try make oldconfig
with no config.
You should look at the more graphical make menuconfig
to get a better perspective on what this is all about.
However, starting from nothing and trying to get a config that will work for you is going to be impossible unless you know what you are doing. Ideally, you would start with the one used to create your running kernel. This is especially true if you are just building a module; while you don't need to build the actual kernel, in order to compile the module it must be known how the kernel it is to be used for was compiled.
Hopefully, you can find that at /proc/config.gz
on the target system. This is not an on disk file, the system must be running in order to retrieve it. It's gzipped so
gunzip config.gz
mv config .config
Should do it. Copy that into your source tree and run make menuconfig
to add instructions for the module you want to build.
If that doesn't exist, you're going to have to track down the config that was used. Note also that you need to use the exact same kernel version if you are building a module.
Here's a general overview of the compilation process, which might also be helpful, read #2 and 3 first.