Page MenuHomeFreeBSD

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

Authored by bapt on Dec 4 2023, 8:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 23, 6:17 AM
Unknown Object (File)
May 8 2024, 1:10 PM
Unknown Object (File)
May 8 2024, 11:35 AM
Unknown Object (File)
May 8 2024, 11:34 AM
Unknown Object (File)
May 8 2024, 11:33 AM
Unknown Object (File)
May 2 2024, 12:26 AM
Unknown Object (File)
May 1 2024, 5:25 PM
Unknown Object (File)
Apr 7 2024, 11:17 PM

Details

Reviewers
manu
freebsd_igalic.co
Group Reviewers
pkgbase
Summary

Install the GENERIC kernel into /boot/kernel.GENERIC

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
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.
Makefile.inc1
1831

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.
Makefile.inc1
1831

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...

Makefile.inc1
1831

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.

Makefile.inc1
1831

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.