Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-20-2009, 12:06 PM   #1
Registered: Aug 2009
Location: Ilkeston, England
Distribution: ubuntu, xp, embeded
Posts: 79

Rep: Reputation: 1
Setting up a multiple cross compile environement

I've just started with Linux (a few months ago) and thought that I would jump in right at the deep end (bad move probably, lol)

My current hardware is...
A) PC (P45 ICH10, Intel Quad(64) core, 8 Gig memory, Multiple sata harddrives and 2 EIDE CD/DVD drives)
B) 1 Western digital mybookworld (blue ring) (ARM)
C) 2 Western digital mybookworld (white light) (ARM, different version)

Idealy I'd like to standardise the majority of software across all the boxes, with some device specific software.

Starting with the basic GNU/Linux kernel what I'd like to do is...

Have a flat Source tree :-
Kernel source
PC Kernel specific source / compile options.
ARM Kernel specific source / compile options.
ARM (diff vsn) Ker... etc.

So that when I compile A,B,C It uses any specific modues/configurations from the device specific directory, then compiles that with the default source in the kernel source directory.

Is this possible, if so can anyone tell me or point me in the direction of resources on this.

Idealy what I don't want to end up with is 3 lots of the kernel source where the only change is config file and/or device specific modules.

If done correctly I'm guessing should a fix/patch/new version of the kernel come out then all I would have to do is replace the 'default' source and the re-build 3 times, copy to devices, job done... thats what I hope... Obvioulsy I'm guessing that in somecases the config file will need to be re-done from scratch in the device specific directories.

Ok, so can this be done?

Old 10-21-2009, 06:37 AM   #2
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Originally Posted by JonathanWilson View Post
Starting with the basic GNU/Linux kernel what I'd like to do is...

Have a flat Source tree :-
Kernel source
PC Kernel specific source / compile options.
ARM Kernel specific source / compile options.
ARM (diff vsn) Ker... etc.

Ok, so can this be done?
Yes - basically, you need a clean kernel source tree, let's say kernel-latest/, then run at least `make defconfig' in that directory (or else you can't `make menuconfig' in other directories).

You can make another directory, say kernel-x86/ and run:

make -C kernel-latest O=kernel-x86 <target>

where <target> is whatever target you'd usually run. This basically just outputs all the relevant files to the directory you specify with "O=". Note that you need a .config file in the output directory, so run a *config target first. You'll also need ARCH=arm (I'm guessing) and CROSS_COMPILE=prefix-of-your-gcc-tools- on the command-line as well, if you're cross-compiling a kernel.

If you've never built and installed a kernel before, it'd be more than a good idea to do a plain ol' build (both native and cross - each one has fresh new issues! ), as you'll get from any good Google search.

John G

Last edited by JohnGraham; 10-21-2009 at 06:40 AM.


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 cross compile? jiyun0121 Linux - General 3 09-01-2005 06:15 PM
Qt Cross Compile werewolfolondon Linux - Software 2 02-25-2005 01:01 PM
cross compile zaicheke Linux - Software 7 01-20-2005 08:23 PM
Desktop Environement vs Window Manager lokee General 32 10-05-2004 04:34 AM
Setting up GCC for cross-compile ugenn Linux - Software 0 02-20-2003 09:08 AM > Forums > Linux Forums > Linux - Software

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

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