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)
Sat, May 18, 3:45 PM
Unknown Object (File)
Fri, May 17, 1:56 PM
Unknown Object (File)
Apr 11 2024, 7:04 PM
Unknown Object (File)
Mar 11 2024, 10:07 AM
Unknown Object (File)
Mar 11 2024, 10:07 AM
Unknown Object (File)
Mar 8 2024, 12:16 AM
Unknown Object (File)
Mar 8 2024, 12:04 AM
Unknown Object (File)
Jan 31 2024, 1:53 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.