src.conf seems not to bee working - where is my mistake?

Hello,
I have tested both methods to install a kernel again. I have copied my before created and saved 10.3 kernel to /boot/kernel, which was acutal a 11.0 kernel. Then, first, I do a freebsd-update in expectation to get a full standard kernel with debug symbols - because for 11.0 it is written that this is the default:
freebsd-update --currently-running 10.3-RELEASE -r 11.0-RELEASE upgrade
and installed it - but in /usr/lib/debug/boot/kernel are no symbol files ??? :confused:
Also the kernel have just 107 MB and 818 files - is this a full kernel?

I copied this kernel form /boot/kernel to /boot/GENERIC. Then, second, I fetched the sources:
svn checkout svn://svn.freebsd.org/base/release/11.0.1 /usr/src and do buld a "customized kernel" that should be used /etc/src.conf:
make buildkernel
make installkernel
I had created before the file /etc/src.conf. And in this file I write some options, like
Code:
#
#    /etc/src.conf  (default location) 
#
#   --source build options
#   --for *make buildworld* *make buildkernel*
#   src.conf is to set make(1) variables that control the aspects
#   of how the system builds. It uses the standard makefile syntax.

WITHOUT_DEBUG_FILES=yes

After
make installkernel has finished I take a look into /usr/lib/debug/boot/kernel and expected that there are no debug symbol files of the kernel, because of the option in src.conf I had given. But know all debug symbols for the kernel has been build ??? :confused:

This is total reverse I had read about it. What could here be wrong? :(

Here is my src.conf file. Have I do some misstakes? Is there something written wrong?

Code:
#HL-170131 (vServer-hetzner.de)
# *****************************************************************************
#
#    /etc/src.conf  (default location) 
#
#   --source build options
#   --for *make buildworld* *make buildkernel*
#   src.conf is to set make(1) variables that control the aspects
#   of how the system builds. It uses the standard makefile syntax.
# 
#   src.conf should not   specify   any dependencies to make(1)
#   it only affects buildings FreeBSD not ports or packages
#
#    see >man 8 src.conf
# *****************************************************************************

# *****************************************************************************
#HL-170127 added for FreeBSD 11.0 running on vServer
# *****************************************************************************
WITHOUT_DEBUG_FILES=yes
WITHOUT_FLOPPY=yes
WITHOUT_GAMES=yes
WITHOUT_HTML=yes               # Set to not build HTML docs.
WITHOUT_SENDMAIL=yes           # not build sendmail(8) and related programs.
WITHOUT_TALK=yes               # The talk utility is a visual communication program
                               # which copies lines from your terminal to that of another user.
WITH_TESTS=yes                   # To install the FreeBSD Test Suite in /usr/tests             

#WITHOUT_USB=yes               #  virtual Server outside, but USB need by others

WITHOUT_BLUETOOTH=yes
WITHOUT_WIRELESS=yes           # virtual Server outside
WITHOUT_WIRELESS_SUPPORT=yes
#WITHOUT_ZFS=yes
 
First: you don't need to specify a value as mentioned in src.conf(5), this also makes things much easier to read. So:

Code:
## FreeBSD source build configuration

WITHOUT_ATM=
WITHOUT_BSDINSTALL=
WITH_BSD_GREP=
WITH_CTF=
WITHOUT_CTM=
... and so on.

Next, keep in mind that src.conf handles way more than just the kernel, it also defines how to build the base system (userland) itself. Most options are used for that. If you check the manual page you'll notice that WITHOUT_DEBUG_FILES is used to "avoid building or installing standalone debug files for each executable binary and shared library."

If you want to configure the way the kernel gets build you'd normally be looking at setting up your own kernel configuration. See /usr/src/sys/<your architecture>/conf. You'll find a file GENERIC in there which controls how the kernel gets build. If you don't want debug symbols then you'd be looking at this:

Code:
makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols

Easiest way to override this is to set up your own configuration. I could imagine it using something like this:

Code:
## Kernel config
include GENERIC
ident   CUSTOMKERNEL

nomakeoptions DEBUG

Then copy/link that to the configuration directory (so in the same directory as GENERIC is) and then use the KERNCONF option to specify your custom configuration. I usually set this in /etc/make.conf for my own convenience:

Code:
# Kernel configuration
KERNCONF=FELINER
This is how /usr/src/sys/i386/conf/FELINER always gets used as my kernel configuration. For more information on this please see Chapter 8 of the FreeBSD handbook, section 8.4 in particular.
 
ShelLuser
Thank you for give me your advices. I've had read quick /usr/src/UPDATING and saw this sentence "Debug files may be disabled by setting in src.conf". I didn't know this file. I go to /etc and found ... nothing. I google around and find some examples. Also I take a look at src.conf(). But now I see I have misunderstood the described setting for "WITHOUT_DEBUG_FILES=" and "The src.conf file contains settings that will apply to every build....". My goal was to tweak a bit the kernelbuild without change a lot or create a own configuration file.
 
Back
Top