Page MenuHomeFreeBSD

pkgbase: set a default set of kernel for when PACKAGE_BUILDING=1
ClosedPublic

Authored by bapt on Nov 2 2023, 1:22 PM.
Tags
None
Referenced Files
F102641481: D42444.id129654.diff
Fri, Nov 15, 5:39 AM
Unknown Object (File)
Wed, Nov 13, 2:57 PM
Unknown Object (File)
Wed, Nov 13, 2:17 PM
Unknown Object (File)
Fri, Nov 1, 6:19 PM
Unknown Object (File)
Oct 3 2024, 8:12 AM
Unknown Object (File)
Oct 1 2024, 8:16 AM
Unknown Object (File)
Sep 23 2024, 11:20 PM
Unknown Object (File)
Sep 22 2024, 10:36 PM

Details

Summary

PACKAGE_BUILDING is already known in the ports tree as a variable
use to defined when the packages is being actually built in an
automation process, reuse that variable to define the default set
of kernel we plan to build for the default pkgbase.

Diff Detail

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

Event Timeline

bapt requested review of this revision.Nov 2 2023, 1:22 PM
freebsd_igalic.co added inline comments.
Makefile.inc1
1683

We could add GENERIC-MMCCAM-NODEBUG for completeness, but given that we're planning on switching GENERIC-MMCCAM to the default, we might as well postpone that indefinitely.

This revision is now accepted and ready to land.Nov 2 2023, 2:25 PM

This will require a note somewhere for when we branch we need to switch -NODEBUG to -DEBUG etc ...

I wonder if some sort of EXTRA_KERNCONF_${TARGET_ARCH} that gets added would be tidier.

I thought about EXTRA_KERNCONF_${TARGET_ARCH} but I could find a way which was userfriendly, the goal being if a user sets KERNCONF we don't touch it, event if PACKAGE_BUILDING is set, if he hasn't and no PACKAGE_BUILDING is set we keep the current behaviour and if PACKAGE_BUILDING is set and no KERNCONF we have multiple kernels

In D42444#968500, @manu wrote:

This will require a note somewhere for when we branch we need to switch -NODEBUG to -DEBUG etc ...

I don't see any immediate reason we couldn't .if exists(${KRNLCONFDIR}/GENERIC-DEBUG) or whatnot and act accordingly

make the code more generic,
test the existance of the config
automatically switch between DEBUG and NODEBUG

This revision now requires review to proceed.Nov 2 2023, 5:13 PM
bapt marked an inline comment as done.Nov 2 2023, 5:14 PM
This revision is now accepted and ready to land.Nov 2 2023, 5:24 PM
jrtc27 added inline comments.
Makefile.inc1
1679–1680

Should these not be DEF_KERNCONF_arch to match that they're feeding into DEF_KERNCONF not KERNCONF? Or perhaps GENERIC_KERNCONF_arch, since it's really about "what is the GENERIC-like thing I should be building"?

1682–1686
1691

These don't make sense if GENERIC isn't the right thing for that architecture. It just so happens that there is no sys/powerpc/conf/{MINIMAL,GENERIC-MMCCAM} but were they to exist they would be 32-bit and you'd want MINIMAL64(LE)/GENERIC64(LE)-MMCCAM or some MPC85XXSPE thing. Certainly downstream we have aarch64c, which has sys/arm64/conf/GENERIC-MORELLO (and other variants), so this would pick up aarch64's non-Morello MINIMAL and GENERIC-MMCCAM, which would fall over if you tried to actually boot them with that world.

1707

Stray?

be more "generic": use target_arch generic kernel suffix

This revision now requires review to proceed.Nov 2 2023, 5:36 PM
bapt marked 2 inline comments as done.

fixes

bapt marked 2 inline comments as done.Nov 2 2023, 5:38 PM
Makefile.inc1
1679–1680

to be clear it's not required to be set, maybe?

(ignoring whatever mangling phab is doing to the whitespace there)

1691

This would still break were you to add a sys/powerpc/conf/MINIMAL for MACHINE_ARCH=powerpc

This revision is now accepted and ready to land.Nov 2 2023, 6:14 PM
bapt marked 2 inline comments as done.Nov 3 2023, 8:15 AM
bapt added inline comments.
Makefile.inc1
1691

yes but that would make it inconsistent, so I think it is an acceptable risk of failure.

This revision was automatically updated to reflect the committed changes.
bapt marked an inline comment as done.
Makefile.inc1
1691

What do you mean? It would be consistent. But this would try and build it for powerpcspe.