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
F102414811: D41541.diff
Mon, Nov 11, 11:13 PM
Unknown Object (File)
Sun, Oct 20, 5:55 PM
Unknown Object (File)
Sun, Oct 20, 5:55 PM
Unknown Object (File)
Sun, Oct 20, 5:55 PM
Unknown Object (File)
Sun, Oct 20, 5:36 PM
Unknown Object (File)
Oct 7 2024, 7:41 AM
Unknown Object (File)
Sep 23 2024, 6:18 PM
Unknown Object (File)
Sep 3 2024, 1:48 AM
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.