Messages in this thread |  | | | Date | Thu, 26 Feb 1998 20:40:23 +0000 (GMT) | | From | John Sheehy <> | | Subject | Re: Changing topic (longish), was Re: GGI debate and etc. |
| |
On Thu, 26 Feb 1998, Trevor Johnson wrote:
> > This may be a dumb question, but this seemed like the best time to bring > > it up. I am wondering if there is currently a way to 'cross-compile' a > > kernel. > > > > For instance (and the pre-requesite of a gcc that is capable of cross > > compiling is a given) if on my PC I wanted to compile a kernel for a > > PowerMac, is this already possible? > > I think you could just change line 5 in the top-level Makefile from > > ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) > > to > > ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/i386/ppc/) > > but I haven't tried it. IMO it would be better if the platform could be > set in the configuration programs, with the uname test used to establish a > default when there is no .config file. > ___
I currently use gcc on a sparc running solaris to cross compile a kernel for x86 machines. I needed to make the following changes to the top level Makefile :
ARCH := $(shell ..... changed to ARCH := i386 ( I suppose ppc could go here ) and the CROSS_COMPILE variable a bit further down set to
CROSS_COMPILE = /usr/local/bin/i386-unknown-linux-
the vars following this (AS LD NM etc..) use this as a prefix to their respective names. ( You have to compile gcc as a cross compiler to give you i386-unknown-linux-gcc )
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
|  |