LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-07-2003, 03:35 PM   #1
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
keep old kernel source?


Ok, just built an lfs 4.0 system which of course comes with 2.4.19 kernel. Now built against that is all the lfs software, some libraries from blfs, xf86 and enlightenment. Haven't installed too much else yet. Now again, all that was built against the 2.4.19 kernel. Now if I upgrade to a 2.4.20 or even a 2.5.66 kernel... do I need to keep the old kernel source around? Is any of the software that was compiled against it going to need its header files or anything like that?
 
Old 04-07-2003, 03:40 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
No, you don't need to keep the old kernel. When you're compiling, it's just important to keep source (or only headers) of current kernels. If possible, also symlink your current source to /usr/src/linux.
 
Old 04-29-2003, 12:19 AM   #3
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
Nothing will require the headers in the kernel source tree, they should have all been copied over into /usr/include/{asm,asm-generic,linux} before the glibc build.

What is important is that those kernel header files installed into /usr/include are not replaced (even if you upgrade the kernel) as they are the headers your c-libraries were built against
 
Old 04-29-2003, 08:32 AM   #4
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Original Poster
Rep: Reputation: 45
ok, so I can build / rebuild all the kernels I want... and I can erase any linux-2.x.x source trees I want as long as I don't touch the files I copied over at system creation into /usr/include... ? Thanks.
 
Old 04-29-2003, 02:14 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Yes, you can. In my system, /usr/include/linux is a symlink to the corrent directory of my currently-using kernel. With such a configuration, I need to remember every time I delete my kernel sources (it usually means a new kernel) to modify the symlink. Make sure you don't have it configured this way.
 
Old 04-29-2003, 07:29 PM   #6
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
Quote:
Originally posted by Mara
Yes, you can. In my system, /usr/include/linux is a symlink to the corrent directory of my currently-using kernel. With such a configuration, I need to remember every time I delete my kernel sources (it usually means a new kernel) to modify the symlink. Make sure you don't have it configured this way.
You're heading for trouble doing this, you should NEVER swap out the kernel include files used to build your glibc.

From the venerable book
http://www.linuxfromscratch.org/view...06/kernel.html
scroll to the bottom...
 
Old 05-03-2003, 08:39 AM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
mdh, I change my glibc quite often, too. Usually I've got many kernel and many glibc versions in my system...
 
Old 05-04-2003, 09:17 PM   #8
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
So do I Mara ;-)

Except if there are differing glibc's they go in their own directory (obviously) and are built using the headers from the latest kernel I can find (which are copied into include directory where I put glibc).

The point is that the kernel headers that are referenced during the build of your c-libraries should stay with the c-libraries...
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debain kernel source or Linux kernel source? kushalkoolwal Debian 4 11-28-2005 01:56 PM
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 10:28 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:09 PM.

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