Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2025 17:38:27 +0200
From:      Michael Grimm <trashcan@ellael.org>
To:        Lexi Winter <ivy@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: multiple kernels with the same world
Message-ID:  <04D75F4D-5C17-4D8F-93C1-0BDF5251CBD2@ellael.org>
In-Reply-To: <aO4TYzABsCeWqbEW@amaryllis.le-fay.org>
References:  <575313120.20251014120303.ref@yahoo.com> <575313120.20251014120303@yahoo.com> <aO4TYzABsCeWqbEW@amaryllis.le-fay.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Lexi Winter <ivy@FreeBSD.org> wrote:
> Anthony Pankov wrote in <575313120.20251014120303@yahoo.com>:

>> I wander can I build multiple kernel from the same sources while =
using
>> once builded world?
>>=20
>> My aim is to have basepkgs containing different kernels. It would be
>> nice to have FreeBSD-kernel-general-*.pkg,
>> FreeBSD-kernel-virtualmachine-*.pkg etc. in the same base package
>> repository.
>=20
> % make KERNCONF=3D'GENERIC FOO BAR BAZ' buildworld buildkernel =
update-packages
>=20
> the first kernel listed in KERNCONF will be installed in /boot/kernel,
> the rest will be installed in /boot/kernel.NAME.  for consistency, i
> prefer to always build GENERIC as the first kernel, but there's no
> actual requirement to do that.

Cool.=20

Please excuse my ignorance but is there a way to get /boot/kernel.NAME =
installed without going via packages?

I am used to build and install by source. Thus I tried:

MWN> make KERNCONF=3D'GENERIC CUSTOM' DESTDIR=3D/tmp/NEW installkernel | =
& tee LOG

MWN> grep '^>>>' LOG
>>> Install check kernel started on Thu Oct 16 17:27:31 CEST 2025
>>> Installing kernel GENERIC on Thu Oct 16 17:27:31 CEST 2025
>>> Installing kernel GENERIC completed on Thu Oct 16 17:27:44 CEST 2025
>>> Install kernel(s) GENERIC completed in 13 seconds, ncpu: 16

MWN> ls -al /tmp/NEW/boot | grep kernel
drwxr-xr-x  2 root wheel 717 Oct 16 17:29 kernel

Only the first kernel found in KERNCONF will be installed, though.

Is there a way to end up in something like the following?=20

tmp/NEW/boot/kernel
tmp/NEW/boot/kernel.GENERIC

P.S. I tried make KERNCONF=3D'GENERIC CUSTOM' KERNEL=3D'GENERIC CUSTOM' =
DESTDIR=3D/tmp/NEW installkernel
     same results as mentioned above

Regards,
Michael




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?04D75F4D-5C17-4D8F-93C1-0BDF5251CBD2>