LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 11-30-2004, 12:53 AM   #1
joroxx
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian, Slackware
Posts: 27

Rep: Reputation: 15
what ports needed to compile kernel?


folks, i'm trying freebsd 5.3-release and was about to compile the kernel like:

make buildkernel KERNCONF=TEST

and i got the error:

make: don't know how to make buildkernel. Stop

what ports to i need to install in order to compile my TEST kernel?
 
Old 11-30-2004, 04:05 AM   #2
-X-
Member
 
Registered: Oct 2003
Location: Tx,USA
Distribution: Slackware, Red Hat, CentOS
Posts: 495

Rep: Reputation: 30
You don't need ports to build a kernel and I'm guessing you don't have a "TEST" config file.... could be wrong on that one.

Did you read chort's first post?
http://www.linuxquestions.org/questi...hreadid=177142

Anyway, I strongly suggest you go the FreeBSD site and read through the FAQ and the Handbook on "building a kernel."
 
Old 11-30-2004, 05:11 AM   #3
joroxx
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian, Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
actually i do have a "TEST" config file after i did a "cp GENERIC TEST". the handbook nor the FAQ doesn't tell what's needed to compile a kernel like should i install **all** the developer packages (from sysinstall) in order for "make" to run.
 
Old 11-30-2004, 06:10 AM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Are you in /usr/src when you run the command?
 
Old 11-30-2004, 07:02 AM   #5
-X-
Member
 
Registered: Oct 2003
Location: Tx,USA
Distribution: Slackware, Red Hat, CentOS
Posts: 495

Rep: Reputation: 30
You don't need the ports for the kernel. I think frob23 is right since make can't find the MakeFile.
 
Old 11-30-2004, 08:18 AM   #6
joroxx
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian, Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
yes i'm in the "/usr/src" directory when i run that command and that directory has several subdirectories among them is "i386/conf" where i made a copy GENERIC to TEST. there are also "Makefile" in these subdirectories.

this may sound silly but i did a minimal install since i installed via ftp. after which i did a "/usr/sbin/sysinstall" and selected the base, developer, ports, and then sys for the kernel source. doing it this way is my freebsd install complete as in ready for kernel compiles?

Last edited by joroxx; 11-30-2004 at 08:26 AM.
 
Old 11-30-2004, 08:32 AM   #7
-X-
Member
 
Registered: Oct 2003
Location: Tx,USA
Distribution: Slackware, Red Hat, CentOS
Posts: 495

Rep: Reputation: 30
joroxx, I can't tell what's the problem. The config should be in /usr/src/sys/i386/conf. I updated my source and built a kernel the other day... so... at this point I'm at a loss. You may have already, but read through this and see if you see something.

http://www.freebsd.org/doc/en_US.ISO...-building.html
 
Old 11-30-2004, 10:37 PM   #8
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Quote:
Originally posted by joroxx
yes i'm in the "/usr/src" directory when i run that command and that directory has several subdirectories among them is "i386/conf" where i made a copy GENERIC to TEST. there are also "Makefile" in these subdirectories.
/usr/src is the directory you need to be in (I point this out as /usr/src does not have a i386/conf directory), and it should contain something like this:

Code:
COPYRIGHT       UPDATING        games           libexec         sys
MAINTAINERS     bin             gnu             release         tools
Makefile        contrib         include         sbin            usr.bin
Makefile.inc1   crypto          kerberos5       secure          usr.sbin
README          etc             lib             share
with /usr/src/sys being essential. You also must have a Makefile and a Makefile.incl. If all of these conditions are met, you may want to update your source tree and try again.
 
Old 12-01-2004, 10:21 AM   #9
joroxx
LQ Newbie
 
Registered: Nov 2004
Distribution: Debian, Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
finally was able to compile the kernel. apparently freebsd has two ways to compile the kernel - normal and buildworld. i was doing a buildworld where i only want is to compile a customised kernel!

anyway, thanks all for the patience and help.
 
Old 12-01-2004, 10:38 AM   #10
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Quote:
Originally posted by joroxx
apparently freebsd has two ways to compile the kernel - normal and buildworld.
Nope. 'buildworld' rebuilds the system binaries, libraries, docs, man pages, etc ... basically everything except the kernel. 'installworld' installs the things that buildworld builds.

Kernel building has three targets. 'buildkernel', which builds the kernel but doesn't install it, 'installkernel' which installs the built kernel and 'kernel' which builds *and* installs the kernel. Have a look in /usr/src/Makefile for more information. It's heavily commented.

Glad to hear you got it going though! Don't give up on BSD. It's a great system.

Last edited by sigsegv; 12-01-2004 at 10:40 AM.
 
Old 12-01-2004, 12:01 PM   #11
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
There are two ways to build the system, the old way and the new way. I believe the FAQ comments on the difference.
 
Old 12-01-2004, 01:41 PM   #12
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Indeed, but no one uses config on the Free side of the fence anymore. Do they?
 
Old 12-01-2004, 04:26 PM   #13
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
I've used it several times and I know it is also used by the FreeSBIE project as the way to get the kernel compile for the live cd without making a mistake and blowing away a normal kernel.

I mean... it is easier to just use the new way. But that depends on having a populated /usr/obj/ and other "world" related issues.
 
Old 12-01-2004, 08:58 PM   #14
rehab junkie
Member
 
Registered: Nov 2003
Location: /var/local/pub/bar
Distribution: OSX 10.4.9
Posts: 259

Rep: Reputation: 30
> Indeed, but no one uses config on the Free side of the fence anymore. Do they?

Funnily enough, I used the "old" method for the first six months or so that I used FreeBSD. For some reason I couldn't get my head around the buildkernel/installkernel method. Mind you, I never really thought about it until the day I sat down to learn the buildworld process.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel compile tips needed Tim Johnson Slackware 6 09-08-2005 05:30 PM
Opening ports for C & C Generals only when needed + pf Gsee *BSD 0 01-17-2005 06:53 PM
IPTables help needed: Can't stealth ports 0 and 1? techchiq Linux - Security 8 09-19-2004 11:24 PM
Ports Question + Command needed kemplej Linux - General 1 02-12-2004 02:28 AM
how much space needed to compile a kernel? e1000 Linux - General 1 12-22-2003 03:17 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 10:44 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