Page MenuHomeFreeBSD

build.7: Explain packaging a custom kernel
Needs ReviewPublic

Authored by ziaee on Wed, Apr 1, 3:50 PM.

Details

Reviewers
None
Group Reviewers
pkgbase
manpages
docs
Summary

MFC after: 3 days (to 15.1, right?)
Reported by: ivy
Requested by: vermaden

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71909
Build 68792: arc lint + arc unit

Event Timeline

ziaee requested review of this revision.Wed, Apr 1, 3:50 PM

This LGTM but would like to hear @ivy's thoughts, given the Reported by

i didn't report this, but i do think we should document it. about MFC, nothing changed here between 15.0 and 15.1, so it would be best if we can get it in prior to the 15.1 release.

i think we also need to document the behaviour of building multiple kernels in KERNCONF, which is:

  • the first kernel listed in KERNCONF installs to /boot/kernel;
  • all remaining kernels install to /boot/kernel.NAME.

for example, if KERNCONF="FOO BAR BAZ" then three packages are generated:

  • FreeBSD-kernel-foo installs to /boot/kernel
  • FreeBSD-kernel-bar installs to /boot/kernel.BAR
  • FreeBSD-kernel-baz installs to /boot/kernel.BAZ

the user needs to set kernel= in /boot/loader.conf to select the correct non-default kernel.

(this behaviour will probably change in the future, but not in 15.x.)

share/man/man7/build.7
1067

that won't work, you have to build world and kernel before running update-packages. this is a limitation i'd like to lift (there was another thread about this on the list recently) but for now, that's how it is.

markmi_dsl-only.net added inline comments.
share/man/man7/build.7
1067

To be explicit: Does that mean that kernel-toolchain before buildkernel is insufficient for this type of context? If so, that might need to be explicitly mention.

share/man/man7/build.7
1067

update-packages requires both world and kernel to be built first... that would implicitly include any required toolchains. if you don't do that, it will fail, probably with an unhelpful error message.

(at least, i think that's still the case... it's possible you might end up with a repository containing only a kernel package, but that's almost certainly not what you want. but i don't think that's how it works. someone could test it...)