Page MenuHomeFreeBSD

pkgbase: treat all the kernel packages the same way
Needs ReviewPublic

Authored by bapt on Dec 4 2023, 8:57 AM.
Referenced Files
Unknown Object (File)
Jan 18 2024, 1:22 PM
Unknown Object (File)
Jan 5 2024, 10:38 PM
Unknown Object (File)
Dec 24 2023, 9:58 PM
Unknown Object (File)
Dec 23 2023, 5:53 AM
Unknown Object (File)
Dec 22 2023, 1:29 AM
Unknown Object (File)
Dec 16 2023, 4:08 AM


Group Reviewers

Install the GENERIC kernel into /boot/kernel.GENERIC

Diff Detail

rG FreeBSD src repository
Lint Skipped
Tests Skipped
Build Status
Buildable 54790
Build 51679: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Dec 4 2023, 8:57 AM
This revision is now accepted and ready to land.Dec 4 2023, 9:41 AM

fix Unassociated shell command

This revision now requires review to proceed.Dec 5 2023, 8:05 AM

fix make distributekernel

zlei added inline comments.

Will this have impact on boot loader ?
The default kernel is /boot/kernel/kernel .

$ grep -r '/boot/kernel/kernel' stand
stand/man/loader_simp.8:boot /boot/kernel/kernel
stand/man/loader_4th.8:boot /boot/kernel/kernel
stand/man/loader_lua.8:boot /boot/kernel/kernel
stand/efi/loader/main.c: * /boot/kernel/kernel (the default kernel) that we can use.

During daily dev I have multiple kernels and I workaround this by

# ln -s kernel.stable14 /boot/kernel

CC @imp .

kevans added inline comments.

hmm, I thought I had a patch to stop adding /boot/kernel/kernel automatically if it doesn't actually exist; looks like I need to find that.

I think this is fine, but I might be missing something...


I thought so too...

The default search order is /boot/kernel;/boot/modules (and maybe /boot/dtb).

But it looks like kernel_path/module_path env overrides this. And we set that from lua/config.lua... and it looks like it's trying to find things, so it might already be committed.

All that the grep shows is that we document /boot/kernel/kernel as the default.


Looks like not, the logic is a bit twisty... the part in question is in core.kernelList(): we'll take the default kernel, which is "kernel", and add it first- then we'll autodetect kernels but we won't note the presence (or lack thereof) of the default kernel.

Somewhere, probably in one of my stash entries, there's a patch that notes the presence of it and removes it from the list if it's missing, but only if it's "kernel" inherited from the kernel env var. If it's instead in the kernels list, I assume someone did that intentionally and we leave it alone since kernels is empty by default.