Change FreeBSD kernel default name

Hi I don't want to install custom kernel under /boot/kernel so I want to change its name. In kernel config file its written that
makeoptions KERNEL=foo
can be used to override
default name to "foo" and install it in "/foo". So if I understand it correctly I can set that option
to my desired name e.g "kernel-custom" and it will be installed in /boot/kernel-custom.
So I set that option to "kernel-custom" but it was still installed in /boot/kernel.
Am I doing something wrong or getting purpose of this option correctly?
What version of FreeBSD are you running? I see no such line in the default kernel configuration on 10.3-RELEASE...

make installkernel will always install the specified kernel build to /boot/kernel/kernel. You can install another kernel alongside the default using the "INSTKERNNAME" variable; for example:

make installkernel KERNCONF=foo INSTKERNNAME=foo"

You should then have both the generic and custom kernels installed, and can add the line


to the file /boot/loader.conf to make kernel "foo" the one that is booted by default. Some recommended/required reading would be make(1), make.conf(5), build(7), loader.conf(5), and the relevant Handbook section