You are not logged in.

#1 2011-12-22 09:48:09

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

compiling a kernel on one machine to be used on another

Hey guys,

I have a desktop and laptop both running on arch. I want to compile a custom kernel for my laptop, but the problem is my laptop overheats and shutsdown during compilation. I know I can compile a kernel on my desktop for my laptop, is there any "gotchas" I should watch out for? Right now I have a .config that I got from my laptop (by running make menuconfig). I am using linux-ck from AUR as my starting point, I have already successfully compiled a custom kernel for my desktop just want one for my laptop also.

Another thing is it possible to limit cpu usage to 50% (or another arbitrary number) while compiling? Thanks for any feedback. smile

Offline

#2 2011-12-22 11:27:58

matse
Member
Registered: 2011-04-27
Posts: 299

Re: compiling a kernel on one machine to be used on another

Compiling the package on your desktop pc should work fine if you use the standard kernel package from ABS and don't pass any KCFLAGS as "march=native" when building the kernel via make in your PKGBUILD (I don't know whether the AUR package does this).

For dowclocking your cpu checkout cpufreq - with the powersave governor you should be fine - even if your laptop really shouldn't overheat when compiling anything...

Greetings
matse

Offline

#3 2011-12-22 11:34:48

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,674
Website

Re: compiling a kernel on one machine to be used on another

@op - what is your desktop cpu and what is your laptop cpu?  The main cpu tweaks are not from your makepkg.conf but from your selections in the cpu family part of the nconfig.  I also agree that you shouldn't be overheating when compiling.  Something is wrong with the laptop.  Perhaps full of dust?  Do you have an air compressor you can use to clean it out?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2011-12-22 11:39:31

matse
Member
Registered: 2011-04-27
Posts: 299

Re: compiling a kernel on one machine to be used on another

I guess if he's running arch on his laptop and uses a preconfigured kernel from AUR then the config file of this kernel will of course support his architecture...

Offline

#5 2011-12-22 20:50:58

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

Re: compiling a kernel on one machine to be used on another

matse wrote:

For dowclocking your cpu checkout cpufreq - with the powersave governor you should be fine - even if your laptop really shouldn't overheat when compiling anything...

Ah yes forgot about cpufreq! I think that should do the trick. My laptop cannot sustain a 100% cpu load for long, it really never has been able to sad.

@Graysky my laptop is a AMD64 Turion, but I am running arch i686. Desktop is Core2Duo running x86_64. And I ran make menuconfig on my laptop to obtain a .config file that is suited for laptop, I just want to do the compiliation on my desktop.

Regarding the KCFLAGS or CFLAGS, I believe I do need to change them, since the default set in makepkg.conf are native for my x86_64 setup. Can I specify those in the PKGBUILD or I should temporarily move the makepkg.conf from laptop to desktop?

Edit: I know of the arch=('i686') option in the PKGBUILD, but is that enough?

Last edited by KingX (2011-12-22 20:55:20)

Offline

#6 2011-12-22 21:23:21

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: compiling a kernel on one machine to be used on another

If you install the devtools package, you can build i686 packages as well. It provides buildscripts to build packages in both x86_64 and i686 chroots.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2011-12-23 06:18:59

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

Re: compiling a kernel on one machine to be used on another

Thanks for the feedback guys I took the route of using the powersave governor on my laptop to throttle the cpu and just compile the kernel there. smile

Offline

Board footer

Powered by FluxBB