Solved How do you add netmap into the GENERIC kernel configuration for a custom install?

I'm trying to build a "custom" FreeBSD install. Starting small, I'm just trying to add netmap into the kernel during install vs installing the OS and then doing a kernel rebuild. In the source I added what I thought would work but as soon as the build gets to the kernel build it fails on the line in the config where I added netmap.


In sys/amd64/conf/GENERIC I added this line at the bottom.

Code:
# Netmap
device netmap # Netmap for super fast I/O


Here is the error I get when I run the sudo sh release.sh -c release.conf script:

Code:
--------------------------------------------------------------
>>> World build completed on Thu Nov 12 02:50:40 UTC 2015
--------------------------------------------------------------

--------------------------------------------------------------
>>> Kernel build for GENERIC started on Thu Nov 12 02:50:40 UTC 2015
--------------------------------------------------------------
===> GENERIC

--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
config: /usr/src/sys/amd64/conf/GENERIC:369: syntax error
--- buildkernel ---
*** [buildkernel] Error code 1

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
--- buildkernel ---
*** [buildkernel] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
 
Never, ever, edit GENERIC. Make a copy, edit the copy and don't forget to change the ident line. People expect GENERIC to be the GENERIC kernel, not a custom one.
 
Never, ever, edit GENERIC. Make a copy, edit the copy and don't forget to change the ident line. People expect GENERIC to be the GENERIC kernel, not a custom one.

I copied GENERIC to INFOSEC, changed ident and it's past the kernel build now. Thank you.

Code:
--------------------------------------------------------------

>>> World build completed on Thu Nov 12 16:51:47 UTC 2015

--------------------------------------------------------------


--------------------------------------------------------------

>>> Kernel build for INFOSEC started on Thu Nov 12 16:51:47 UTC 2015

--------------------------------------------------------------

===> INFOSEC


--------------------------------------------------------------

>>> stage 1: configuring the kernel

--------------------------------------------------------------

Kernel build directory is /usr/obj/usr/src/sys/INFOSEC

Don't forget to do ``make cleandepend && make depend''


--------------------------------------------------------------
 
It doesn't matter much how you create the custom kernel. Some include GENERIC and unload everything they don't need. Others, like myself, do it like this. What's important is that the custom kernel isn't called GENERIC as that would create a lot of confusion.

Personally I've never used the release.sh script. I just go to /usr/src/release and do a make -DNOPORTS -DNODOC -DNOPKG KERNCONF=GENERIC release and a make -DNOPORTS -DNODOC -DNOPKG KERNCONF=GENERIC DESTDIR=/storage/release/current install. But that's mainly because I already have a completely built kernel and world as I've just used it to update the machine. The resulting FTP file tree is then used to update my poudriere jails. And the memstick and ISO files are quite handy too. Just in case I'm somewhere and need one :)
 
Back
Top