LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   configs file in the linux kernel source tree (https://www.linuxquestions.org/questions/linux-newbie-8/configs-file-in-the-linux-kernel-source-tree-459274/)

ashlesha 06-28-2006 06:58 PM

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.

pljvaldez 06-28-2006 07:08 PM

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.

ashlesha 06-28-2006 07:13 PM

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?

ashlesha 06-28-2006 07:14 PM

sorry i forgot to say that i compiled using the make ..just that without any options..

pljvaldez 06-28-2006 07:23 PM

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.

ashlesha 06-28-2006 07:29 PM

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

pljvaldez 06-28-2006 07:44 PM

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

x86processor 06-29-2006 05:47 AM

@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.


All times are GMT -5. The time now is 07:51 AM.