HomeFreeBSD

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

Description

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

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.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41541

Details

Provenance
jrtc27Authored on Aug 22 2023, 8:00 PM
Reviewer
imp
Differential Revision
D41541: kbdcontrol: Support building as a bootstrap tool on old and non-FreeBSD
Parents
rGdc485b968dde: tcp_info: Add and export more FreeBSD-specific fields
Branches
Unknown
Tags
Unknown