You are not logged in.

#1 2011-03-10 03:00:03

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Altered kernel .config overwritten when building

Howdy-ha, all.  Afer about 7 months of being too lazy and frustrated to bother, I've found the time and motivation to once again try building a custom kernel with a fixed DSDT compiled into it.  I'm running Arch64 on a Toshiba laptop, and the relatively lightweight system I've built (and ability to limit CPU frequency in the BIOS) have kept me from suffering from the overheating that plagued my earlier Linux days.  I feel, however, that it's about time I had a functional cooling fan and the ability to suspend to ram for convenience.  I've never managed to successfully built a DSDT into the kernel--despite successfully building the kernel itself--and the throttled-down cpufreqs push the build time of a default distro kernel up to about 2+ hours before I can even test.  Now, the discovery of "localmodconfig" and the great idea to build in /dev/shm ramdisk has compelled me to try again. 

Here's the snag I've hit: according to the Kernel Compilation wiki entry--

ArchWiki wrote:

Note: If you uncomment return 1 [in the pkgbuild], you can change to the kernel source directory after makepkg finishes extraction and then make nconfig. This lets you configure the kernel over multiple sessions. When you're ready to compile, copy the .config file over top of either config or config.x86_64 (depending on your architecture), comment return 1 and use makepkg -i.

However, after adding localmodconfig to the pkgbuild, running makepkg up to the "return 1" point,  and then manually tweaking the config some more (according to these instructions), running makepkg again will first give an md5sum error (owing to the altered config.x86_64).  I can use the --skipinteg flag, but then it still extracts the source tarball again and overwrites the custom .config in the source tree, though leaving the changed config.x86_64 intact.

What mistake am I missing?  I get the feeling that skipping the integrity check might not be the best move, but it's the only way I can follow the wiki instructions.  Also, I intend to use localmodconfig for all kernels after the first successful build, but at the moment it's not utterly necessary if it's overly compilicating things.  Any help is greatly appreciated.

Offline

#2 2011-03-10 05:36:54

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Altered kernel .config overwritten when building

Sounds like you want --noextract as well.

Offline

#3 2011-03-10 11:15:26

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Altered kernel .config overwritten when building

Or you can rename the .config as .oldconfig and then use 'make oldconfig' in the rerun.

Offline

#4 2011-03-10 11:49:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Altered kernel .config overwritten when building

Being a firm believer in non-interactive PKGBUILDs, I always create my kernel conf outside of the build process, then add it to the build dir. The md5sum error is a non-issue - all you have to do is regenerate them. After that, run makepkg as normal, and go make coffee/for a walk/to sleep/other, depending how slim your config is and how fast your CPU is.

Offline

#5 2011-03-10 18:20:56

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Altered kernel .config overwritten when building

Thanks for the tips, folks.  I just finished my 6th quiz/exam in as many days, and now it's spring break time, so I'll be gettin' to this kernel business momentarily.  @tomk: altering the config manually (after running make localmodconfig from the src directory) is all I'm really trying to do;  a mushy mind due to long hours of staring at pages of text led to me overlooking --noextract and --nobuild (thanks for the pointer, foutrelis!).  My cpu is moderately powered, but I've had it scaled back during previous builds since overheating is one of the issues I'm trying to solve, and that's the primary reason for using localmodconfig and building in a ramdisk.  A concomitant question: does mounting /dev/shm with default settings, so as to build there without root privileges, pose any security or stability problems?  The wiki says to use noexec, nodev, nosuid as mount options, but for now I only have it mounted with nosuid for its own sake.  If this is ok, then hopefully over the next few days I'll have a perfectly working laptop (although, with no real responsibilities until the middle of next week, I kinda foresee a whiskey weekend around the bend big_smile)  Thanks again for the help.

Offline

Board footer

Powered by FluxBB