VectorLinux
October 21, 2014, 02:04:48 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: make defconfig and other kernel questions.  (Read 23715 times)
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« on: January 14, 2011, 07:17:12 pm »

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....
Code:
make defconfig
Makefile:463: /home/ken/Software/TESTING/kernel/2.6.37/linux-2.6.37/arch/i586/Makefile: No such file or directory
make: *** 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.
Code:
make defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
*** Default configuration is based on 'i586_defconfig'
***
*** Can't find default configuration "arch/i586/configs/i586_defconfig"!
***
make[1]: *** [defconfig] Error 1
make: *** [defconfig] Error 2

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..
Code:
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?
 
« Last Edit: January 14, 2011, 07:54:32 pm by stretchedthin » Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #1 on: January 14, 2011, 09:25:58 pm »

what version of vl is this on?

it seems like something is messing up your environment. try switching to another tty "CTRL+ALT+F2" login and run make defconfig from there
Logged
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #2 on: January 14, 2011, 10:05:33 pm »

what version of vl is this on?

it seems like something is messing up your environment. try switching to another tty "CTRL+ALT+F2" login and run make defconfig from there

I'll try that. FYI, I'm on vl7.0stdalpha4.9

In the meantime I copied the config file from 2.6.35.10 put it in 2.6.37 and am running a make right now.
Still all guess work and experimentation but let's see what happens.
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
pierce.jason
Packager
Vectorite
****
Posts: 250



« Reply #3 on: January 16, 2011, 01:09:55 am »

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( Tongue ).
Logged

pierce.jason
Email: $(echo -e "moc\x2eliamg\x40nosaj.ecreip" | rev)
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #4 on: January 16, 2011, 07:40:00 am »

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( Tongue ).


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
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
rm-r
DoucheBag
Vectorite
***
Posts: 115


« Reply #5 on: February 16, 2011, 05:55:51 pm »

That command is for an existing config file
Of special note:  > set all options to default

> Which presupposes  you are re-using a compatible (vector?) source
 To build from vanilla,  use one  of "make"  alternatives to build the configuration

Such as make menuconfig http://en.wikipedia.org/wiki/Menuconfig


RE: > "2.1.2.1 Using an existing  configuration

http://www.kernel.org/doc/#Configuring
 

"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"

"What is viewed is not important - That which is seen is"
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!