Page MenuHomeFreeBSD

build.7: Explain packaging a custom kernel
ClosedPublic

Authored by ziaee on Wed, Apr 1, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 20, 5:48 PM
Unknown Object (File)
Sat, Apr 18, 9:46 PM
Unknown Object (File)
Sat, Apr 18, 9:46 PM
Unknown Object (File)
Sat, Apr 18, 9:46 PM
Unknown Object (File)
Sat, Apr 18, 5:45 PM
Unknown Object (File)
Sat, Apr 18, 3:23 PM
Unknown Object (File)
Sat, Apr 18, 1:32 PM
Unknown Object (File)
Sat, Apr 18, 11:27 AM

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
1069

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
1069

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
1069

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

my comment about running update-packages without running buildkernel is still open, i don't think we should recommend that people do this (and i'm not sure it even works).

add buildworld and split out update-packages; forgot about that, sorry.

I am committing this due to feedback timeout. If we want to improve this more, I am absolutely happy to do so, but this is 1. a needed bugfix and 2. obstructing other work.

as long as ivy's stuff is covered, yeah, land it.

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Apr 22, 5:30 PM
This revision was automatically updated to reflect the committed changes.