LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-07-2002, 05:38 PM   #1
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
after struggling with kernel compile


i've struggled with kernel compile for the first time yesterday
i'd like to summerize what i 've learned

when u apply patch to kernel source,
make sure that patch works with your system..
i've wasted tons hours with wrong patch.
and don't forget to do #make mrproper after patching

when u do #make xconfig
chances are u can load /boot/config file so that u can start from there.

after copying bzImage and apply change in lilo.conf
u can do #make modules / #make modules_install
after rebooting and make sure your new kernel boots up(u will see modules unresolved dependencies.. )
if the new kernel boots up, do #make modules /modules_install
(u don't want to waste time with kernel image that's not gonna boot)

config options significantly changes your compile time..
go with as minimal options as u can..

thx
 
Old 07-07-2002, 06:01 PM   #2
lynch
Member
 
Registered: Nov 2000
Location: A Mid-Atlantic state
Distribution: SuSE 8.1,Knoppix 3.2,Mandrake 9.1
Posts: 388

Rep: Reputation: 30
Thanks for the info.
lynch
 
Old 07-08-2002, 03:11 AM   #3
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Original Poster
Rep: Reputation: 30
oh i forgot this..
since each step takes considerably long time..
i thought if i can make a shell script which will execute each step after previous step is done, it will be awesome..

i'll work on it tommorow maybe

if anyone has that kind of program, post it plz~

 
Old 07-08-2002, 06:24 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
You forgot the most important step, don't listen to MasterC's suggestions.
 
Old 07-08-2002, 02:55 PM   #5
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Original Poster
Rep: Reputation: 30
no not all all

MasterC u gave me confidence to deal with the whole thing

i think it's most important to realize that kernel compile is not more than compiling any other software..

as long as you keep old kernel by setting up lilo.conf correct,
there's not much to lose other than time..
if u install tar.gz file ,, files are spread all over the system
with kernel, it's all under /usr/src/linux and /boot (ones u copied to)
so nothing is gonna messed up

thx MasterC again..

 
Old 07-12-2002, 06:51 AM   #6
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Original Poster
Rep: Reputation: 30
//Eugene Kim
//after make xconfig, just run this for make dep/clean/bzImage
//little bit of modification would generalize this program so that it can
//be used for any source compilation...

#include <stdio.h>


main(int argc, char *argv[])
{
int depid, cleanid, bzimageid, waitret;

/* well i tried to make it more general with shell script
..next time maybe
i let my friend borrow my c book and shell book .. lol
=)
*/
/* if(argc>1){ */
/* if((childid=fork()) == 0){ */
/* execv(argv[0], ++argv); */
/* exit(127); */
/* } */
/* } */


if((depid = fork()) == 0){
execlp("make","make","dep", (char *)0);
execv(argv[1], *argv);
exit(127);
}

while((waitret=wait((int*)0)) != -1){
if(waitret==depid)
printf("make dep is done! His process id is %d \n", depid);
}

if((cleanid = fork()) == 0){
execlp("make", "make","clean", (char*)0);
exit(127);
}

while((waitret=wait((int*)0)) != -1){
if(waitret==cleanid)
printf("make clean is done! His process id is %d \n", cleanid);

}


if((bzimageid = fork()) == 0){
execlp("make", "make","bzImage", (char*)0);
exit(127);
}

while((waitret=wait((int*)0)) != -1){
if(waitret==bzimageid)
printf("make bzImage is done! His process id is %d \n", bzimageid);
}


exit(0);
}

Last edited by doublefailure; 07-12-2002 at 07:02 AM.
 
  


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
Struggling with Math, need help randyriver10 General 45 08-28-2007 05:27 AM
struggling to port forward apache 1.3 dynamicsamurai Linux - Networking 1 06-15-2005 01:40 AM
new to ipsec, struggling eagle683 Linux - Newbie 1 06-08-2005 02:14 PM
Struggling with a USB pen drive kashatn Linux - Hardware 3 03-23-2005 04:43 AM
Struggling to configure my network :S Detriamus Linux - Newbie 7 08-10-2004 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration