OpenBSD 5.5 had partial support for netbt bluetooth stack ported from FreeBSD but it was removed in 5.6. So I took the 5.5 code and ported it to -current with a lot of help from ChatGPT o3. After a few days of refactoring it builds !
Yesterday I booted my own OpenBSD kernel with netbt and ubt devices attaching. The ubt device shows an error, I need to investigate.
The sources of OpenBSD-current with netbt stack is available here : https://github.com/thodg/src/tree/master/sys/netbt
I kept all the original netbt code from OpenBSD github looking for a commit named "remove netbt" which led me to a commit by Ted Unangst with still all the netbt code, as it was just a header removal (unlinking all the rest of the code).
After understanding how kernel config works with files and tags and options I could start the compiler error dance.
ChatGPT was mostly helpful for :
Mostly what changed between 5.5 and -current that I could refactor by myself :
IF_ENQUEUE
and such were put into <net/ifq.h>
and looks like ifq_enqueue
ifq_
functions expect a NET_LOCK()
and NET_UNLOCK()
around them.If there were other changes or the original code simply does not work I have no solution but to ask around me and I will try to fix it :)