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
Unknown Object (File)
Mon, Jun 3, 2:37 PM
Unknown Object (File)
Sun, May 26, 4:06 PM
Unknown Object (File)
May 17 2024, 2:47 AM
Unknown Object (File)
May 15 2024, 2:47 PM
Unknown Object (File)
May 15 2024, 2:47 PM
Unknown Object (File)
May 15 2024, 2:47 PM
Unknown Object (File)
May 13 2024, 6:23 AM
Unknown Object (File)
May 4 2024, 11:14 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.