LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2006, 07:58 PM   #1
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Rep: Reputation: 30
configs file in the linux kernel source tree


hi,

i m a little confused...i ve dnloaded the source tree for the linux kernel version 2.4 and 2.6/// now the configs directory in the 2.4 source tree has names of many processors, such as, ix86,powerpc etc..

what does this signify?
does this mean that separate board support needs to be written for the processors not on that list?

also,
i m working with a MIPS processor, whose name exists in the configs directory of the 2.4 tree and i can compile the tree it and install the kernel on the processor...however, the 2.6 tree does not contain the name of this MIPS processor in its configs directory...and i cannot compile the source tree...how does this happen, when there is no communication established between the board and the computer on which i m compiling the tree?

hope this makes sense!

thanks,
ashlesha.
 
Old 06-28-2006, 08:08 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
How are you configuring your kernel? Usually you do something like make xconfig from the source directory and then answer all the questions and mark things as Yes, Module, or No.

Anyway, if I go through my source tree for 2.6.16.19, I find the mips folder under /usr/src/linux/arch/mips.
 
Old 06-28-2006, 08:13 PM   #3
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
well, the make xconfig does not work..it says no rule to make target xconfig

this is a modified ver of the source tree that we use in my workplace..
so you are saying that there should be dif files for dif architechtures that should have dif configuration options as per the architechture?
 
Old 06-28-2006, 08:14 PM   #4
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
sorry i forgot to say that i compiled using the make ..just that without any options..
 
Old 06-28-2006, 08:23 PM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
If you've never tried compiling a kernel before, you might try following this (although it's a little outdated, the config and make parts are still basically the same). I believe there might be some different options depending on the architecture. But the main thing is that if that config file is already configured for an x86 architecture, you have to reconfigure the kernel to be for MIPS instead.
 
Old 06-28-2006, 08:29 PM   #6
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
see thats the thing..my host machine on which i m doing the compiling is an ix86...
and it ver2.4 compiles on this...and produces an image..

however, ver2.6 refuses to compile on my machine..
when you say i ve to reconfigure the kernel for an MIPS, do you knw anyplace for me to start from? what i mean is..should i be looking at the differences between 2.6 and 2.4? and then figuring out what kind of hardware support / dif config options i need to give for the MIPS/2.6?

sorry..im just a little confused with this...
 
Old 06-28-2006, 08:44 PM   #7
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
What do you mean by "fails to compile"? You should be able to compile a kernel (of some sort) on any machine for any other machine. All you have to do is go through and change the kernel configuration. You use make menuconfig, make config, or make xconfig to edit the configuration file.

Make sure /usr/src/linux is a symbolic link to /usr/src/linux-2.6.XXX or whatever directory has the kernel source. Then from the /usr/src/linux directory, you run the make xconfig command to start configuration. Then you set all the options you want (somewhere in here should be mips -- you probably have to pick the correct subarchitecture type to be able to pick mips), save and exit. Then compile as normal...
 
Old 06-29-2006, 06:47 AM   #8
x86processor
Member
 
Registered: Jun 2006
Location: Chennai, India
Distribution: Embdebian, Debian, Fedora Core, Redhat, Slackware, Ubuntu.
Posts: 112

Rep: Reputation: 15
@ashlesha
What you are trying to do is called cross-compiling. In the kernel Makefile you need to set:
Code:
ARCH=mips
CC=/path/to/cross-compiler
For example, for ARM, I use:
Code:
ARCH=arm
CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
The different arch/ directories are for code relevant for the target processors.

You then follow the same procedure for any Linux kernel compilation. Your target image contains instructions for MIPS and it will run only on a MIPS processor.

I'd recommend reading "Building Embedded (GNU)/Linux Systems" by Karim Yaghmour.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 01:34 AM
linux-source vs. linux-tree for 2.6.12 kernel Pingus Debian 3 08-24-2005 05:33 PM
Linux Kernel Source Tree Not found pzearfoss Linux - General 6 12-28-2004 03:16 PM
linux kernel source tree not found whats wrong? vavoem Linux - Hardware 6 08-02-2004 08:35 AM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 09:37 PM


All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration