Page MenuHomeFreeBSD

kbdcontrol: Support building as a bootstrap tool on old and non-FreeBSD
ClosedPublic

Authored by jrtc27 on Aug 22 2023, 2:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 3, 1:48 AM
Unknown Object (File)
Aug 6 2024, 2:25 AM
Unknown Object (File)
Jul 28 2024, 3:34 PM
Unknown Object (File)
Jul 26 2024, 10:55 AM
Unknown Object (File)
Jul 22 2024, 1:43 PM
Unknown Object (File)
Jun 30 2024, 9:54 PM
Unknown Object (File)
Jun 30 2024, 9:37 PM
Unknown Object (File)
Jun 25 2024, 6:44 PM
Subscribers

Details

Summary

Systems that predate 971bac5ace7a ("kbd: consolidate kb interfaces
(phase one)") cannot build kbdcontrol since kbdelays and kbrates moved
to sys/kbio.h. Moreover, on non-FreeBSD, it requires all kinds of ioctls
and sysctls that are highly FreeBSD-specific to build, but we use it as
a bootstrap tool to generate the keymaps used by some kernels (LINT ones
in particular). Thus, when bootstrapping kbdcontrol, disable everything
that's not needed for that singular use, and use the in-tree kbio.h to
get the definitions of the necessary structures.

This allows KBDMUX_DFLT_KEYMAP, UKBD_DFLT_KEYMAP and ATKBD_DFLT_KEYMAP
to be enabled when building on non-FreeBSD, and thus LINT kernels.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Aug 22 2023, 5:23 PM

Yeah, I think it's OK. I think the #ifdefs are a bit messy, but it's not worth trying to make a cleaner version.