Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2012 19:43:14 -0400
From:      Michael Powell <nightrecon@hotmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Issue with kernel building
Message-ID:  <k0rtla$9n3$1@ger.gmane.org>
References:  <DUB109-W1405A43C7DAF2745B9971C4C4BA0@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
antonin tessier wrote:

> 
> Hi,
> 
> I have a problem when I try to build my own kernel. I had never got such a
> one; here is my kernel configuration file and the building errors that it
> makes.
> 
[snip]
> 
> "# make kernel KERNCONF=GOLLUM
> 
>  MAKE=make sh /usr/src/sys/conf/newvers.sh GOLLUM
>
> Stop in /usr/obj/usr/src/sys/GOLLUM. "

I have snipped out content for brevity; rather let's focus on evidence of 
incorrect procedure on your part. While there still exists 2 ways of 
accomplishing this, the so-called "new" method is standard.

An example of how to do this can be found contained within a commented out 
section in the beginning of /usr/src/Makefile.  While this information is on 
how to completely rebuild/update the entire system from source, the commands 
to build and install a new kernel are present.

Please note the following:

make buildkernel KERNCONF=somekernelfilename
make installkernel KERNCONF=somekernelfilename

You are on almost the right track but you are referencing above incorrect 
paths to this kernel config process. For an i386 box/install your kernel 
config file would be located in /usr/src/sys/i386/conf and for a 64-bit 
amd64 install this location is /usr/src/sys/amd64/conf.

The best way to begin with customising a kernel is to simply copy the 
GENERIC config you will find in the conf directory mentioned (whichever is 
your box - i386 or amd64) to something like, for example, GOLLUM. Then cd to 
/usr/src and perform the above described commands.

Hints: 
Prior to attempting to rebuild again cd to /usr/obj and delete anything 
under /usr/obj. There will exist here content left over from the previous 
failed attempt. 

Keep in mind whenever you install a new kernel your present kernel (and its 
matching modules) get moved to kernel.old. What this means is that the 
GENERIC you have with a base install will be moved to kernel.old and can be 
used in the event the new kernel won't boot. Realize this: after the next 
rebuild process this kernel.old will be replaced _again_. In which case  you 
might now have 2 broken kernels with not an easy way to recover.

This is just some generic stuff to try and get you back on track. I would 
recommend an extended reading of the Handbook, as all of these instructions 
are present there. Hope this halps.   :-)

-Mike






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?k0rtla$9n3$1>