Page MenuHomeFreeBSD

build.7: Explain packaging a custom kernel
Needs ReviewPublic

Authored by ziaee on Wed, Apr 1, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 12, 1:13 AM
Unknown Object (File)
Sun, Apr 12, 12:19 AM
Unknown Object (File)
Thu, Apr 9, 4:04 AM
Unknown Object (File)
Wed, Apr 8, 7:33 AM
Unknown Object (File)
Tue, Apr 7, 8:30 AM
Unknown Object (File)
Tue, Apr 7, 2:30 AM
Unknown Object (File)
Mon, Apr 6, 8:55 AM
Unknown Object (File)
Mon, Apr 6, 8:55 AM

Details

Reviewers
None
Group Reviewers
pkgbase
manpages
docs
releng
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...)

rebase due to addressing feedback in previous revision.

i didn't report this

i got this information from your mail on the pkgbase list, iiuc im supposed to then credit you with reported by.

i think we also need to document the behaviour of building multiple kernels in KERNCONF

agree. i think we should put that in the KERNCONF entry, im going to attempt it in a subsequent revision.

add releng because the build is also relevant to them