SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slackware64 current multilib, Gentoo
Posts: 43
Rep:
compile kernel for x86_64
I have an Intel dual core (64bits) computer and I have some experience with kernel compiling. I have a very simple -maybe very stupid- question:
Is it possible to install or compile the kernel for x86_64, so that the kernel is 64 bits and that it can support 32bits applications?
I searched and searched but can't find a good answer. I found something that you first must compile gcc for 64 bits, but how to do that, no idea...
(I don't even know if it is really possible...)
The only thing I found via google is that it is very tricky(?)
Can someone help me out of my dreams, or maybe... give the solution.
(I work of course with slackware (the real one, 32 bits)
Distribution: Slackware64 current multilib, Gentoo
Posts: 43
Original Poster
Rep:
I must say that I also work with Suse (64 bits), but I like Slack more because it's "clear and simple".
I have several times compiled the kernel so that it's quite small and it loads just what is needed for my hardware.
I can say it is quite fast for 32 bits now!
I have read that it could be possible to compile a kernel 64 bits on a 32 bits system with a gcc compiler that supports 64bits.
IF it is possible, then the system would get a little bit faster... IS it possible? How? Or is this really difficult stuff?
Thanks anyway!
If you want a 64-bit Slackware with 32-bit compatibility, give Slamd64 a try. Bluewhite64 is a 64-bit port (if you can call it a port -- it differs from Slackware quite a bit), but WITHOUT 32-bit compatibility (as far as I know -- though this may have changed as of late). Slamd64 is more similar to a direct 64-bit port (and some prefer it for political reasons -- do a search if you want more information about that), and if I were to switch, that's the distro I would use. Slamd64 does seem to get updated a lot slower than Bluewhite64, though. However, regular 32-bit Slackware works fine for me without any 32-bit compatibility issues (for obvious reasons), so I see no need to switch -- yet.
As for compiling 64-bit stuff, if you do need a 64-bit gcc etc., you would need to do the circular copmilation technique, as far as I know -- but I haven't played with this stuff so I am probably dead wrong. If you do need to build circularly, it's a lot of effort.
The kernel doesn't care whether applications are 32 bit or 64 bit. The applications depend on whether glibc is 32bit or 64bit. Since the kernel doesn't need or use any external libs, it doesn't care.
Creating a 64bit system is whole 'nother matter. but if all you want is 64bit optimization for your kernel, just select the appropriate arch and recompile.
I don't think there's much use in compiling a 64-bit kernel for a 32-bit system. Just install slamd64, it's an unofficial port of Slackware to 64-bit with multilib support, meaning it can run 32-bit apps too.
I run a x86_64 kernel on my pentium 4 with Slackware-current (normal 32-bit userspace). I just build the kernel on another system (x86_64 Centos). CONFIG_IA32_EMULATION=y is needed in the kernel config.
Maybe its merits are questionable but at least no HIMEM is needed: all memory is readily accessible with 64 address bits. I also installed a 64-bit version of Matlab (plus some 64-bit shared libraries for Matlab in /lib64 which I copied from Centos). And, some number crunching fortran and C programs were a bit faster (6-11 %) as x86_64 binaries vs. x86_32.
Distribution: Slackware64 current multilib, Gentoo
Posts: 43
Original Poster
Rep:
Thanks for all the answers!
It's getting more clear to me.
I'll try kernel compiling with 64bits arch supporting. I want to stay on Slack and not to go to Slamd64, because Slamd64 gave me some problems with the Intel processor. (I never buy an Intel anymore, but that's an other story...)
Thanks again, greetings, Henkees.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.