AuthorTopic: make defconfig and other kernel questions. (Read 37058 times)

So I got myself the book "Linux Kernel in a Nutshell" found here as a free pdf download.

Just starting out so I haven't gotten far but have already ran into a snag. After downloading the source.tar.gz, extracting it, the first thing I am supposed to do is...make defconfig (in order to make a default config file.)This fails with....

make defconfigMakefile:463: /home/ken/Software/TESTING/kernel/2.6.37/linux-2.6.37/arch/i586/Makefile: No such file or directorymake: *** No rule to make target `/home/ken/Software/TESTING/kernel/2.6.37/linux-2.6.37/arch/i586/Makefile'. Stop.

It's failing because there is no file i586 in the arch directory, but there is a file x86, which (just to see what would happen) I copied and renamed i586.Now make defconfig now works sort of...but I get this error.

So what the hell. I find a file called arch/i586/configs/i386_defconfig and rename it i586_defconfig. Just so the make defconfig script can find what it's looking for. Figure if it's not the right thing I'll find out when I rn make defconfig again.So now I run it again..

make defconfig*** Default configuration is based on 'i586_defconfig'## configuration written to .config#and it works! What the hell!

So my question is this. What is really the right way to do this. Seems a kernel build on Vector wants to be in the i586 architecture but doing what I did can't be the answer. Can it? What are the real steps to get make deconfig to work on Vector??

edit: Found this...make ARCH=x86 defconfig

But Vector is built on a i586 architecture, so that still doesn't feel like the Vector way?

Are you attempting to build from kernel.org vanilla sources, or from vectorlinux's kernel sources. In either case, you should be able to use makeold(or some similarly spelled derivative), to create a config from a prior kernel-version's config file.

In VL6-light, with latest updates, the config exists at /boot/config-2.6.31.8. You should be able to copy this to your kernel build director to make oldconfig/makeold/whatever it is( ).

Are you attempting to build from kernel.org vanilla sources, or from vectorlinux's kernel sources. In either case, you should be able to use makeold(or some similarly spelled derivative), to create a config from a prior kernel-version's config file.

In VL6-light, with latest updates, the config exists at /boot/config-2.6.31.8. You should be able to copy this to your kernel build director to make oldconfig/makeold/whatever it is( ).

I was attempting to build from vanilla. I did manage to boot using the 2.6.37 kernel, but there is still much to grok about configuring the kernel. I did borrow the previous config file to do it, by manually renaming it i386_defconfig and placing it in the expected directory, I pretty much fooled the system into pulling it as the default configuration.Your way sounds much more elegant. I'll give that a go.

Still have found only one way to get the defconfig thing going and thats...make ARCH=x86 defconfig

"Often when building a kernel, an existing .config file is supplied from elsewhere. Copy it into place, and optionally run "make oldconfig" to run the kernel's diagnostics against it to ensure it matches the kernel version you're using, updating anything that's out of sync.

Several preset configurations are shipped with the kernel source code. Run the command find . -name "*_defconfig" in the kernel source directory to seem them all. Any of these can be copied to .config and used as a starting point.

The kernel can also automatically generate various configurations, mostly to act as starting points for customization:

* make defconfig - Set all options to default values * make allnoconfig - Set all yes/no options to "n" * make allyesconfig - Set all yes/no options to "y" * make allmodconfig - Set all yes/no options to "y" and all "yes/module/no" options to "m" * make randconfig - Set each option randomly (for debugging purposes). * make oldconfig - Update a .config file from a previous version of the kernel to work with he current version."

Logged

"Problems are seldom resolved by thinking in the same manner they were created"