You are not logged in.

#1 2009-05-29 11:35:05

chrispoole
Member
Registered: 2008-12-30
Posts: 121

[SOLVED] Confusion about cross-compiling kernel

I have a MacBook Pro running Mac OS X, and my Arch laptop.

They have different processors (but both Core 2 Duo).

How do I go about compiling the kernel on my Mac, for my Arch machine?

(I'm just going to try compiling the stock Arch kernel at first, then perhaps add the flag in .config for Core2Duo optimisations. Latest kernel.)

Last edited by chrispoole (2009-05-29 12:53:14)

Offline

#2 2009-05-29 11:50:09

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Confusion about cross-compiling kernel

Are you *sure* you need a custom kernel?
When I dabbled in x-compiling you had to set up a x-toolchain.

Offline

#3 2009-05-29 11:55:29

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: [SOLVED] Confusion about cross-compiling kernel

Well, I just want to play about with compiling my own kernel as a learning process, nothing more. I'll probably still use stock Arch kernels, but I'd like to at least get used to the process. I tried compiling once, but it got stuck half way through booting, and I didn't have time then to track down the issue.

I've no idea if cross-compiling is involved or not. If not (I naively assumed you might just have to supply gcc some flags to specify what architecture to compile to), then I might try it. If it is a little messy, I'll just stick to compiling on the box I want to kernel for.

Offline

#4 2009-05-29 11:56:23

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: [SOLVED] Confusion about cross-compiling kernel

BTW, if easier, it can be assumed that I have the latest gcc, since I can grab it from MacPorts.

Offline

#5 2009-05-29 12:15:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Confusion about cross-compiling kernel

If you're running an Intel Mac, maybe x-compiling won't be necessary.
I think you need to download a toolchain for your target architecture, set it up and compile the kernel *w/ that toolchain*, not w/ your regular one.

I'd suggest grabbing CRUX http://crux.nu/. Compiling the kernel is part of the standard installation process. CRUX is somewhat similar to Arch, w/ the notable omission of pacman.
If playing w/ kernel is all you want, set up some sandbox space and give it a go. No need for x-compiling etc.

Last edited by karol (2009-05-29 12:16:39)

Offline

#6 2009-05-29 12:52:59

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: [SOLVED] Confusion about cross-compiling kernel

Thanks, I think I might just stick to compiling on the laptop I want to use the kernel on. Seems a whole lot easier.

Offline

Board footer

Powered by FluxBB