@khm I was wondering, I have this wacom pen tablet that I would like to add support for on 9legacy, how do I go about doing that? I don't know anything about drivers, I'm not even sure if I know what a driver is, is it a small application?

@neauoire @khm Think of it as a module in the first place. The OS kernel can load it and run it. Plan 9 tries to keep the interface rather simple. See here for the USB driver framework as if now in Harvey:

@CyReVolt @khm How do I go about testing it tho, like, I plug/unplug my tablet? See what prints in console and add a bunch of if/else to target that device name?

@neauoire @khm To be honest, I have about no clue, just heard it's hard. Even with emulation, tests can be misleading; the emulation may still behave a bit different. I would suggest a lot of trial/error first, and regarding testing strategies, hopefully the Linux Foundation's efforts with KernelCI will help in the future.
A suggestion seen often is to look at BSD drivers and port them to Plan 9, possibly NetBSD+OpenBSD specifically. Some FreeBSD drivers stem from there.

@CyReVolt @khm I'm sure it's not that hard, the raw data coming out of the USB device is fairly strightforward, instead of sending out position offset, it seems to give me a ratio of the tablet width. I'd be surprised if I couldn't do this in 10 lines or less, I just don't know if it's correct to hack at the plan9 core with my if elses ^^;


@neauoire @khm Well well, a patch sent out will tell. :-) Good luck!

Sign in to participate in the conversation

The original server operated by the Mastodon gGmbH non-profit