LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-30-2008, 08:37 PM   #1
Shadowmeph
Member
 
Registered: May 2008
Location: West Coast Canada
Posts: 254

Rep: Reputation: 28
possible to compile a 32bit kernel on a 64bit os?


what I am wanting to do is build Smoothwall3 on a Full Distro instructions are here http://community.smoothwall.org/foru...p?f=22&t=23847 .
the thing is I want to try and avoid having to install a full 32bit distro on my smoothwall3 box if I don't need to. this is why I am wondering if it is possible to do this on a 64bit OS like Fedora 8
 
Old 09-30-2008, 10:03 PM   #2
darthaxul
Member
 
Registered: Aug 2008
Distribution: Gentoo; Funtoo
Posts: 205

Rep: Reputation: 18
Ya, just make sure you copy the x86 bzimage.
 
Old 10-01-2008, 02:16 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I don't see how the question stated as the topic of this thread has anything to do with this. I would have to say that yes you can install smoothwall on 64-bit, but no you cannot run a 32-bit kernel on a 64-bit OS.
 
Old 10-01-2008, 03:18 AM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Well, from the link you provided:

Quote:
At the end of that process, you should have 2 ISO's located in this directory: (one each of the standard distro, and one devel edition, of either a 32-bit or 64-bit flavor depending on the host environment).
What you want to do is not so clear - are you compiling on a 64-bit machine but have a 3-bit machine set aside for smoothwall?

You can check if your compiler is multi-targeted - for example, compile a "hello_world.c" file using the compiler and "-m32" switch. You may need to install the 32-bit libs to be able to successfully link the program. Since the kernel does not link to any libraries, you can try to compile - not quite as normal, you need to make sure -m32 is supplied.

However, to make sure the binary is compatible with your intended system, it is best to set up a cross-compiler for the job - you need to put the 32-bit libs for your target system somewhere and set up the cross-compiler environment to use/link to them.
 
Old 10-01-2008, 11:23 AM   #5
Shadowmeph
Member
 
Registered: May 2008
Location: West Coast Canada
Posts: 254

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by pinniped View Post
Well, from the link you provided:



What you want to do is not so clear - are you compiling on a 64-bit machine but have a 3-bit machine set aside for smoothwall?

You can check if your compiler is multi-targeted - for example, compile a "hello_world.c" file using the compiler and "-m32" switch. You may need to install the 32-bit libs to be able to successfully link the program. Since the kernel does not link to any libraries, you can try to compile - not quite as normal, you need to make sure -m32 is supplied.

However, to make sure the binary is compatible with your intended system, it is best to set up a cross-compiler for the job - you need to put the 32-bit libs for your target system somewhere and set up the cross-compiler environment to use/link to them.
yes this is what I wanted to do make the 32bit on the 64 bit machine, and the reason is because my 64 bit machine is allot faster then my 32 bit machine so the time it would take would be allot less .
now how do I find out which 32 bit libs I need to do this? I am new to this but I am totally willing to try it
 
Old 10-02-2008, 06:07 AM   #6
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
For building the kernel it should only be a matter of making sure "-m32" is specified and that the kernel configuration file is good for the target computer.

For anything else involving libraries, you need the headers and the 32-bit libs (so you can link); you also need to tell the compiler to ignore the usual search paths and point it to your headers and libs for the 32-bit system.

The libs and headers that you should use are the ones which will be installed on the target machine.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile 32bit .c .cc On 64bit x86_64 systems? Leo Park Linux - Software 4 01-09-2008 10:57 PM
How to compile source code as 32bit under 64bit OS. Brian1 Linux - Software 2 12-15-2007 02:35 PM
32bit(i386) or 64bit(amd64) on an amd 64bit cpu (amd 6000+)? d-_-b Debian 7 10-28-2007 07:48 PM
Running 32bit Installation with 64bit kernel? Colombian Linux - Newbie 3 09-26-2006 06:56 AM
can 64bit processor run both 64bit and 32bit computers? DJOtaku Linux - General 4 09-08-2005 08:14 PM


All times are GMT -5. The time now is 06:49 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration